GET /api/apis/versions/{APIVersionID}/scope
Returns information about the current user's visibility of the API, based on an aggregate of all the visibility scopes assigned to all the groups that the user is a member of, for the specified API version.
This operation returns information about the portions of the API version that the user has visibility to (licenses, operations, and scopes) based on group membership; but if the user is an API Admin, Business Admin, or Site Admin, the AllAPIVisible property is true and the user has full visibility of the API, independent of the visibility information returned in the response.
Authorization Roles/Permissions: Must have Read permission for the resource. Note that if the allAPIVisible parameter is returned with a value of true, the user has full permission to view the API, which might exceed the specific scope, license, and operation results returned.
This topic includes the following sections:
HTTP Method
GET
URL
https://{hostname}/api/apis/versions/{APIVersionID}/scope
Sample Request
The example below shows a request for the current user's visibility of the specified API version.
Sample Request URL
https://{hostname}/api/apis/versions/2f12dfe6-2777-43a6-80e5-2348aff02ac8.acmepaymentscorp/scope
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 licenses, operations, and scopes that are visible to the user.
Sample Response
The sample response below shows the licenses, operations, and scopes that the user has permission to view, as defined by group membership and the scopes visible to groups the user is a member of. However, note that the RestrictedScope parameter and AllAPIVisible show that the user has complete visibility of the API.
Sample response headers: application/json
HTTP/1.1 200 OK Content-Type: application/json
Sample response body: application/json
{ "Visible" : true, "RestrictedScope" : false, "License" : [ { "LicenseID" : "a8ea43ac-0330-4cce-bf0d-3605ec119b2f.acmepaymentscorp", "Name" : "Bronze", "Description" : "Read-only access at no charge. Both environments, public, approval required.", "Visibility" : "Public", "SandboxAccessAutoApproved" : false, "ProductionAccessAutoApproved" : false, "BusinessID" : "tenantbusiness.acmepaymentscorp", "Active" : true }, { "LicenseID" : "8ce9a929-3c68-4c27-abe1-f7848b4bd8c4.acmepaymentscorp", "Name" : "Gold", "Description" : "Full access, monthly fee.", "Visibility" : "Public", "SandboxAccessAutoApproved" : false, "ProductionAccessAutoApproved" : false, "BusinessID" : "tenantbusiness.acmepaymentscorp", "Active" : true } ], "Operation" : [ { "Name" : "addPayment", "Method" : "", "Path" : "", "InputContentType" : "", "OutputContentType" : "" }, { "Name" : "deletePayment", "Method" : "", "Path" : "", "InputContentType" : "", "OutputContentType" : "" }, { "Name" : "modifyPayment", "Method" : "", "Path" : "", "InputContentType" : "", "OutputContentType" : "" } ], "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" : "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" }, { "ResourceID" : "8227b5a5-54f9-4705-ae9c-88e9eb606ba3.acmepaymentscorp", "Name" : "publicScopeCa2", "ShortDescription" : "Scopes to be used for testing", "LongDescription" : "", "Visibility" : "Public", "SandboxAnonymousAccessAllowed" : false, "ProductionAnonymousAccessAllowed" : false, "ResourcePath" : "", "OAuthGrantDefaultResource" : true, "OAuthGrantUserAuthorizationRequired" : true, "BusinessID" : "tenantbusiness.acmepaymentscorp" }, { "ResourceID" : "a981920b-6276-4fa4-b32c-1ed76659dcb3.acmepaymentscorp", "Name" : "PublicChildScopeCa2", "ShortDescription" : "just for testing", "LongDescription" : "", "Visibility" : "Public", "ParentResourceID" : "8227b5a5-54f9-4705-ae9c-88e9eb606ba3.acmepaymentscorp", "SandboxAnonymousAccessAllowed" : false, "ProductionAnonymousAccessAllowed" : false, "ResourcePath" : "", "OAuthGrantDefaultResource" : true, "OAuthGrantUserAuthorizationRequired" : true, "BusinessID" : "tenantbusiness.acmepaymentscorp" }, { "ResourceID" : "419bfb47-528a-48c9-9379-4800a98b2b3a.acmepaymentscorp", "Name" : "public-scope-1", "ShortDescription" : "Scopes to be used for testing", "LongDescription" : "", "Visibility" : "Public", "SandboxAnonymousAccessAllowed" : false, "ProductionAnonymousAccessAllowed" : false, "ResourcePath" : "", "OAuthGrantDefaultResource" : true, "OAuthGrantUserAuthorizationRequired" : true, "BusinessID" : "tenantbusiness.acmepaymentscorp" }, { "ResourceID" : "c4e7f12c-7c78-4f48-b3ae-a54ead927c49.acmepaymentscorp", "Name" : "public-scope-2", "ShortDescription" : "Scopes to be used for testing", "LongDescription" : "", "Visibility" : "Public", "SandboxAnonymousAccessAllowed" : false, "ProductionAnonymousAccessAllowed" : false, "ResourcePath" : "", "OAuthGrantDefaultResource" : true, "OAuthGrantUserAuthorizationRequired" : true, "BusinessID" : "tenantbusiness.acmepaymentscorp" }, { "ResourceID" : "f48a34a7-3bc5-424e-9b90-886d41e7d286.acmepaymentscorp", "Name" : "ScopeOne3AB", "ShortDescription" : "Scopes to be used for testing", "LongDescription" : "", "Visibility" : "Public", "SandboxAnonymousAccessAllowed" : false, "ProductionAnonymousAccessAllowed" : false, "ResourcePath" : "", "OAuthGrantDefaultResource" : true, "OAuthGrantUserAuthorizationRequired" : true, "BusinessID" : "tenantbusiness.acmepaymentscorp" }, { "ResourceID" : "171a6c53-b42e-455f-b5eb-32792e6726a7.acmepaymentscorp", "Name" : "ScopeTwo3AB", "ShortDescription" : "Scopes to be used for testing", "LongDescription" : "", "Visibility" : "Public", "SandboxAnonymousAccessAllowed" : false, "ProductionAnonymousAccessAllowed" : false, "ResourcePath" : "", "OAuthGrantDefaultResource" : true, "OAuthGrantUserAuthorizationRequired" : true, "BusinessID" : "tenantbusiness.acmepaymentscorp" } ], "AllAPIVisible" : true }
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 |
---|---|---|
APIVisibilityScope | APIVisibilityScope |
Contains information about the visibility of an API scope. Note: if the value of the AllAPIVisible response property is true, the current user has full visibility of the API. In this case, the operation still returns an aggregate of all the visibility scopes assigned to all the groups that the user is a member of, which might not be a full reflection of the user's visibility into the API. For example, the user might be a member of groups that do not have visibility into all scopes, but if the user is an API Admin or Business Admin he/she will have visibility of all scopes that apply to the API. |
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. |
403 | Forbidden. The user is not logged in, or does not have permission to view the specified API version. |
500 | An error occurred processing the call. |
More information about Akana API Platform API error messages.