Create a Service Account
post
/apiplatform/management/v1/serviceaccounts
Creates a Service Account.
Users requesting this resource must be assigned the Service Manager role.
Request
Supported Media Types
- application/json
Nested Schema : ServiceAccountIdentity
Type:
Show Source
object
-
name:
string
The service account's name.
Nested Schema : ServiceAccountDef
Type:
Show Source
object
-
configuration(optional):
object configuration
The service account's configuration.
-
description(optional):
string
The service account's description.
-
type(optional):
string
The type of service account, either
Basic
orOAuth
orWSSUsername
.
Nested Schema : configuration
Type:
object
The service account's configuration.
Show Source
-
clientId(optional):
string
The client ID.
-
clientSecret(optional):
string
The client secret. On read, the client secret is replaced by the client secret key.
-
grant(optional):
object grant
The OAuth grant
-
password(optional):
string
The password. On read, the password is replaced by the password key.
-
scopes(optional):
string
Optional scopes.
-
tokenEndpointUrl(optional):
string
The token endpoint URL.
-
tokenTransferOption(optional):
string
The service account's description.
-
username(optional):
string
The username.
Nested Schema : grant
Type:
object
The OAuth grant
Show Source
-
password(optional):
string
The password. On read, the password is replaced by the password key.
-
type(optional):
string
The grant type, either
ClientCredentials
orResourceOwnerCredentials
. -
username(optional):
string
The username.
Response
Supported Media Types
- application/json
201 Response
The service account was created.
400 Response
Bad request, indicates a problem with the input parameters.
Root Schema : Error
Type:
Show Source
object
-
detail(optional):
string
Detailed error message
-
errorCode(optional):
string
Application specific error code
-
errorDetails(optional):
array errorDetails
additional errors
-
errorPath(optional):
string
-
instance(optional):
string
URI to the link that provides more detail about the error
-
status(optional):
string
HTTP status code
-
title:
string
Summary error message
-
type:
string
Error type
403 Response
Forbidden.
Root Schema : Error
Type:
Show Source
object
-
detail(optional):
string
Detailed error message
-
errorCode(optional):
string
Application specific error code
-
errorDetails(optional):
array errorDetails
additional errors
-
errorPath(optional):
string
-
instance(optional):
string
URI to the link that provides more detail about the error
-
status(optional):
string
HTTP status code
-
title:
string
Summary error message
-
type:
string
Error type
500 Response
Unexpected error.
Root Schema : Error
Type:
Show Source
object
-
detail(optional):
string
Detailed error message
-
errorCode(optional):
string
Application specific error code
-
errorDetails(optional):
array errorDetails
additional errors
-
errorPath(optional):
string
-
instance(optional):
string
URI to the link that provides more detail about the error
-
status(optional):
string
HTTP status code
-
title:
string
Summary error message
-
type:
string
Error type
Examples
The following example shows how to create a service account by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL
curl -i -X POST
-H "Authorization: Bearer access_token"
-H "Content-Type:application/json"
-d @servicesacc-post.json
https://example.com/apiplatform/management/v1/serviceaccounts
Example of Request Body
The following shows an example of the request body, included with the request above in a file named servicesacc-post.json
.
{ "name": "basic", "description": "canned service account", "type": "Basic", "configuration": { "username": "foo", "password": "bar" } }
Example of Response Headers
The following shows an example of the response headers.
HTTP/1.1 201 Created Server: Oracle-Traffic-Director/12.2.1.0.0 Date: Wed, 26 Jul 2017 17:10:11 GMT Content-Length: 12 Content-type: application/json X-oracle-dms-ecid: kKFfG1P0000000000 X-oracle-dms-rid: 0:1 Via: 1.1 otd_opc-config Proxy-agent: Oracle-Traffic-Director/12.2.1.2.0
Example of Response Body
The following example shows the contents of the response body in JSON format, including the ID of the created service account.
{ "id": "100" }