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
-
label(required): string
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'.
The application object created or updated in Oracle Field Service.
Root Schema : Application
Type:
object
Title:
Show Source
Application
-
allowedCorsDomains:
array 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. -
IPAddressesToAllow(required):
array 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. -
name(required):
string
Title:
Name
Minimum Length:1
Maximum Length:255
The name of the application. -
resourcesToAllow(required):
array 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). -
status(required):
string
Title:
Status
Allowed Values:[ "active", "inactive" ]
The status of the application. -
tokenService(required):
string
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
-
Array of:
string
Maximum Length:
253
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
-
Array of:
object Resources To Allow
Title:
Resources To Allow
Nested Schema : Resources To Allow
Type:
object
Title:
Show Source
Resources To Allow
-
resourceId:
string
The resource external ID of the resource that is specified in the resourcesToAllow parameter.
-
resourceInternalId:
integer
The resource internal ID of the resource that is specified in the resourcesToAllow parameter.
Response
Supported Media Types
- application/json
- application/schema+json
200 Response
This section describes the 200 status response for this operation.
Root Schema : Application
Type:
object
Title:
Show Source
Application
-
allowedCorsDomains:
array 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. -
IPAddressesToAllow:
array 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. -
label:
string
Title:
Label
Minimum Length:1
Maximum Length:255
The label of the application. -
name:
string
Title:
Name
Minimum Length:1
Maximum Length:255
The name of the application. -
resourcesToAllow:
array 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). -
status:
string
Title:
Status
Allowed Values:[ "active", "inactive" ]
The status of the application. -
tokenService:
string
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
-
Array of:
string
Maximum Length:
253
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
-
Array of:
object Resources To Allow
Title:
Resources To Allow
Nested Schema : Resources To Allow
Type:
object
Title:
Show Source
Resources To Allow
-
resourceId:
string
The resource external ID of the resource that is specified in the resourcesToAllow parameter.
-
resourceInternalId:
integer
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.
Root Schema : Application
Type:
object
Title:
Show Source
Application
-
allowedCorsDomains:
array 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. -
IPAddressesToAllow:
array 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. -
label:
string
Title:
Label
Minimum Length:1
Maximum Length:255
The label of the application. -
name:
string
Title:
Name
Minimum Length:1
Maximum Length:255
The name of the application. -
resourcesToAllow:
array 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). -
status:
string
Title:
Status
Allowed Values:[ "active", "inactive" ]
The status of the application. -
tokenService:
string
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
-
Array of:
string
Maximum Length:
253
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
-
Array of:
object Resources To Allow
Title:
Resources To Allow
Nested Schema : Resources To Allow
Type:
object
Title:
Show Source
Resources To Allow
-
resourceId:
string
The resource external ID of the resource that is specified in the resourcesToAllow parameter.
-
resourceInternalId:
integer
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.
Root Schema : Error
Type:
Show Source
object
-
detail:
string
The detailed description of this error.
-
status:
string
The HTTP status code of this error.
-
title(required):
string
The brief description of this error.
-
type(required):
string
The URL of the web page containing more details about this error.
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" } ] }