GET /api/users/{UserID}/followings

Returns information about the resources the specified user is following.

Authorization Roles/Permissions: Must be logged in. Self (logged in) or Site Admin (for any user).

This topic includes the following sections:

HTTP Method

GET

URL

https://{hostname}/api/users/{UserID}/followings[?Type=type]

Sample Request #1

Requests a list of resources the specified user is following.

Sample Request URL

https://{hostname}/api/users/957482b9-ck7f-0gk5-ae07-9flgok5djtus.acmepaymentscorp/followings

Sample request headers

Accept: application/json

Sample request body

Not applicable.

Sample Request #2

Requests a list of APIs the specified user is following, using the optional Type parameter.

Sample Request URL

https://{hostname}/api/users/957482b9-ck7f-0gk5-ae07-9flgok5djtus.acmepaymentscorp/followings[?Type=api]

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
UserID Path string Required The unique ID for a specific user.
Type Query String[ ] Optional The type of resource being followed. Valid values: api, app.

Response

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

Sample Response #1

The sample response below shows that the specified user is following one api and one app.

Sample response headers

Status Code: 200 OK
Content-Type: application/json
Date: Wed, 15 May 2013 20:22:02 GMT

Sample response body

{
  "channel" : {
    "title" : "Jonathan Swift",
    "description" : "",
    "item" : [ {
      "title" : "acmepaymentscorp",
      "category" : [ {
        "value" : "api",
        "domain" : "uddi:soa.com:resourcetype"
      }, {
        "value" : "following",
        "domain" : "uddi:soa.com:relationshiptype"
      } ],
      "comments" : "api18969.acmepaymentscorp",
      "guid" : {
        "value" : "follow20174.acmepaymentscorp"
      },
      "Rating" : 4.75,
      "Followers" : 3,
      "Image" : {
        "Url" : "https://{hostname}/api/apis/api18969.acmepaymentscorp/avatars/341c5162-1d42-4a59-b7a7-41d14c4ab662.png"
      },
      "EntityReferences" : {
        "EntityReference" : [ {
          "Title" : "acmepaymentscorp",
          "Guid" : "api18969.acmepaymentscorp",
          "Category" : [ {
            "value" : "followed",
            "domain" : "uddi:soa.com:relationshiptype"
          }, {
            "value" : "api",
            "domain" : "uddi:soa.com:resourcetype"
          }, {
            "value" : "Limited",
            "domain" : "uddi:soa.com:visibility"
          } ]
        } ]
      },
      "Connections" : 0
    }, {
      "title" : "PaaStime (app16964)",
      "category" : [ {
        "value" : "app",
        "domain" : "uddi:soa.com:resourcetype"
      }, {
        "value" : "following",
        "domain" : "uddi:soa.com:relationshiptype"
      } ],
      "comments" : "app16964.acmepaymentscorp",
      "guid" : {
        "value" : "follow18235.acmepaymentscorp"
      },
      "Rating" : 3.2,
      "Followers" : 3,
      "Image" : {
        "Url" : "https://{hostname}/api/apps/app16964.acmepaymentscorp/avatar"
      },
      "EntityReferences" : {
        "EntityReference" : [ {
          "Title" : "PaaStime (app16964)",
          "Guid" : "app16964.acmepaymentscorp",
          "Category" : [ {
            "value" : "followed",
            "domain" : "uddi:soa.com:relationshiptype"
          }, {
            "value" : "app",
            "domain" : "uddi:soa.com:resourcetype"
          }, {
            "value" : "Public",
            "domain" : "uddi:soa.com:visibility"
          } ]
        } ]
      },
      "Connections" : 0
    } ]
  },
  "version" : "1.0"
}

Sample Response #2

The sample response below shows only the APIs that the specified user is following, since the optional Type parameter was used in the request.

{
  "channel" : {
    "title" : "Jonathan Swift",
    "description" : "",
    "item" : [ {
      "title" : "acmepaymentscorp",
      "category" : [ {
        "value" : "api",
        "domain" : "uddi:soa.com:resourcetype"
      }, {
        "value" : "following",
        "domain" : "uddi:soa.com:relationshiptype"
      } ],
      "comments" : "api18969.acmepaymentscorp",
      "guid" : {
        "value" : "follow20174.acmepaymentscorp"
      },
      "Rating" : 4.75,
      "Followers" : 3,
      "Image" : {
        "Url" : "https://{hostname}/api/apis/api18969.acmepaymentscorp/avatars/341c5162-1d42-4a59-b7a7-41d14c4ab662.png"
      },
      "EntityReferences" : {
        "EntityReference" : [ {
          "Title" : "acmepaymentscorp",
          "Guid" : "api18969.acmepaymentscorp",
          "Category" : [ {
            "value" : "followed",
            "domain" : "uddi:soa.com:relationshiptype"
          }, {
            "value" : "api",
            "domain" : "uddi:soa.com:resourcetype"
          }, {
            "value" : "Limited",
            "domain" : "uddi:soa.com:visibility"
          } ]
        } ]
      },
      "Connections" : 0
    } ]
  },
  "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 username, and there is also a place for a description of the user. Each item in the channel represents one resource the user is following, and includes the information listed below.

Name Description
title The name of the resource the user is following.
category[ ]

A set of two name/value pairs, including Value and Domain, indicating the type of resource the user is following. For example:

"value" : "api",
"domain" : "uddi:soa.com:resourcetype"

The example above indicates that the user is following an API.

Comments The unique ID for the resource being followed.
GUID GUID for the "following" relationship between the user and the resource. It is the unique FollowingID; for example, follow20174.acmepaymentscorp.
Rating The overall rating for the resource.
Followers The number of users following the resource.
Image

Information about the avatar image for the resource, including:

  • URL: A URL for the avatar.
EntityReferences

Entity references for the RSS channel item, including:

  • Title: The name of the resource.
  • GUID: unique ID for the resource.
  • Category: a set of name/value pairs providing additional information about the resource and the user's relationship to it.

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.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.