GET /api/users/{UserID}/followings

Returns information about the resources the specified user is following.

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

This topic includes the following sections:

HTTP Method

GET

Back to top

URL

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

Back to top

Sample Request #1

Requests a list of resources the specified user is following.

Request URL

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

Sample request headers

Accept: application/json
X-Csrf-Token_{tenant}: {TokenID}

Sample request body

Not applicable.

Sample Request #2

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

Request URL

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

Back to top

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

Back to top

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.

Back to top

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.

Back to top

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"
}

Back to top

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

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 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.

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
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