Create or update an application

put

/rest/ofscMetadata/v1/applications/{label}

This operation creates a new application with the configuration settings or updates the configuration settings of an existing application.

Request

Path Parameters
  • Minimum Length: 1
    Maximum Length: 255
    The label of the application that is used in the request URL to create a new application or update an existing application.

    The label must contain:

    • Lowercase alphanumeric characters and underscore [a-z0-9_].
    • Must start with an alphabetic character [a-z].

    Uppercase characters and unicode characters cannot be used for creating an application. For example 'test_app' is valid, but the following values are not valid: '123_test', 'TEST_APP', 'test-app'.

Body ()
The application object created or updated in Oracle Field Service.
Root Schema : Application
Type: object
Title: Application
Show Source
  • Allowed CORS Domains List
    Title: Allowed CORS Domains List
    Maximum Number of Items: 100
    The list of origin domains which are allowed to send requests to Oracle Field Service REST API. The max size of a value is 1020 symbols or 100 domain entries.
  • IP Addresses To Allow
    Title: IP Addresses To Allow
    The IP addresses accessible to the application. If no IP address is specified, then all IP addresses are accessible.
  • Title: Name
    Minimum Length: 1
    Maximum Length: 255
    The name of the application.
  • Resources To Allow
    Title: Resources To Allow
    The resourceInternalIds and resourceIds (external IDs) of resources accessible to the application. The parameter includes all the children of a specified resource. If the resourceInternalIds and resourceIds (external IDs) of resources are not specified, then the parameter allows the application to access the root resource. If both resourceId and resourceInternalId are used in the request parameter, then the application considers the resourceID (unless it is empty).
  • Title: Status
    Allowed Values: [ "active", "inactive" ]
    The status of the application.
  • Title: Token Service
    Allowed Values: [ "ofsc", "external", "idcs" ]
    The token service used by the application.
Nested Schema : Allowed CORS Domains List
Type: array
Title: Allowed CORS Domains List
Maximum Number of Items: 100
The list of origin domains which are allowed to send requests to Oracle Field Service REST API. The max size of a value is 1020 symbols or 100 domain entries.
Show Source
Nested Schema : IP Addresses To Allow
Type: array
Title: IP Addresses To Allow
The IP addresses accessible to the application. If no IP address is specified, then all IP addresses are accessible.
Show Source
Nested Schema : Resources To Allow
Type: array
Title: Resources To Allow
The resourceInternalIds and resourceIds (external IDs) of resources accessible to the application. The parameter includes all the children of a specified resource. If the resourceInternalIds and resourceIds (external IDs) of resources are not specified, then the parameter allows the application to access the root resource. If both resourceId and resourceInternalId are used in the request parameter, then the application considers the resourceID (unless it is empty).
Show Source
Nested Schema : Resources To Allow
Type: object
Title: Resources To Allow
Show Source
  • The resource external ID of the resource that is specified in the resourcesToAllow parameter.
  • The resource internal ID of the resource that is specified in the resourcesToAllow parameter.
Back to Top

Response

Supported Media Types

200 Response

This section describes the 200 status response for this operation.
Body ()
Root Schema : Application
Type: object
Title: Application
Show Source
  • Allowed CORS Domains List
    Title: Allowed CORS Domains List
    Maximum Number of Items: 100
    The list of origin domains which are allowed to send requests to Oracle Field Service REST API. The max size of a value is 1020 symbols or 100 domain entries.
  • IP Addresses To Allow
    Title: IP Addresses To Allow
    The specified IP addresses accessible to the application. If no IP address is specified, then all IP addresses are accessible.
  • Title: Label
    Minimum Length: 1
    Maximum Length: 255
    The label of the application.
  • Title: Name
    Minimum Length: 1
    Maximum Length: 255
    The name of the application.
  • Resources To Allow
    Title: Resources To Allow
    The specified resourceInternalIds and resourceIds (external IDs) of resources accessible to the application. The parameter includes all the children of the specified resource. If the resourceInternalIds and resourceIds (external IDs) of resources are not specified, then the application accesses the root resource. If resourceId and resourceInternalId are used in the request parameter, then the application considers the resourceID (unless it is empty).
  • Title: Status
    Allowed Values: [ "active", "inactive" ]
    The status of the application.
  • Title: Token Service
    Allowed Values: [ "ofsc", "external", "idcs" ]
    The token service used by the application.
Nested Schema : Allowed CORS Domains List
Type: array
Title: Allowed CORS Domains List
Maximum Number of Items: 100
The list of origin domains which are allowed to send requests to Oracle Field Service REST API. The max size of a value is 1020 symbols or 100 domain entries.
Show Source
Nested Schema : IP Addresses To Allow
Type: array
Title: IP Addresses To Allow
The specified IP addresses accessible to the application. If no IP address is specified, then all IP addresses are accessible.
Show Source
Nested Schema : Resources To Allow
Type: array
Title: Resources To Allow
The specified resourceInternalIds and resourceIds (external IDs) of resources accessible to the application. The parameter includes all the children of the specified resource. If the resourceInternalIds and resourceIds (external IDs) of resources are not specified, then the application accesses the root resource. If resourceId and resourceInternalId are used in the request parameter, then the application considers the resourceID (unless it is empty).
Show Source
Nested Schema : Resources To Allow
Type: object
Title: Resources To Allow
Show Source
  • The resource external ID of the resource that is specified in the resourcesToAllow parameter.
  • The resource internal ID of the resource that is specified in the resourcesToAllow parameter.

201 Response

This code is returned if an existing application is created. Returns the application object.
Body ()
Root Schema : Application
Type: object
Title: Application
Show Source
  • Allowed CORS Domains List
    Title: Allowed CORS Domains List
    Maximum Number of Items: 100
    The list of origin domains which are allowed to send requests to Oracle Field Service REST API. The max size of a value is 1020 symbols or 100 domain entries.
  • IP Addresses To Allow
    Title: IP Addresses To Allow
    The specified IP addresses accessible to the application. If no IP address is specified, then all IP addresses are accessible.
  • Title: Label
    Minimum Length: 1
    Maximum Length: 255
    The label of the application.
  • Title: Name
    Minimum Length: 1
    Maximum Length: 255
    The name of the application.
  • Resources To Allow
    Title: Resources To Allow
    The specified resourceInternalIds and resourceIds (external IDs) of resources accessible to the application. The parameter includes all the children of the specified resource. If the resourceInternalIds and resourceIds (external IDs) of resources are not specified, then the application accesses the root resource. If resourceId and resourceInternalId are used in the request parameter, then the application considers the resourceID (unless it is empty).
  • Title: Status
    Allowed Values: [ "active", "inactive" ]
    The status of the application.
  • Title: Token Service
    Allowed Values: [ "ofsc", "external", "idcs" ]
    The token service used by the application.
Nested Schema : Allowed CORS Domains List
Type: array
Title: Allowed CORS Domains List
Maximum Number of Items: 100
The list of origin domains which are allowed to send requests to Oracle Field Service REST API. The max size of a value is 1020 symbols or 100 domain entries.
Show Source
Nested Schema : IP Addresses To Allow
Type: array
Title: IP Addresses To Allow
The specified IP addresses accessible to the application. If no IP address is specified, then all IP addresses are accessible.
Show Source
Nested Schema : Resources To Allow
Type: array
Title: Resources To Allow
The specified resourceInternalIds and resourceIds (external IDs) of resources accessible to the application. The parameter includes all the children of the specified resource. If the resourceInternalIds and resourceIds (external IDs) of resources are not specified, then the application accesses the root resource. If resourceId and resourceInternalId are used in the request parameter, then the application considers the resourceID (unless it is empty).
Show Source
Nested Schema : Resources To Allow
Type: object
Title: Resources To Allow
Show Source
  • The resource external ID of the resource that is specified in the resourcesToAllow parameter.
  • The resource internal ID of the resource that is specified in the resourcesToAllow parameter.

Default Response

This section describes the default error response for this operation.
Body ()
Root Schema : Error
Type: object
Show Source
Back to Top

Examples

The following example shows how to create/update an application item by submitting a PUT request on the REST resource using cURL:

cURL command Example

curl -u 'clientId@instance:clientSecret' \
 -X PUT \
 --url https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/applications/test_app \
 --data-binary '{
    "name": "test1",
    "status": "active",
    "tokenService": "ofsc", 
    "resourcesToAllow": [
                { "resourceId":"resourceExternalId1", "resourceInternalId":12 },
                { "resourceId":"resourceExternalId2", "resourceInternalId":123 },
                { "resourceId":"resourceExternalId3", "resourceInternalId":127 }
            ],
    "IPAddressesToAllow": ["10.321.112","10.321.112"],
    "allowedCorsDomains": ["https://best.customer.01.dot.com", "https://example.com"]
}'

Response Header Example

The following shows an example of the response header.

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

Response Body Example

The following shows an example of the response body in JSON format.

{
    "label": "test_app",
    "name": "test1",
    "status": "active",
    "tokenService": "ofsc",
    "resourcesToAllow": [
                { "resourceId":"resourceExternalId1", "resourceInternalId":12 },
                { "resourceId":"resourceExternalId2", "resourceInternalId":123 },
                { "resourceId":"resourceExternalId3", "resourceInternalId":127 }
    ],
    "IPAddressesToAllow": ["10.321.112","10.321.112"],
    "allowedCorsDomains": ["https://best.customer.01.dot.com", "https://example.com"],
    "links": [
        {
            "rel" : "canonical",
            "href" : "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/application/test_app"
        },
        {
            "rel" : "apiAccess",
            "href" : "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/application/test_app/apiAccess"
        }
    ]
}
Back to Top