Create an authorization token

post

/api/v1/token

This API will be used to pass the access key and secret key obtained through the tenant Oracle CASB Cloud Service UI. The response will contain a tenant ID and authorization token, which must be used as an authorization header in public API calls. The token has an expiration time.

Request

Supported Media Types
Body ()
Authorization token create request body will have both an access key and a secret key.
Root Schema : ApiAccessSecretKey
Type: object
Show Source
Back to Top

Response

Supported Media Types

201 Response

Successfully created authorization token.
Body ()
Root Schema : ApiToken
Type: object
Show Source

400 Response

Bad request format. Check the response for more information on which fields are inaccurate. Ensure that you have a request which follows the format.
Body ()
Root Schema : Response
Type: object
Show Source
Nested Schema : entity
Type: object
Nested Schema : metadata
Type: object
Additional Properties Allowed
Show Source
Nested Schema : additionalProperties
Type: array
Show Source
Nested Schema : items
Type: object

401 Response

Unauthorized get API call. See response for more details.
Body ()
Root Schema : Response
Type: object
Show Source
Nested Schema : entity
Type: object
Nested Schema : metadata
Type: object
Additional Properties Allowed
Show Source
Nested Schema : additionalProperties
Type: array
Show Source
Nested Schema : items
Type: object

403 Response

Creating an authorization token request is forbidden. It is likely that the Oracle CASB Cloud Service APIs aren???t enabled for the tenant.
Body ()
Root Schema : Response
Type: object
Show Source
Nested Schema : entity
Type: object
Nested Schema : metadata
Type: object
Additional Properties Allowed
Show Source
Nested Schema : additionalProperties
Type: array
Show Source
Nested Schema : items
Type: object

404 Response

Resource requested(instance ID) is not present
Body ()
Root Schema : Response
Type: object
Show Source
Nested Schema : entity
Type: object
Nested Schema : metadata
Type: object
Additional Properties Allowed
Show Source
Nested Schema : additionalProperties
Type: array
Show Source
Nested Schema : items
Type: object

500 Response

Internal Server error occurred. See response for more details.
Body ()
Root Schema : Response
Type: object
Show Source
Nested Schema : entity
Type: object
Nested Schema : metadata
Type: object
Additional Properties Allowed
Show Source
Nested Schema : additionalProperties
Type: array
Show Source
Nested Schema : items
Type: object
Back to Top

Examples

The following example shows how to retrieve an API token by submitting a GET request.

Example Request Body

{
  "accessKey": "BLHZKSBNTO7DIYRB3DRQ",
  "accessSecret": uQHUJdDrb08png%7K2guKbADYKnZKz05xke9LjTlEs 
}

Example Response Body: Success

The following example shows the contents of the response body in JSON format:

{
  "accessToken" : "...",
  "tenantId" : "abcdefgh-1234-ijkl-5678-mnopqrstuvwx",
  "expiresAt" : "2017-09-11T00:19:24Z"
}

Example Response Body: Failure

The following example shows the contents of the response body in JSON format:

{
  "runtime-response": {
    "status": 200,
    "message": "No existing keys found for tenant",
    "action-arg": [
      {
        "name": "accessKey"
      }
    ]
  }
}
Back to Top