GET /api/apis/versions/{APIVersionID}/resources

Returns information about operation-specific scope mapping for an API version.

Note: Operation-specific scope mapping is specified with the PUT /api/apis/versions/{APIVersionID}/resources operation.

Authorization Roles/Permissions: Must be a user with Read authorization to view information about the API.

This topic includes the following sections:

HTTP Method

GET

URL

https://{hostname}/api/apis/versions/{APIVersionID}/resources

Sample Request

The example below shows a request for the scope mapping information for the specified API version.

Sample Request URL

https://{hostname}/api/apis/versions/2f12dfe6-2777-43a6-80e5-2348aff02ac8.acmepaymentscorp/resources

Sample request headers

Accept: application/json
X-Csrf-Token_acmepaymentscorp: TokenID%3D8ed70a13-8469-11e8-b37a-b155e4eabeb8%2CexpirationTime%3D153...

Sample request body

None.

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Accept application/json, application/xml, application/vnd.soa.v71+json, application/vnd.soa.v71+xml, application/vnd.soa.v72+json, application/vnd.soa.v72+xml, application/vnd.soa.v80+json, application/vnd.soa.v80+xml, application/vnd.soa.v81+json, application/vnd.soa.v81+xml
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
APIVersionID Path string Required The unique ID for a specific API version.

Response

If successful, this operation returns HTTP status code 200, with information about the scopes assigned to each operation within the API version.

Sample Response

The sample response below shows successful completion of this operation. There are five operations; four operations are mapped to one scope each, and one operation is mapped to three scopes. The second sample response shows that operation-specific scope mapping is not in use.

Sample response headers: application/json

Status Code: 200 OK
Content-Type: application/json
Expires: Fri, 06 Jun 2014 16:33:42 GMT

Sample response body: application/json (operation-specific scope mapping in use)

{
  "OperationResourceDetails" : [ {
    "OperationName" : "addPayment",
    "Resource" : [ {
      "ResourceID" : "7bf71695-c016-4661-b85c-19334480d2dd.acmepaymentscorp",
      "Name" : "Full_Scope",
      "ShortDescription" : "Full access to all operations.",
      "LongDescription" : "Full access to all operations.",
      "Visibility" : "Public",
      "SandboxAnonymousAccessAllowed" : false,
      "ProductionAnonymousAccessAllowed" : false,
      "ResourcePath" : "",
      "OAuthGrantDefaultResource" : true,
      "OAuthGrantUserAuthorizationRequired" : true,
      "BusinessID" : "tenantbusiness.acmepaymentscorp"
    } ]
  }, {
    "OperationName" : "deletePayment",
    "Resource" : [ {
      "ResourceID" : "7bf71695-c016-4661-b85c-19334480d2dd.acmepaymentscorp",
      "Name" : "Full_Scope",
      "ShortDescription" : "Full access to all operations.",
      "LongDescription" : "Full access to all operations.",
      "Visibility" : "Public",
      "SandboxAnonymousAccessAllowed" : false,
      "ProductionAnonymousAccessAllowed" : false,
      "ResourcePath" : "",
      "OAuthGrantDefaultResource" : true,
      "OAuthGrantUserAuthorizationRequired" : true,
      "BusinessID" : "tenantbusiness.acmepaymentscorp"
    } ]
  }, {
    "OperationName" : "getPayment",
    "Resource" : [ {
      "ResourceID" : "bc0f8b1b-e7a6-4f42-b835-a694fb76d92c.acmepaymentscorp",
      "Name" : "ReadOnly_Scope",
      "ShortDescription" : "Read-only operations.",
      "LongDescription" : "Read-only operations. Public visibility",
      "Visibility" : "Public",
      "SandboxAnonymousAccessAllowed" : false,
      "ProductionAnonymousAccessAllowed" : false,
      "ResourcePath" : "",
      "OAuthGrantDefaultResource" : true,
      "OAuthGrantUserAuthorizationRequired" : true,
      "BusinessID" : "tenantbusiness.acmepaymentscorp"
    }, {
      "ResourceID" : "cc10238a-d056-4953-b6a8-2a8c03e9a3e7.acmepaymentscorp",
      "Name" : "Beta_Scope",
      "ShortDescription" : "Access to beta operations.",
      "LongDescription" : "Access to beta operations for testing (private)",
      "Visibility" : "Limited",
      "SandboxAnonymousAccessAllowed" : false,
      "ProductionAnonymousAccessAllowed" : false,
      "ResourcePath" : "",
      "OAuthGrantDefaultResource" : true,
      "OAuthGrantUserAuthorizationRequired" : true,
      "BusinessID" : "tenantbusiness.acmepaymentscorp"
    }, {
      "ResourceID" : "7bf71695-c016-4661-b85c-19334480d2dd.acmepaymentscorp",
      "Name" : "Full_Scope",
      "ShortDescription" : "Full access to all operations.",
      "LongDescription" : "Full access to all operations.",
      "Visibility" : "Public",
      "SandboxAnonymousAccessAllowed" : false,
      "ProductionAnonymousAccessAllowed" : false,
      "ResourcePath" : "",
      "OAuthGrantDefaultResource" : true,
      "OAuthGrantUserAuthorizationRequired" : true,
      "BusinessID" : "tenantbusiness.acmepaymentscorp"
    } ]
  }, {
    "OperationName" : "listPayments",
    "Resource" : [ {
      "ResourceID" : "cc10238a-d056-4953-b6a8-2a8c03e9a3e7.acmepaymentscorp",
      "Name" : "Beta_Scope",
      "ShortDescription" : "Access to beta operations.",
      "LongDescription" : "Access to beta operations for testing (private)",
      "Visibility" : "Limited",
      "SandboxAnonymousAccessAllowed" : false,
      "ProductionAnonymousAccessAllowed" : false,
      "ResourcePath" : "",
      "OAuthGrantDefaultResource" : true,
      "OAuthGrantUserAuthorizationRequired" : true,
      "BusinessID" : "tenantbusiness.acmepaymentscorp"
    } ]
  }, {
    "OperationName" : "modifyPayment",
    "Resource" : [ {
      "ResourceID" : "7bf71695-c016-4661-b85c-19334480d2dd.acmepaymentscorp",
      "Name" : "Full_Scope",
      "ShortDescription" : "Full access to all operations.",
      "LongDescription" : "Full access to all operations.",
      "Visibility" : "Public",
      "SandboxAnonymousAccessAllowed" : false,
      "ProductionAnonymousAccessAllowed" : false,
      "ResourcePath" : "",
      "OAuthGrantDefaultResource" : true,
      "OAuthGrantUserAuthorizationRequired" : true,
      "BusinessID" : "tenantbusiness.acmepaymentscorp"
    } ]
  } ]
}

Sample response body: application/json (operation-specific scope mapping not in use)

{
}

Response Headers

For general information on response header values, refer to HTTP Response Headers.

Header Description
Content-Type application/json, application/xml, application/vnd.soa.v71+json, application/vnd.soa.v71+xml, application/vnd.soa.v72+json, application/vnd.soa.v72+xml, application/vnd.soa.v80+json, application/vnd.soa.v80+xml, application/vnd.soa.v81+json, application/vnd.soa.v81+xml

Response Body

Name Type Description
APIVersionResourceDetails APIVersionResourceDetails

Contains details about operation-specific scope mapping for an API version, if operation-specific scope mapping is in use for the API version.

Note: If the API version is set to API-wide scope mapping, there are no resource details so the response is empty, as shown in the second JSON example above.

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.

You would also get this response if you hadn't completed login before running the operation, or if you were not authorized to view the specified API version.

500 An error occurred processing the call.

More information about Akana API Platform API error messages.