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
Body ()
Root Schema : CreateServiceAccountRequest
Match All
Show Source
Nested Schema : ServiceAccountIdentity
Type: object
Show Source
Nested Schema : ServiceAccountDef
Type: object
Show Source
Nested Schema : configuration
Type: object
The service account's configuration.
Show Source
Nested Schema : grant
Type: object
The OAuth grant
Show Source
Back to Top

Response

Supported Media Types

201 Response

The service account was created.
Body ()
Root Schema : ServiceAccountId
Type: object
Show Source

400 Response

Bad request, indicates a problem with the input parameters.
Body ()
Root Schema : Error
Type: object
Show Source
Nested Schema : errorDetails
Type: array
additional errors
Show Source

403 Response

Forbidden.
Body ()
Root Schema : Error
Type: object
Show Source
Nested Schema : errorDetails
Type: array
additional errors
Show Source

500 Response

Unexpected error.
Body ()
Root Schema : Error
Type: object
Show Source
Nested Schema : errorDetails
Type: array
additional errors
Show Source
Back to Top

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"
}
Back to Top