GET /api/alerts

Returns information about alerts, in the form of an RSS channel.

Authorization Roles/Permissions: Anyone can use this operation. The results returned are restricted according to the visibility permissions of the user performing the operation.

This topic includes the following sections:

HTTP Method

GET

Back to top

URL

https://{hostname}/api/alerts

Back to top

Sample Request

The example below shows a request for alert information, with a specific Alert ID, with comments included.

Request URL

https://{hostname}/api/alerts?ItemID=alert10805.acmepaymentscorp&IncludeComments=true

Sample request headers

Accept: application/json

Sample request body

Not applicable.

Back to top

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Accept text/xml, application/rss+xml, application/json, application/vnd.soa.v71+json, application/vnd.soa.v72+json, application/vnd.soa.v71+xml, application/vnd.soa.v72+xml

Back to top

Request Parameters

Parameter Parm Type Data Type Required Description
APIID Path string Required The unique ID for a specific API.
ItemID Query string Optional

The unique ID for a specific forum entry.

If specified, results are limited to information relating to that item ID. If not specified, no filter is applied.

Tag Query string Optional

A user-defined tag.

If specified, results are limited to board items relating to that tag. If not specified, no filter is applied.

SortBy Query string Optional An optional parameter allowing users to sort results by a specific value; for example, com.soa.sort.order.updated sorts with the most updated entries first. For valid values, see Sort By Values. If not specified, items are returned in the sort order of DescendingDate, which means that the most recent items are first.
IncludeComments Query boolean Optional Indicates whether comments should be included in the information returned. Default: true. If set to false, comments are excluded.
NumberOfComments Query integer Optional The number of comments to be returned (if IncludeComments is not set to false). Default value: 2.
start Query integer Optional An index number indicating the starting point for the results to be returned. If not specified, results start at position 0, the first result.
count Query integer Optional The number of results to be returned, from the specified starting point. If not specified, all matching results are returned.

Back to top

Response

If successful, this operation returns HTTP status code 200, with the requested information about alerts

Back to top

Sample Response

The sample response below shows successful completion of this operation. This example is the response to the sample request above.

Sample response headers: application/json

Status Code: 200 OK
Content-Type: application/json
Expires: Wed, 13 May 2015 13:56:28 GMT

Sample response body: application/json

{
  "channel" : {
    "title" : "",
    "link" : "../acmepaymentscorp#/forum/alerts",
    "description" : "",
    "startIndex" : 0,
    "itemsPerPage" : 0,
    "item" : [ {
      "title" : "Scheduled outage",
      "description" : "There will be a scheduled outage for 1 hour, **Sun 26 July 2015 3am to 4am EST**. Please plan accordingly.",
      "category" : [ {
        "value" : "ALERT",
        "domain" : "uddi:soa.com:resourcetype"
      }, {
        "value" : "outage",
        "domain" : "uddi:soa.com:tag"
      }, {
        "value" : "July",
        "domain" : "uddi:soa.com:tag"
      }, {
        "value" : "Critical",
        "domain" : "uddi:soa.com:alertpriority"
      }, {
        "value" : "Production",
        "domain" : "uddi:soa.com:alertenvironment"
      }, {
        "value" : "text/markdown",
        "domain" : "uddi:soa.com:descriptionmediatype"
      }, {
        "value" : "com.soa.board.item.closed",
        "domain" : "uddi:soa.com:state"
      } ],
      "guid" : {
        "value" : "alert10805.acmepaymentscorp"
      },
      "pubDate" : "Wed, 13 May 2015 18:54:35 +0000",
      "BoardItemArtifacts" : {
        "BoardItemArtifact" : [ ]
      },
      "AuthoringUser" : {
        "ID" : "c11635de-8403-4567-a26d-8824517bdde1.acmepaymentscorp",
        "Name" : "adminacmepaymentscorp",
        "Image" : {
          "Url" : "http://{hostname}/api/users/c11635de-8403-4567-a26d-8824517bdde1.acmepaymentscorp/avatar",
          "Title" : "adminacmepaymentscorp",
          "Link" : "#/users/c11635de-8403-4567-a26d-8824517bdde1.acmepaymentscorp/details"
        }
      },
      "Image" : {
        "Url" : "http://{hostname}/api/users/c11635de-8403-4567-a26d-8824517bdde1.acmepaymentscorp/avatar"
      },
      "CreatedDate" : "Wed, 13 May 2015 18:48:19 +0000",
      "Marks" : {
        "Count" : 2,
        "IsMarkedByReader" : false
      },
      "CommentsPreview" : {
        "Count" : 1,
        "Comment" : [ {
          "CommentID" : "c85134ed-48c0-489b-8ef3-e7ef1cb02038.acmepaymentscorp",
          "CommentSubjectID" : "alert10805.acmepaymentscorp",
          "Content" : "Thanks for letting us know!",
          "Created" : "2015-05-13T18:50:43Z",
          "Marks" : 1,
          "IsMarked" : false,
          "UserID" : "f2bfb3d7-02cb-49dc-ac9a-c82b192c476a.acmepaymentscorp",
          "UserName" : "JaneMead",
          "AvatarURL" : "http://{hostname}/api/users/f2bfb3d7-02cb-49dc-ac9a-c82b192c476a.acmepaymentscorp/avatar",
          "Published" : true,
          "MediaType" : "text/plain",
          "BoardItemArtifacts" : {
            "BoardItemArtifact" : [ ]
          }
        } ]
      },
      "EntityReference" : [ {
        "Title" : "ACME Payments API",
        "Guid" : "2548b53b-e947-4d49-9467-ecb76d52f42c.acmepaymentscorp",
        "Category" : [ {
          "value" : "api",
          "domain" : "uddi:soa.com:resourcetype"
        } ]
      }, {
        "Title" : "1.0",
        "Guid" : "b6e256f7-1af5-42d1-bcbe-81b33affe2ef.acmepaymentscorp",
        "Category" : [ {
          "value" : "apiversion",
          "domain" : "uddi:soa.com:resourcetype"
        } ]
      } ]
    } ]
  },
  "version" : "1.0"
}

Back to top

Sample response headers: application/rss+xml

Status Code: 200 OK
Content-Type: application/rss+xml
Expires: Wed, 13 May 2015 13:56:28 GMT

Sample response body: application/rss+xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rss xmlns:ns2="http://soa.com/xsd/business/1.0" xmlns:ns3="http://soa.com/xsd/user/1.0" 
xmlns:ns4="http://soa.com/xsd/rss/1.0" xmlns:ns5="http://soa.com/xsd/comment/1.0" 
xmlns:ns6="http://soa.com/xsd/board/1.0" xmlns:ns7="http://a9.com/-/spec/opensearch/1.1/" 
xmlns:ns8="http://soa.com/xsd/dnmodel/1.0" xmlns:ns9="http://soa.com/xsd/resource/1.0" 
xmlns:ns10="http://soa.com/xsd/legals/1.0" xmlns:ns11="http://soa.com/xsd/fault/1.0" 
xmlns:ns12="http://soa.com/xsd/api/1.0" xmlns:ns13="http://soa.com/xsd/alert/1.0" 
xmlns:ns14="http://soa.com/xsd/contract/1.0" xmlns:ns15="http://soa.com/xsd/ticket/1.0" 
xmlns:ns16="http://soa.com/xsd/app/1.0" xmlns:ns17="http://soa.com/xsd/discussion/1.0" 
xmlns:ns18="http://soa.com/xsd/review/1.0" xmlns:ns19="http://soa.com/xsd/search/1.0" 
xmlns:ns20="http://soa.com/xsd/workflow/1.0" xmlns:ns21="http://soa.com/xsd/client/services/1.0" version="1.0">
  <channel>
    <title></title>
    <link>../acmepaymentscorp#/forum/alerts</link>
    <description></description>
    <ns7:startIndex>0</ns7:startIndex>
    <ns7:itemsPerPage>0</ns7:itemsPerPage>
    <item>
      <title>Scheduled outage</title>
      <description>There will be a scheduled outage for 1 hour, **Sun 26 July 2015 3am to 4am EST**. Please plan accordingly.</description>
      <category domain="uddi:soa.com:resourcetype">ALERT</category>
      <category domain="uddi:soa.com:tag">outage</category>
      <category domain="uddi:soa.com:tag">July</category>
      <category domain="uddi:soa.com:alertpriority">Critical</category>
      <category domain="uddi:soa.com:alertenvironment">Production</category>
      <category domain="uddi:soa.com:descriptionmediatype">text/markdown</category>
      <category domain="uddi:soa.com:state">com.soa.board.item.closed</category>
      <guid>alert10805.acmepaymentscorp</guid>
      <pubDate>Wed, 13 May 2015 18:54:35 +0000</pubDate>
      <ns4:Image>
        <Url>http://{hostname}/api/users/c11635de-8403-4567-a26d-8824517bdde1.acmepaymentscorp/avatar</Url>
      </ns4:Image>
      <ns4:CreatedDate>Wed, 13 May 2015 18:48:19 +0000</ns4:CreatedDate>
      <ns4:Marks>
        <Count>2</Count>
        <IsMarkedByReader>false</IsMarkedByReader>
      </ns4:Marks>
      <ns5:CommentsPreview>
        <ns5:Count>1</ns5:Count>
        <ns5:Comment>
          <ns5:CommentID>231b9d6d-bb06-4bef-88da-b09372a8de1e.acmepaymentscorp</ns5:CommentID>
          <ns5:CommentSubjectID>alert10805.acmepaymentscorp</ns5:CommentSubjectID>
          <ns5:Content>Great to know ahead of time.</ns5:Content>
          <ns5:Created>2015-05-13T18:54:34Z</ns5:Created>
          <ns5:Marks>1</ns5:Marks>
          <ns5:IsMarked>false</ns5:IsMarked>
          <ns3:UserID>2e8ad84c-0410-44d1-87ee-b39eaba04519.acmepaymentscorp</ns3:UserID>
          <ns3:UserName>JonathanSwift</ns3:UserName>
          <ns3:AvatarURL>http://{hostname}/api/users/2e8ad84c-0410-44d1-87ee-b39eaba04519.acmepaymentscorp/avatar</ns3:AvatarURL>
          <ns5:Published>true</ns5:Published>
          <ns6:DescriptionMediaType>text/plain</ns6:DescriptionMediaType>
          <ns6:BoardItemArtifacts />
        </ns5:Comment>
        <ns5:Comment>
          <ns5:CommentID>c85134ed-48c0-489b-8ef3-e7ef1cb02038.acmepaymentscorp</ns5:CommentID>
          <ns5:CommentSubjectID>alert10805.acmepaymentscorp</ns5:CommentSubjectID>
          <ns5:Content>Thanks for letting us know!</ns5:Content>
          <ns5:Created>2015-05-13T18:50:43Z</ns5:Created>
          <ns5:Marks>1</ns5:Marks>
          <ns5:IsMarked>false</ns5:IsMarked>
          <ns3:UserID>f2bfb3d7-02cb-49dc-ac9a-c82b192c476a.acmepaymentscorp</ns3:UserID>
          <ns3:UserName>JaneMead</ns3:UserName>
          <ns3:AvatarURL>http://{hostname}/api/users/f2bfb3d7-02cb-49dc-ac9a-c82b192c476a.acmepaymentscorp/avatar</ns3:AvatarURL>
          <ns5:Published>true</ns5:Published>
          <ns6:DescriptionMediaType>text/plain</ns6:DescriptionMediaType>
          <ns6:BoardItemArtifacts />
        </ns5:Comment>
      </ns5:CommentsPreview>
      <ns4:AuthoringUser>
        <ID>c11635de-8403-4567-a26d-8824517bdde1.acmepaymentscorp</ID>
        <Name>adminacmepaymentscorp</Name>
        <ns4:Image>
          <Url>http://{hostname}/api/users/c11635de-8403-4567-a26d-8824517bdde1.acmepaymentscorp/avatar</Url>
          <Title>adminacmepaymentscorp</Title>
          <Link>#/users/c11635de-8403-4567-a26d-8824517bdde1.acmepaymentscorp/details</Link>
        </ns4:Image>
      </ns4:AuthoringUser>
      <ns4:EntityReference>
        <Title>ACME Payments API</Title>
        <Guid>2548b53b-e947-4d49-9467-ecb76d52f42c.acmepaymentscorp</Guid>
        <ns4:Category domain="uddi:soa.com:resourcetype">api</ns4:Category>
      </ns4:EntityReference>
      <ns4:EntityReference>
        <Title>1.0</Title>
        <Guid>b6e256f7-1af5-42d1-bcbe-81b33affe2ef.acmepaymentscorp</Guid>
        <ns4:Category domain="uddi:soa.com:resourcetype">apiversion</ns4:Category>
      </ns4:EntityReference>
      <ns6:BoardItemArtifacts />
    </item>
  </channel>
</rss>

Back to top

Response Headers

For general information on response header values, refer to HTTP Response Headers.

Header Description
Content-Type text/xml, application/rss+xml, application/json, application/vnd.soa.v71+json, application/vnd.soa.v72+json, application/vnd.soa.v71+xml, application/vnd.soa.v72+xml

Back to top

Response Body

The response body is in the form of an RSS channel, and includes the items listed below. The RSS version is 1.0. The channel includes paging values: StartIndex, TotalResults, and ItemsPerPage. Each item in the channel represents an alert, and includes the information listed below.

Name Description
title The text title of the alert.
description Descriptive text for the alert.
category[ ]

An array of sets of two name/value pairs, each including Value and Domain, with a value for each. For example:

"value" : "outage",
"domain" : "uddi:soa.com:tag"

The example above indicates that there is a tag on the alert, with text "outage."

Example:

"value" : "text/markdown",
"domain" : "uddi:soa.com:descriptionmediatype"

The example above indicates that the alert is written using markdown rather than plain text.

GUID GUID for the alert
pubdate The date/timestamp when the information was generated.
BoardItemArtifacts Information about any artifacts associated with the alert, such as images. Only applicable if the alert uses markdown.
AuthoringUser

Information about the user who authored the Board item, including:

  • ID: the unique UserID
  • Name: The user's name as it appears in the platform
  • Image: Information about the user's image, including URL, Title, and Link
Image Information about the image for the resource that the Board item is associated with, including URL and link.
CreatedDate The date/timestamp when the information was generated.
Marks Information about marks on the Board item, including a numeric count and a boolean value, IsMarkedByReader, indicating whether the current user (if a user is logged in) marked the Board item.
CommentsPreview Information about comments on the Board item, including a numeric count and information about the specific comments, if applicable.
EntityReference

An array of one or more entity references for the Board item. Each includes:

  • Title
  • GUID: the unique ID for the item.
  • Category

Back to top

Error Codes/Messages

If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.

Item Value
400 Bad request: Returned if the client sends invalid parameters or body content. For example, you might get this response if there was a typo in the URL.
401 Unauthorized. For example, you would get this response if you didn't include the custom X-Csrf-Token_{fedmemberID} header in the request, when it was required by the platform settings; or if you included an invalid or expired value for this header.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.

Back to top

Related Topics