GET /oauth/admin/grants/{GrantID}

Returns detailed information about the specified OAuth grant, including the list of scopes.

Authorization Roles/Permissions: Must be the resource owner, provider admin, or client admin. Authentication cookie is required.

This topic includes the following sections:

HTTP Method

GET

Back to top

URL

https://{oauth-provider-url}/oauth/admin/grants/{GrantID}

Back to top

Sample Request

The example below shows a request for the grant details for the specified grant.

Request URL

https://{oauth-provider-url}/oauth/admin/grants/udejlge35gg2

Sample request headers

Host: {oauth-provider-hostname}
Accept: application/json
Cookie: OAuthToken_{OAuthProviderName}

Sample request body

Not applicable.

Back to top

Request Headers

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

Header Description
Accept application/xml, application/json
OAuthToken_{OAuthProviderName} The OAuth cookie that identifies the logged-in user with the provider. Depending on the operation being used and the context, the authenticated user could be the resource owner, the administrator, the client app administration, or the OAuth Provider. The cookie is returned after logging in with the POST /oauth/login operation.

Back to top

Request Parameters

Parameter Parm Type Data Type Required Description
GrantID Path string Required The unique ID for a specific instance of an OAuth grant.

Back to top

Response

If successful, this operation returns HTTP status code 200, with the grant details.

Back to top

Sample Response

The sample response below shows successful completion of this operation.

Sample response headers: application/json

Status Code: 200 OK
Content-Type: application/json
Expires: Wed, 26 Aug 2015 15:55:38 GMT

Sample response body: application/json

{
  "GrantID" : "c1gnja6hkvr6",
  "GrantProvider" : "OAuthAutomationacmepaymentscorp",
  "GrantType" : "authorization_code",
  "OpenIdConnectGrant" : false,
  "GrantStatus" : "Cancelled",
  "GrantExpirationDateTime" : 1441918216000,
  "GrantExpirationDateTimeInMillis" : 1441918216000,
  "GrantClient" : {
    "ClientID" : "acmepaymentscorp-2oU1RtQxoS97NXPwe7fQmYAY"
  },
  "GrantClientRedirectUri" : "http://acmepaymentscorp.com:9900/",
  "ResourceOwnerUserInfo" : {
    "DomainName" : "Ldapacmepaymentscorp",
    "UID" : "eng99"
  },
  "GrantResourceScope" : {
    "Resource" : [ {
      "Name" : "Scope1"
    } ]
  },
  "GrantIssuedDateTime" : 1440622216000,
  "GrantIssuedDateTimeInMillis" : 1440622216000,
  "GrantUpdatedDateTime" : 1440622217000,
  "GrantUpdatedDateTimeInMillis" : 1440622217000,
  "ResponseType" : "code"
}

Sample response headers: application/xml

Status Code: 200 OK
Content-Type: application/xml
Expires: Wed, 26 Aug 2015 15:57:25 GMT

Sample response body: application/xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns3:Grant xmlns:ns2="http://soa.com/xsd/rss/1.0" xmlns:ns3="http://soa.com/xsd/oauth/1.0" 
xmlns:ns4="http://soa.com/binding/http">
  <ns3:GrantID>c1gnja6hkvr6</ns3:GrantID>
  <ns3:GrantProvider>OAuthAutomationacmepaymentscorp</ns3:GrantProvider>
  <ns3:GrantType>authorization_code</ns3:GrantType>
  <ns3:OpenIdConnectGrant>false</ns3:OpenIdConnectGrant>
  <ns3:GrantStatus>Cancelled</ns3:GrantStatus>
  <ns3:GrantExpirationDateTime xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:dateTime">2015-09-10T20:50:16Z</ns3:GrantExpirationDateTime>
  <ns3:GrantExpirationDateTimeInMillis>1441918216000</ns3:GrantExpirationDateTimeInMillis>
  <ns3:GrantClient>
    <ns3:ClientID>acmepaymentscorp-2oU1RtQxoS97NXPwe7fQmYAY</ns3:ClientID>
  </ns3:GrantClient>
  <ns3:GrantClientRedirectUri>http://acmepaymentscorp.com:9900/</ns3:GrantClientRedirectUri>
  <ns3:ResourceOwnerUserInfo>
    <ns3:DomainName>Ldapacmepaymentscorp</ns3:DomainName>
    <ns3:UID>eng99</ns3:UID>
  </ns3:ResourceOwnerUserInfo>
  <ns3:GrantResourceScope>
    <ns3:Resource>
      <ns3:Name>Scope1</ns3:Name>
    </ns3:Resource>
  </ns3:GrantResourceScope>
  <ns3:GrantIssuedDateTime xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" 
xsi:type="xs:dateTime">2015-08-26T20:50:16Z</ns3:GrantIssuedDateTime>
  <ns3:GrantIssuedDateTimeInMillis>1440622216000</ns3:GrantIssuedDateTimeInMillis>
  <ns3:GrantUpdatedDateTime xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" 
xsi:type="xs:dateTime">2015-08-26T20:50:17Z</ns3:GrantUpdatedDateTime>
  <ns3:GrantUpdatedDateTimeInMillis>1440622217000</ns3:GrantUpdatedDateTimeInMillis>
  <ns3:ResponseType>code</ns3:ResponseType>
</ns3:Grant>

Back to top

Response Headers

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

Header Description
Content-Type application/xml, application/json

Back to top

Response Body

Name Type Description
Grant Grant Contains information about an OAuth grant.

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 OAuthToken_{OAuthProviderName} cookie, or if you included an invalid cookie.
500 An error occurred processing the call.

More information about Akana OAuth API error messages.

Back to top

Related Topics