Generic REST Reference (Standard UI Driven)

Let's see a few REST API examples to configure for the orchestrated system.

Create Account API Request Response

To configure Create Account API, use the following example:

Create Account API Details

  • Name: Create User
  • Method: POST
  • URL: <target-system>/admin/v1/Users
  • Headers
    • Content-Type: application/json
    • Authorization: <<CREDENTIALS>>. The value <<CREDENTIALS>> is resolved at runtime using OCI Vault or User entered credentials configured in Integration Settings.
  • Request Body for REST API

    The schemas attribute shown in the example:

    {
      "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
      "userName": "<EL>attributes.get('name').get(0)</EL>",
      "name": {
        "givenName": "<EL>attributes.get('firstName').get(0)</EL>",
        "familyName": "<EL>attributes.get('lastName').get(0)</EL>"
      },
      "password": "<EL>attributes.get('password').get(0)</EL>",
      "emails": [
        {
          "value": "<EL>attributes.get('email').get(0)</EL>",
          "type": "work",
          "primary": true
        }
      ]
    }
  • Response
    {
      "items": "",
      "responseValues": [],
      "attributes": [
        {
          "name": "uid",
          "value": "<JP>$.id</JP>",
          "responseOfSubRequestId": null,
          "items": null,
          "subAttributes": []
        }
      ]
    }
    This API creates a target account and maps the returned identifier to the uid attribute.

Group Search API

Group Search Account API Details

  • Name: Group Search (Permission)
  • Method: POST
  • URL: <target-system>/admin/v1/Groups/.search
  • Headers
    • Content-Type: application/json
    • Authorization: <<CREDENTIALS>>. The value <<CREDENTIALS>> is resolved at runtime using OCI Vault or User entered credentials configured in Integration Settings.
  • Request Body for REST API

    Include the schemas attribute shown in the example:

    {
      "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:SearchRequest"
      ],
      "attributes": [
        "displayName",
        "externalId"
      ],
      "sortBy": "displayName",
      "startIndex": "UQ:<EL>currentOffset</EL>",
      "count": "UQ:<EL>limit</EL>"
    }
  • Response

    Using the JSON Editor, use the following response:

    {
      "items": "<JP>$.Resources[*]</JP>",
      "responseValues": [],
      "attributes": [
        {
          "name": "uid",
          "value": "<JP>$.Resources[<EL>currentIndex</EL>].id</JP>",
          "responseOfSubRequestId": null,
          "items": null,
          "subAttributes": []
        },
        {
          "name": "name",
          "value": "<JP>$.Resources[<EL>currentIndex</EL>].displayName</JP>",
          "responseOfSubRequestId": null,
          "items": null,
          "subAttributes": []
        }
      ]
    }

Country Lookup API

  • Name: Search Countries
  • Method: GET
  • URL: <target-system>/admin/v1/AllowedValues/countries
  • Headers
    • Content-Type: application/json
    • Authorization: <<CREDENTIALS>>. The value <<CREDENTIALS>> is resolved at runtime using OCI Vault or User entered credentials configured in Integration Settings.
  • Response

    Using the JSON Editor, use the following response:

    {
      "items": "<JP>$.attrValues[*]</JP>",
      "responseValues": [],
      "attributes": [
        {
          "name": "uid",
          "value": "<JP>$.attrValues[<EL>currentIndex</EL>].value</JP>",
          "responseOfSubRequestId": null,
          "items": null,
          "subAttributes": []
        },
        {
          "name": "name",
          "value": "<JP>$.attrValues[<EL>currentIndex</EL>].value</JP>",
          "responseOfSubRequestId": null,
          "items": null,
          "subAttributes": []
        }
      ]
    }

Add Group Membership API

  • Name: Add Group Membership
  • Method: PATCH
  • URL: <target-system>/admin/v1/Groups/<EL>attributes.get('groups').get('uid').get(0)</EL>
  • Headers
    • Content-Type: application/json
    • Authorization: <<CREDENTIALS>>. The value <<CREDENTIALS>> is resolved at runtime using OCI Vault or User entered credentials configured in Integration Settings.
  • Request

    Use the following request:

    {
      "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
      ],
      "Operations": [
        {
          "op": "add",
          "path": "members",
          "value": [
            {
              "value": "<EL>attributes.get('uid').get(0)</EL>",
              "type": "User"
            }
          ]
        }
      ]
    }
  • Response
    Using the JSON Editor, use the following response:
    Name: uid
    Value: <EL>attributes.get('uid').get(0)</EL>
    Or, use the JSON Editor
    {
      "items": "",
      "responseValues": [],
      "attributes": [
        {
          "name": "uid",
          "value": "<EL>attributes.get('uid').get(0)</EL>",
          "responseOfSubRequestId": null,
          "items": null,
          "subAttributes": []
        }
      ]
    }

Delete Account API

  • Name: Delete Account API
  • Method: DELETE
  • URL: <target-system>/admin/v1/Users/<EL>attributes.get('uid').get(0)</EL>
  • Headers
    • Content-Type: application/json
    • Authorization: <<CREDENTIALS>>. The value <<CREDENTIALS>> is resolved at runtime using OCI Vault or User entered credentials configured in Integration Settings.
  • Parameter: forceDelete: true
  • Response

    Use the following response:

    Name: uid
    Value: <EL>attributes.get('uid').get(0)</EL>
    Or, use the JSON Editor
    {
      "items": "",
      "responseValues": [],
      "attributes": [
        {
          "name": "uid",
          "value": "<EL>attributes.get('uid').get(0)</EL>",
          "responseOfSubRequestId": null,
          "items": null,
          "subAttributes": []
        }
      ]
    }