Set work skills
post
/rest/ofscCore/v1/resources/{resourceId}/workSkills
This operation updates the work skills for the specified resource. The operation does the following:
- Removes all the current work skills (by changing the end date of the work skill to a past date) for the specified resource.
- Updates the work skills according to the parameters specified in the request.
- Returns the updated work skills and the deleted work skills.
Request
Path Parameters
-
resourceId(required): string
The unique identifier of the resource in Oracle Field Service.
Root Schema : Work Skills
Type:
arrayTitle:
Work SkillsAn array of objects containing the work skills of the resource.
Show Source
-
Array of:
object Work Skill
Title:
Work Skill
Nested Schema : Work Skill
Type:
objectTitle:
Show Source
Work Skill-
endDate:
string
Title:
End DateThe date until when the work skill is effective. Specify the date in 'YYYY-MM-DD' format. -
ratio(required):
integer
Title:
RatioMinimum Value:0Maximum Value:100The skill level of the resource. -
startDate:
string
Title:
Start DateThe date when the work skill takes effect. Specify the date in 'YYYY-MM-DD' format. -
workSkill(required):
string
Title:
Work Skill LabelMaximum Length:40The label of the work skill.
Response
Supported Media Types
- application/json
200 Response
This section describes the 200 status response for this operation.
Root Schema : Work Skills
Type:
objectTitle:
Work SkillsThe collection of resource work skill items.
Show Source
-
items:
array Items
Title:
ItemsAn array of objects containing the details of the work skills of the resource. -
links(required):
array links
-
totalResults(required):
integer
Title:
Total ResultsThe total number of resources work skills returned.
Nested Schema : Items
Type:
arrayTitle:
ItemsAn array of objects containing the details of the work skills of the resource.
Show Source
-
Array of:
object Work Skill
Title:
Work Skill
Nested Schema : Work Skill
Type:
objectTitle:
Show Source
Work Skill-
endDate:
string
Title:
End DateThe date until when the work skill is effective. Specify the date in 'YYYY-MM-DD' format. -
ratio(required):
integer
Title:
RatioMinimum Value:0Maximum Value:100The skill level of the resource. -
startDate:
string
Title:
Start DateThe date when the work skill takes effect. Specify the date in 'YYYY-MM-DD' format. -
workSkill(required):
string
Title:
Work Skill LabelMaximum Length:40The label of the work skill.
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 set work skills for a resource by submitting a POST request on the REST resource.
cURL command Example
curl -X 'POST' -u '<CLIENT-ID>@<INSTANCE-NAME>:<CLIENT-SECRET>' -H 'Content-Type: application/json' --data-binary '[
{
"workSkill": "NP",
"ratio": 0,
"startDate": "2016-07-29"
},
{
"workSkill": "Routing",
"ratio": 100,
"startDate": "2016-07-29",
"endDate": "2016-07-29"
}
]' 'https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/resources/testResourceWorkSkilODCGTTRLFJ/workSkills'Example of Response Header
The following shows an example of the response header.
HTTP/1.1 200 OK Server: nginx/1.6.2 Date: Thu, 28 Jul 2016 11:29:02 GMT Content-Type: application/json; charset=utf-8 Connection: close Access-Control-Allow-Credentials: true Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE, PATCH Access-Control-Allow-Headers: DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization
Example of Response Body
The following example shows the contents of the response body in JSON format.
{
"items": [
{
"workSkill": "NP",
"ratio": 0,
"startDate": "2016-07-29"
},
{
"workSkill": "Routing",
"ratio": 100,
"startDate": "2016-07-29",
"endDate": "2016-07-29"
}
],
"totalResults": 2,
"links": [
{
"rel": "canonical",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/resources/testResourceWorkSkilODCGTTRLFJ/workSkills"
}
]
}