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

Back to top

URL

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

Back to top

Sample Request

The example below shows a request for the current user's visibility of the specified API version.

Request URL

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

Sample request headers

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

Sample request body

None.

Back to top

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

Back to top

Request Parameters

Parameter Parm Type Data Type Required Description
APIVersionID Path string Required The unique ID for a specific API version.

Back to top

Response

If successful, this operation returns HTTP status code 200, with information about the licenses, operations, and scopes that are visible to the user.

Back to top

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

Accept: 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 automation 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 automation 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 automation 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 automation 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 automation testing",
    "LongDescription" : "",
    "Visibility" : "Public",
    "SandboxAnonymousAccessAllowed" : false,
    "ProductionAnonymousAccessAllowed" : false,
    "ResourcePath" : "",
    "OAuthGrantDefaultResource" : true,
    "OAuthGrantUserAuthorizationRequired" : true,
    "BusinessID" : "tenantbusiness.acmepaymentscorp"
  } ],
  "AllAPIVisible" : true
}

Back to top

Sample response headers: application/xml

Accept: application/xml

Sample response body: application/xml

<?xml version="1.0" encoding="UTF-8"?>
<APIVisibilityScope xmlns="http://soa.com/xsd/api/1.0" xmlns:ns2="http://soa.com/xsd/business/1.0" 
xmlns:ns3="http://soa.com/xsd/resource/1.0" xmlns:ns4="http://soa.com/xsd/legals/1.0">
  <Visible>true</Visible>
  <RestrictedScope>false</RestrictedScope>
  <ns2:License>
    <ns2:LicenseID>a8ea43ac-0330-4cce-bf0d-3605ec119b2f.acmepaymentscorp</ns2:LicenseID>
    <ns2:Name>Bronze</ns2:Name>
    <ns2:Description>Read-only access at no charge. Both environments, public, approval required.</ns2:Description>
    <ns2:Visibility>Public</ns2:Visibility>
    <ns2:SandboxAccessAutoApproved>false</ns2:SandboxAccessAutoApproved>
    <ns2:ProductionAccessAutoApproved>false</ns2:ProductionAccessAutoApproved>
    <ns2:BusinessID>tenantbusiness.acmepaymentscorp</ns2:BusinessID>
    <ns2:Active>true</ns2:Active>
  </ns2:License>
  <ns2:License>
    <ns2:LicenseID>8ce9a929-3c68-4c27-abe1-f7848b4bd8c4.acmepaymentscorp</ns2:LicenseID>
    <ns2:Name>Gold</ns2:Name>
    <ns2:Description>Full access, monthly fee.</ns2:Description>
    <ns2:Visibility>Public</ns2:Visibility>
    <ns2:SandboxAccessAutoApproved>false</ns2:SandboxAccessAutoApproved>
    <ns2:ProductionAccessAutoApproved>false</ns2:ProductionAccessAutoApproved>
    <ns2:BusinessID>tenantbusiness.acmepaymentscorp</ns2:BusinessID>
    <ns2:Active>true</ns2:Active>
  </ns2:License>
  <Operation>
    <Name>addPayment</Name>
    <Method></Method>
    <Path></Path>
    <InputContentType></InputContentType>
    <OutputContentType></OutputContentType>
  </Operation>
  <Operation>
    <Name>deletePayment</Name>
    <Method></Method>
    <Path></Path>
    <InputContentType></InputContentType>
    <OutputContentType></OutputContentType>
  </Operation>
  <Operation>
    <Name>modifyPayment</Name>
    <Method></Method>
    <Path></Path>
    <InputContentType></InputContentType>
    <OutputContentType></OutputContentType>
  </Operation>
  <ns2:Resource>
    <ns2:ResourceID>bc0f8b1b-e7a6-4f42-b835-a694fb76d92c.acmepaymentscorp</ns2:ResourceID>
    <ns2:Name>ReadOnly_Scope</ns2:Name>
    <ns2:ShortDescription>Read-only operations.</ns2:ShortDescription>
    <ns2:LongDescription>Read-only operations. Public visibility</ns2:LongDescription>
    <ns2:Visibility>Public</ns2:Visibility>
    <ns2:SandboxAnonymousAccessAllowed>false</ns2:SandboxAnonymousAccessAllowed>
    <ns2:ProductionAnonymousAccessAllowed>false</ns2:ProductionAnonymousAccessAllowed>
    <ns2:ResourcePath></ns2:ResourcePath>
    <ns2:OAuthGrantDefaultResource>true</ns2:OAuthGrantDefaultResource>
    <ns2:OAuthGrantUserAuthorizationRequired>true</ns2:OAuthGrantUserAuthorizationRequired>
    <ns2:BusinessID>tenantbusiness.acmepaymentscorp</ns2:BusinessID>
  </ns2:Resource>
  <ns2:Resource>
    <ns2:ResourceID>7bf71695-c016-4661-b85c-19334480d2dd.acmepaymentscorp</ns2:ResourceID>
    <ns2:Name>Full_Scope</ns2:Name>
    <ns2:ShortDescription>Full access to all operations.</ns2:ShortDescription>
    <ns2:LongDescription>Full access to all operations.</ns2:LongDescription>
    <ns2:Visibility>Public</ns2:Visibility>
    <ns2:SandboxAnonymousAccessAllowed>false</ns2:SandboxAnonymousAccessAllowed>
    <ns2:ProductionAnonymousAccessAllowed>false</ns2:ProductionAnonymousAccessAllowed>
    <ns2:ResourcePath></ns2:ResourcePath>
    <ns2:OAuthGrantDefaultResource>true</ns2:OAuthGrantDefaultResource>
    <ns2:OAuthGrantUserAuthorizationRequired>true</ns2:OAuthGrantUserAuthorizationRequired>
    <ns2:BusinessID>tenantbusiness.acmepaymentscorp</ns2:BusinessID>
  </ns2:Resource>
  <ns2:Resource>
    <ns2:ResourceID>8227b5a5-54f9-4705-ae9c-88e9eb606ba3.acmepaymentscorp</ns2:ResourceID>
    <ns2:Name>publicScopeCa2</ns2:Name>
    <ns2:ShortDescription>Scopes to be used for automation testing</ns2:ShortDescription>
    <ns2:LongDescription></ns2:LongDescription>
    <ns2:Visibility>Public</ns2:Visibility>
    <ns2:SandboxAnonymousAccessAllowed>false</ns2:SandboxAnonymousAccessAllowed>
    <ns2:ProductionAnonymousAccessAllowed>false</ns2:ProductionAnonymousAccessAllowed>
    <ns2:ResourcePath></ns2:ResourcePath>
    <ns2:OAuthGrantDefaultResource>true</ns2:OAuthGrantDefaultResource>
    <ns2:OAuthGrantUserAuthorizationRequired>true</ns2:OAuthGrantUserAuthorizationRequired>
    <ns2:BusinessID>tenantbusiness.acmepaymentscorp</ns2:BusinessID>
  </ns2:Resource>
  <ns2:Resource>
    <ns2:ResourceID>a981920b-6276-4fa4-b32c-1ed76659dcb3.acmepaymentscorp</ns2:ResourceID>
    <ns2:Name>PublicChildScopeCa2</ns2:Name>
    <ns2:ShortDescription>just for testing</ns2:ShortDescription>
    <ns2:LongDescription></ns2:LongDescription>
    <ns2:Visibility>Public</ns2:Visibility>
    <ns2:ParentResourceID>8227b5a5-54f9-4705-ae9c-88e9eb606ba3.acmepaymentscorp</ns2:ParentResourceID>
    <ns2:SandboxAnonymousAccessAllowed>false</ns2:SandboxAnonymousAccessAllowed>
    <ns2:ProductionAnonymousAccessAllowed>false</ns2:ProductionAnonymousAccessAllowed>
    <ns2:ResourcePath></ns2:ResourcePath>
    <ns2:OAuthGrantDefaultResource>true</ns2:OAuthGrantDefaultResource>
    <ns2:OAuthGrantUserAuthorizationRequired>true</ns2:OAuthGrantUserAuthorizationRequired>
    <ns2:BusinessID>tenantbusiness.acmepaymentscorp</ns2:BusinessID>
  </ns2:Resource>
  <ns2:Resource>
    <ns2:ResourceID>419bfb47-528a-48c9-9379-4800a98b2b3a.acmepaymentscorp</ns2:ResourceID>
    <ns2:Name>public-scope-1</ns2:Name>
    <ns2:ShortDescription>Scopes to be used for automation testing</ns2:ShortDescription>
    <ns2:LongDescription></ns2:LongDescription>
    <ns2:Visibility>Public</ns2:Visibility>
    <ns2:SandboxAnonymousAccessAllowed>false</ns2:SandboxAnonymousAccessAllowed>
    <ns2:ProductionAnonymousAccessAllowed>false</ns2:ProductionAnonymousAccessAllowed>
    <ns2:ResourcePath></ns2:ResourcePath>
    <ns2:OAuthGrantDefaultResource>true</ns2:OAuthGrantDefaultResource>
    <ns2:OAuthGrantUserAuthorizationRequired>true</ns2:OAuthGrantUserAuthorizationRequired>
    <ns2:BusinessID>tenantbusiness.acmepaymentscorp</ns2:BusinessID>
  </ns2:Resource>
  <ns2:Resource>
    <ns2:ResourceID>c4e7f12c-7c78-4f48-b3ae-a54ead927c49.acmepaymentscorp</ns2:ResourceID>
    <ns2:Name>public-scope-2</ns2:Name>
    <ns2:ShortDescription>Scopes to be used for automation testing</ns2:ShortDescription>
    <ns2:LongDescription></ns2:LongDescription>
    <ns2:Visibility>Public</ns2:Visibility>
    <ns2:SandboxAnonymousAccessAllowed>false</ns2:SandboxAnonymousAccessAllowed>
    <ns2:ProductionAnonymousAccessAllowed>false</ns2:ProductionAnonymousAccessAllowed>
    <ns2:ResourcePath></ns2:ResourcePath>
    <ns2:OAuthGrantDefaultResource>true</ns2:OAuthGrantDefaultResource>
    <ns2:OAuthGrantUserAuthorizationRequired>true</ns2:OAuthGrantUserAuthorizationRequired>
    <ns2:BusinessID>tenantbusiness.acmepaymentscorp</ns2:BusinessID>
  </ns2:Resource>
  <ns2:Resource>
    <ns2:ResourceID>f48a34a7-3bc5-424e-9b90-886d41e7d286.acmepaymentscorp</ns2:ResourceID>
    <ns2:Name>ScopeOne3AB</ns2:Name>
    <ns2:ShortDescription>Scopes to be used for automation testing</ns2:ShortDescription>
    <ns2:LongDescription></ns2:LongDescription>
    <ns2:Visibility>Public</ns2:Visibility>
    <ns2:SandboxAnonymousAccessAllowed>false</ns2:SandboxAnonymousAccessAllowed>
    <ns2:ProductionAnonymousAccessAllowed>false</ns2:ProductionAnonymousAccessAllowed>
    <ns2:ResourcePath></ns2:ResourcePath>
    <ns2:OAuthGrantDefaultResource>true</ns2:OAuthGrantDefaultResource>
    <ns2:OAuthGrantUserAuthorizationRequired>true</ns2:OAuthGrantUserAuthorizationRequired>
    <ns2:BusinessID>tenantbusiness.acmepaymentscorp</ns2:BusinessID>
  </ns2:Resource>
  <ns2:Resource>
    <ns2:ResourceID>171a6c53-b42e-455f-b5eb-32792e6726a7.acmepaymentscorp</ns2:ResourceID>
    <ns2:Name>ScopeTwo3AB</ns2:Name>
    <ns2:ShortDescription>Scopes to be used for automation testing</ns2:ShortDescription>
    <ns2:LongDescription></ns2:LongDescription>
    <ns2:Visibility>Public</ns2:Visibility>
    <ns2:SandboxAnonymousAccessAllowed>false</ns2:SandboxAnonymousAccessAllowed>
    <ns2:ProductionAnonymousAccessAllowed>false</ns2:ProductionAnonymousAccessAllowed>
    <ns2:ResourcePath></ns2:ResourcePath>
    <ns2:OAuthGrantDefaultResource>true</ns2:OAuthGrantDefaultResource>
    <ns2:OAuthGrantUserAuthorizationRequired>true</ns2:OAuthGrantUserAuthorizationRequired>
    <ns2:BusinessID>tenantbusiness.acmepaymentscorp</ns2:BusinessID>
  </ns2:Resource>
  <AllAPIVisible>true</AllAPIVisible>
</APIVisibilityScope>

Back to top

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

Back to top

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.

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

Back to top

Related Topics