Create Allow Authorization Policy Condition Group

The following example shows how to create a condition group to be evaluated by submitting a POST request on the REST resource using cURL. Condition groups are referenced from a Rule. For more information about cURL, see Use cURL.

cURL Command

Note:

The command in this example uses the URL structure https://tenant-base-url/resource-path, where tenant-base-url represents the Identity Service URL, and the resource path represents the Identity Service API. See Send Requests for the appropriate URL structure to use.
curl
-X POST
-H "Content-Type:application/scim+json"
-H "Authorization: Bearer <Access Token Value>"
https://tenant-base-url/admin/v1/ConditionGroups

Example of Request Body

The following shows an example of the request body in JSON format:

{  
   "name":"ConditionGroup",
   "operator":"and",
   "schemas":[  
      "urn:ietf:params:scim:schemas:oracle:idcs:ConditionGroup"
   ],
   "conditions":[  
      {  
         "value":"<group condition id>",
         "type":"Condition"
      },
      {  
         "value":"<user condition id>",
         "type":"Condition"
      },
      {  
         "value":"<admin role condition id>",
         "type":"Condition"
      },
      {  
         "value":"<network perimeter condition id>",
         "type":"Condition"
      }
   ]
}

Example of Response Body

The following example shows the contents of the response body in JSON format:

{
    "idcsLastModifiedBy": {
        "type": "User",
        "value": "bf11562fd0dd4fda85fde3690b104dd3",
        "display": "admin opc",
        "$ref": "https://tenant-base-url/admin/v1/Users/bf11562fd0dd4fda85fde3690b104dd3"
    },
    "idcsCreatedBy": {
        "type": "User",
        "display": "admin opc",
        "value": "bf11562fd0dd4fda85fde3690b104dd3",
        "$ref": "https://tenant-base-url/admin/v1/Users/bf11562fd0dd4fda85fde3690b104dd3"
    },
    "operator": "and",
    "id": "d073eb1df00f4b388fbb06430b70173e",
    "meta": {
        "created": "2018-10-21T15:29:51.218Z",
        "lastModified": "2018-10-21T15:29:51.218Z",
        "resourceType": "ConditionGroup",
        "location": "https://tenant-base-url/admin/v1/ConditionGroups/d073eb1df00f4b388fbb06430b70173e"
    },
    "name": "ConditionGroup",
    "conditions": [
        {
            "type": "Condition",
            "value": "c25d88b87320467da4467b2a12168cec",
            "$ref": "https://tenant-base-url/admin/v1/Conditions/c25d88b87320467da4467b2a12168cec"
        },
        {
            "type": "Condition",
            "value": "16a2cd31f0114adc856fadb06a18648c",
            "$ref": "https://tenant-base-url/admin/v1/Conditions/16a2cd31f0114adc856fadb06a18648c"
        },
        {
            "type": "Condition",
            "value": "e742c4b2a391451da6dfc42dfd8a4c7d",
            "$ref": "https://tenant-base-url/admin/v1/Conditions/e742c4b2a391451da6dfc42dfd8a4c7d"
        },
        {
            "type": "Condition",
            "value": "4d7afc63249943a3b6136876f30f7860",
            "$ref": "https://tenant-base-url/admin/v1/Conditions/4d7afc63249943a3b6136876f30f7860"
        }
    ],
    "schemas": [
        "urn:ietf:params:scim:schemas:oracle:idcs:ConditionGroup"
    ]
}