Create an App Resource

The following example shows how to create an app resource by submitting a POST request on the REST resource using cURL. 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/AppResources

Note:

Replace{{appid}} placeholder with the app id from the app creation response.

Example of Request Body

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

{
    "schemas": [
        "urn:ietf:params:scim:schemas:oracle:idcs:AppResource"
    ],
    "name": "My Resource",
    "resourceURL": "http://google.com",
    "isRegex": false,
    "description": "My resource url content",
    "app": {
        "value": "{{appid}}"
    }
}

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"
    },
    "description": "My resource url content",
    "idcsCreatedBy": {
        "type": "User",
        "display": "admin opc",
        "value": "bf11562fd0dd4fda85fde3690b104dd3",
        "$ref": "https://tenant-base-url/admin/v1/Users/bf11562fd0dd4fda85fde3690b104dd3"
    },
    "resourceURL": "http://google.com",
    "id": "64eb6207fbdd45b3807f857c69b52bc9",
    "isRegex": false,
    "meta": {
        "created": "2018-10-21T12:12:30.130Z",
        "lastModified": "2018-10-21T12:12:30.130Z",
        "resourceType": "AppResource",
        "location": "https://tenant-base-url/admin/v1/AppResources/64eb6207fbdd45b3807f857c69b52bc9"
    },
    "name": "My Resource",
    "app": {
        "value": "23b7bf0f79854002b2db81b808e6a54b",
        "display": "Enterprise App",
        "$ref": "https://tenant-base-url/admin/v1/Apps/23b7bf0f79854002b2db81b808e6a54b"
    },
    "schemas": [
        "urn:ietf:params:scim:schemas:oracle:idcs:AppResource"
    ]
}