GET /api/apis/{APIID}/followers

Returns information about the users who are following the specified API.

Authorization Roles/Permissions: Must have Read permission for the resource.

This topic includes the following sections:

HTTP Method

GET

URL

https://{hostname}/api/apis/{APIID}/followers

Sample Request

The example below shows a request for the followers of a specific API.

Sample Request URL

https://{hostname}/api/apis/api10017.acmepaymentscorp/followers

Sample request headers

GET /api/apis/api10017.acmepaymentscorp/followers HTTP/1.1
Host: {hostname}
Accept: application/json, text/javascript, */*; q=0.01
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
APIID Path string Required The unique ID for a specific API.

Response

If successful, this operation returns HTTP status code 200, with information about the followers of the specified API. The information is sent as an RSS channel in JSON format.

Sample Response

The sample response below shows that the specified API has 3 followers.

Sample response headers

HTTP/1.1 200 OK
Date: Wed, 13 Feb 2013 16:04:41 GMT
Content-Type: application/json

Sample response body

{
  "channel" : {
    "title" : "acmepaymentscorp",
    "description" : "",
    "item" : [ {
      "title" : "Jane Saoirse",
      "category" : [ {
        "value" : "user",
        "domain" : "uddi:soa.com:resourcetype"
      }, {
        "value" : "follower",
        "domain" : "uddi:soa.com:relationshiptype"
      } ],
      "guid" : {
        "value" : "follow20169.acmepaymentscorp"
      },
      "Image" : {
        "Url" : "http://cdn.acmepaymentscorp.soa.com/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" : "follow20174.acmepaymentscorp"
      },
      "Action" : {
        "value" : "action.follow.stop",
        "label" : "Stop Following"
      },
      "Image" : {
        "Url" : "http://cdn.acmepaymentscorp.soa.com/api/users/45742f96-aad2-45d8-b507-420cf07c87ff.acmepaymentscorp/avatar"
      },
      "EntityReferences" : {
        "EntityReference" : [ {
          "Title" : "Jonathan Swift",
          "Guid" : "45742f96-aad2-45d8-b507-420cf07c87ff.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" : "follow20172.acmepaymentscorp"
      },
      "Image" : {
        "Url" : "http://cdn.acmepaymentscorp.soa.com/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 API. 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 FollowingID.
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

Entity references for the user who is the follower:

  • Title: The name of the user.
  • GUID: unique ID for the user.
  • Category: a set of two name/value pairs expressing the type of entity.

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 there is a typo in a path parameter.

500 An error occurred processing the call.

More information about Akana API Platform API error messages.