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
- application/json
Authorization token create request body will have both an access key and a secret key.
Root Schema : ApiAccessSecretKey
Type:
Show Source
object
-
accessKey:
string
The access key.
-
accessSecret:
string
The secret key associated with the access key.
Response
Supported Media Types
- application/json
- application/gzip
201 Response
Successfully created authorization token.
Root Schema : ApiToken
Type:
Show Source
object
-
accessToken(optional):
string
The generated accessToken which must be used for REST API requests.
-
expiresAt(optional):
string
The expiration date and time for the access token, after which the token will no longer be valid.
-
tenantId(optional):
string
The tenant ID for which the access token is generated.
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.
Root Schema : Response
Type:
Show Source
object
-
entity(optional):
object entity
-
metadata(optional):
object metadata
Additional Properties Allowed: additionalProperties
-
status(optional):
integer(int32)
Nested Schema : entity
Type:
object
Nested Schema : items
Type:
object
401 Response
Unauthorized get API call. See response for more details.
Root Schema : Response
Type:
Show Source
object
-
entity(optional):
object entity
-
metadata(optional):
object metadata
Additional Properties Allowed: additionalProperties
-
status(optional):
integer(int32)
Nested Schema : entity
Type:
object
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.
Root Schema : Response
Type:
Show Source
object
-
entity(optional):
object entity
-
metadata(optional):
object metadata
Additional Properties Allowed: additionalProperties
-
status(optional):
integer(int32)
Nested Schema : entity
Type:
object
Nested Schema : items
Type:
object
404 Response
Resource requested(instance ID) is not present
Root Schema : Response
Type:
Show Source
object
-
entity(optional):
object entity
-
metadata(optional):
object metadata
Additional Properties Allowed: additionalProperties
-
status(optional):
integer(int32)
Nested Schema : entity
Type:
object
Nested Schema : items
Type:
object
500 Response
Internal Server error occurred. See response for more details.
Root Schema : Response
Type:
Show Source
object
-
entity(optional):
object entity
-
metadata(optional):
object metadata
Additional Properties Allowed: additionalProperties
-
status(optional):
integer(int32)
Nested Schema : entity
Type:
object
Nested Schema : items
Type:
object
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"
}
]
}
}