GET /api/apps/{AppID}/followers
Returns information about the users who are following the specified app.
Authorization Roles/Permissions: App team member, Business Admin, or Site Admin.
This topic includes the following sections:
HTTP Method
GET
URL
https://{hostname}/api/apps/{AppID}/followers
Sample Request
The example below shows a request for the followers of a specific app.
Sample request URL
https://{hostname}/api/apps/app16964.acmepaymentscorp/followers
Sample request headers
Accept: application/json X-Csrf-Token_acmepaymentscorp: TokenID%3D8ed70a13-8469-11e8-b37a-b155e4eabeb8%2CexpirationTime%3D153...
Sample request body
Not applicable.
Request Headers
For general information on request header values, refer to HTTP Request Headers.
Header | Description |
---|---|
Accept | application/json, application/vnd.soa.v71+json, application/vnd.soa.v72+json, application/vnd.soa.v80+json, application/vnd.soa.v81+json |
Cookie | AtmoAuthToken_{fedmemberid}={cookie value, which usually starts with TokenID}—The platform cookie. This is the Akana API Platform authorization token, and must be sent with every API request that requires login. For more information and an example, see Session cookies. |
X-Csrf-Token_{fedmemberID} | The CSRF prevention header; may or may not be required, depending on platform settings. See CSRF Prevention on the Platform. By default, the CSRF header is not required for GET operations and is required for all others, with a few exceptions relating to user login. |
Request Parameters
Parameter | Parm Type | Data Type | Required | Description |
---|---|---|---|---|
AppID | Path | string | Required | The unique ID for a specific app. |
Response
If successful, this operation returns HTTP status code 200, with information about the followers of the specified app. The information is sent as an RSS channel in JSON format.
Sample Response
The sample response below shows that the specified app has 3 followers.
Sample response headers
Status Code: 200 OK Content-Type: application/json Date: Wed, 15 May 2013 19:31:50 GMT
{ "channel" : { "title" : "PaaStime", "description" : "", "item" : [ { "title" : "Jane Saoirse", "category" : [ { "value" : "user", "domain" : "uddi:soa.com:resourcetype" }, { "value" : "follower", "domain" : "uddi:soa.com:relationshiptype" } ], "guid" : { "value" : "follow16966.acmepaymentscorp" }, "Image" : { "Url" : "https://{hostname}/api/users/522320b9-cb6b-495d-ae07-e4b3bfdb3f6a.acmepaymentscorp/avatar" }, "EntityReferences" : { "EntityReference" : [ { "Title" : "Jane Saoirse", "Guid" : "522320b9-cb6b-495d-ae07-e4b3bfdb3f6a.acmepaymentscorp", "Category" : [ { "value" : "user", "domain" : "uddi:soa.com:resourcetype" } ] } ] } }, { "title" : "Jonathan Swift", "category" : [ { "value" : "user", "domain" : "uddi:soa.com:resourcetype" }, { "value" : "follower", "domain" : "uddi:soa.com:relationshiptype" } ], "guid" : { "value" : "follow18235.acmepaymentscorp" }, "Action" : { "value" : "action.follow.stop", "label" : "Stop Following" }, "Image" : { "Url" : "https://{hostname}/api/users/957482b9-ck7f-0gk5-ae07-9flgok5djtus.acmepaymentscorp/avatar" }, "EntityReferences" : { "EntityReference" : [ { "Title" : "Jonathan Swift", "Guid" : "957482b9-ck7f-0gk5-ae07-9flgok5djtus.acmepaymentscorp", "Category" : [ { "value" : "user", "domain" : "uddi:soa.com:resourcetype" } ] } ] } }, { "title" : "Philip Pirrip", "category" : [ { "value" : "user", "domain" : "uddi:soa.com:resourcetype" }, { "value" : "follower", "domain" : "uddi:soa.com:relationshiptype" } ], "guid" : { "value" : "follow18237.acmepaymentscorp" }, "Image" : { "Url" : "https://{hostname}/api/users/2d0bc425-49ec-4c04-b272-cc8f6f20e52b.acmepaymentscorp/avatar" }, "EntityReferences" : { "EntityReference" : [ { "Title" : "Philip Pirrip", "Guid" : "2d0bc425-49ec-4c04-b272-cc8f6f20e52b.acmepaymentscorp", "Category" : [ { "value" : "user", "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 | application/json, application/vnd.soa.v71+json, application/vnd.soa.v72+json, application/vnd.soa.v80+json, application/vnd.soa.v81+json |
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 title of the RSS channel is the title of the resource for which followers are being listed; in this case, the name of the app. Each item in the channel represents one follower, and includes the information listed below.
Name | Description |
---|---|
title | The username of the follower. |
category | An array of roles that the follower has. Each role includes two name/value pairs, value and domain. For example, value might be follower and domain might be uddi:soa.com:relationshiptype, indicating that the user is a follower of the resource. |
guid | The unique ID for the item; in this case, the following ID. |
Action |
A set of one or more name/value pairs expressing the action available to the follower. Because following a resource is a yes/no activity, the possible action of a follower will always be to stop following. For example: "value" : "action.follow.stop", "label" : "Stop Following" |
Image | A URL to the user's image, if set up. If the user hasn't uploaded an image, the URL to the default user image is included. |
EntityReferences | One or more. For each: Title, GUID, Category |
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 |
---|---|
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. |
404 | The resource could not be found. For example, you might get this if you included an invalid AppID in the request. |
500 | An error occurred processing the call. |
More information about Akana API Platform API error messages.