GET /api/alerts
Returns information about alerts for the specified resource, in the form of an RSS channel.
Authorization Roles/Permissions: Login is not required, but 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
URL
https://{hostname}/api/alerts
Sample Request
The example below shows a request for alert information, with a specific Alert ID, with comments included.
Sample Request URL
https://{hostname}/api/alerts?ItemID=alert10805.acmepaymentscorp&IncludeComments=true
Sample request headers
Accept: application/json
Sample request body
Not applicable.
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 |
Request Parameters
Parameter | Parm Type | Data Type | Required | Description |
---|---|---|---|---|
APIID | Query | 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, 100 matching results are returned. |
Response
If successful, this operation returns HTTP status code 200, with the requested information about alerts
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" }
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 |
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:
|
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:
|
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 a malformed request; for example, invalid parameters or body content.For example, you might get this response if there was a typo in a parameter value 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. You would also get this response for any operation that requires login (almost all) if the login cookie was missing. |
500 | An error occurred processing the call. |
More information about Akana API Platform API error messages.