GET /api/apis/versions/{APIVersionID}/viewers/{ViewerID}/scope

Returns information about scope visibility for a specific API version, for a specific group that might visibility of the 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/versions/{APIVersionID}/viewers/{ViewerID}/scope

Sample Request

The example below shows a request for the private viewer scope for the specified API version, specified group.

Sample Request URL

https://{hostname}/api/apis/versions/38fcd5ae-08ae-4161-9fd3-65288dffb92e.acmepaymentscorp/viewers/1c95952f-a53b-47ad-8a2f-f02d92ed6d26.acmepaymentscorp/scope

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/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.
ViewerID Path string Required The GroupID of a group that has visibility into the API.

Response

If successful, this operation returns HTTP status code 200, with information about whether the specified group has private viewer scope to the specified API version.

Sample Response #1

The sample response below shows successful completion of this operation. The specified group does not have restricted scope for the specified API version.

Sample response headers: application/json

Status Code: 200 OK
Content-Type: application/json
Expires: Wed, 11 Jun 2014 10:20:37 GMT

Sample response body: application/json

{
  "ResourceID" : "5e844469-8bf4-4d16-adc3-00fdf6e56a12.acmepaymentscorp",
  "ResourceType" : "apiversion",
  "ViewerID" : "apiadmin-73691c5e-598a-4251-aac2-2a5b28385207.acmepaymentscorp",
  "ViewerType" : "group",
  "RestrictedScope" : false
}

Sample Response #2

The sample response below shows successful completion of this operation. The specified group has restricted scope for the specified API version, so information about the license is included in the response.

Sample response headers

Status Code: 200 OK
Content-Type: application/json
Expires: Thu, 12 Mar 2020 18:12:07 GMT

Sample response body

{
  "ResourceID": "38fcd5ae-08ae-4161-9fd3-65288dffb92e.acmepaymentscorp",
  "ResourceType": "apiversion",
  "ViewerID": "1c95952f-a53b-47ad-8a2f-f02d92ed6d26.acmepaymentscorp",
  "ViewerType": "group",
  "RestrictedScope": true,
  "License": [
    {
      "LicenseID": "7e9d49df-108a-4347-a19b-342ac4c5bef6.acmepaymentscorp",
      "Name": "License 2",
      "Description": "License 2",
      "Visibility": "Limited",
      "SandboxAccessAutoApproved": true,
      "ProductionAccessAutoApproved": true,
      "LicenseParts": {
        "LicensePart": [
          {
            "Name": "8a015135-e4c6-42de-a4ee-845cddbf5867",
            "ResourceID": [
              "f2cae29e-1bce-4e4f-98b4-061633cb8e79.acmepaymentscorp"
            ]
          }
        ]
      },
      "BusinessID": "tenantbusiness.acmepaymentscorp"
    }
  ]
}

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
VisibilityContractDetails VisibilityContractDetails Contains information about a group's visibility of a specific resource.

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
400 Returned if the client sends invalid parameters or body content. For example, you might get this response if you forgot to replace a variable in the request URL with a valid 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.