Response Body

Oracle Identity Cloud Service REST API requests return a JSON response body. The status code indicates success or failure.

Response Body on Success

Note:

See Response Codes for more information on the supported response codes.

The response format for all REST API requests is a JSON object. The exact contents of the response depends on the contents and type of request, whether the request succeeded or failed, and any query filtering that was performed.

Note:

See the Examples tab on each endpoint page for specific response body examples.

Example - Example of a Successful POST Response Body

The following is an example response indicating successful creation of a User resource with a POST request:

{
  "displayName": "Barbara Jensen",
  "name": {
    "givenName": "Barbara",
    "formatted": "Barbara Jane Jensen",
    "middleName": "Jane",
    "familyName": "Jensen"
  },
  "urn:ietf:params:scim:schemas:oracle:idcs:extension:userState:User": {
    "locked": {
      "on": false
    }
  },
  "userName": "bjensen@example.com",
  "id": "b701950376d64b39baa3c1141ba2c2df",
  "active": true,
  "emails": [
    {
      "value": "bjensen@example.com",
      "type": "recovery"
    },
    {
      "primary": true,
      "value": "bjensen@example.com",
      "type": "work"
    }
  ],
  "schemas": [
    "urn:ietf:params:scim:schemas:oracle:idcs:extension:userState:User",
    "urn:ietf:params:scim:schemas:core:2.0:User"
  ],
  "meta": {
    "resourceType": "User",
    "created": "Mar 14, 2016 10:24:42 PM UTC",
    "lastModified": "Mar 14, 2016 10:24:42 PM UTC",
    "location": "http://tenant-base-url/admin/v1/Users/b701950376d64b39baa3c1141ba2c2df"
  },
  "idaasCreatedBy": {
    "value": "f8fa30db0f5f41f98de00bc07c05a73d",
    "$ref": "/OAuthClients/f8fa30db0f5f41f98de00bc07c05a73d",
    "type": "OAuthClient",
    "display": "admin"
  }
}

Example - Example of a Successful GET Response Body

GET requests typically return a ListResponse object, which might contain multiple records. This example shows the results of a GET search on Tenants, with the query parameter: filter=name+co+"example", that is, tenants with names that contain example.

{
  "schemas": [
    "urn:scim:api:messages:2.0:ListResponse"
  ],
  "totalResults": 2,
  "Resources": [
    {
      "ldapBase": "orclMTTenantGuid=8473672795148315745,dc=us,dc=example,dc=com",
      "status": "enabled",
      "databaseSchema": "S_ORACLE",
      "name": "example",
      "id": "4a3d2ad260de400db851029f567d416f",
      "meta": {
        "created": "Apr 15, 2016 6:43:58 AM UTC",
        "lastModified": "Apr 15, 2016 6:43:58 AM UTC",
        "resourceType": "Tenant",
        "location": "http://tenant-base-url/admin/v1/Tenants/4a3d2ad260de400db851029f567d416f"
      },
      "schemas": [
        "urn:ietf:params:scim:schemas:oracle:idcs:Tenant"
      ],
      "idaasCreatedBy": {
        "value": "bootstrap-client",
        "display": "bootstrap-client",
        "type": "User",
        "$ref": "http://tenant-base-url/admin/v1/User/bootstrap-client"
      },
      "idaasLastModifiedBy": {
        "value": "bootstrap-client",
        "display": "bootstrap-client",
        "type": "User",
        "$ref": "http://tenant-base-url/admin/v1/User/bootstrap-client"
      }
    },
    {
      "ldapBase": "orclMTTenantGuid=5839865420013521092,dc=us,dc=example,dc=com",
      "status": "enabled",
      "databaseSchema": "S_CLOUDINFRA",
      "name": "exampleone",
      "id": "316f77ec308448919ed5b7f21dac8d31",
      "meta": {
        "created": "Apr 15, 2016 6:45:21 AM UTC",
        "lastModified": "Apr 15, 2016 6:45:21 AM UTC",
        "resourceType": "Tenant",
        "location": "http://tenant-base-url/admin/v1/Tenants/316f77ec308448919ed5b7f21dac8d31"
      },
      "schemas": [
        "urn:ietf:params:scim:schemas:oracle:idcs:Tenant"
      ],
      "idaasCreatedBy": {
        "value": "bootstrap-client",
        "display": "bootstrap-client",
        "type": "User",
        "$ref": "http://tenant-base-url/admin/v1/User/bootstrap-client"
      },
      "idaasLastModifiedBy": {
        "value": "bootstrap-client",
        "display": "bootstrap-client",
        "type": "User",
        "$ref": "http://tenant-base-url/admin/v1/User/bootstrap-client"
      }
    }
  ],
  "startIndex": 1,
  "itemsPerPage": 50
}

Simple Response Body on Error

On error, as well as on success, the response body is JSON. The format for all Oracle Identity Cloud Service REST API error responses is similar. This example is a simple exception detailing the status code and exception message for an invalid request.

{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error"
  ],
  "detail": "Request failed: HTTP 400 Bad Request.",
  "status": "400"
}

Example - Validation Exception Response Example

This example is a validation exception where some required attributes are missing.

{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error",
    "urn:ietf:params:scim:api:oracle:idcs:extension:messages:Error"
  ],
  "detail": "Missing required attribute(s): mappingAttributeValue,password.",
  "status": "400",
  "urn:ietf:params:scim:api:oracle:idcs:extension:messages:Error": {
    "messageId": "error.common.validation.missingReqAttributes"
  }
}

Example - Functional Exception Response Example

This example is a functional exception with additional details.

{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error",
    "urn:ietf:params:scim:api:oracle:idcs:extension:messages:Error"
  ],
  "detail": "INVALID_CREDENTIALS",
  "status": "400",
  "urn:ietf:params:scim:api:oracle:idcs:extension:messages:Error": {
    "additionalData": {
      "csr": false,
      "tenantName": "TENANT1",
      "id": "95512186b78b423ea9e3fe442a259179",
      "displayName": "Mickey Mouse",
      "locale": "en",
      "preferredLanguage": "en",
      "timezone": "America/Chicago"
    }
  }
}