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:

  1. Removes all the current work skills (by changing the end date of the work skill to a past date) for the specified resource.
  2. Updates the work skills according to the parameters specified in the request.
  3. Returns the updated work skills and the deleted work skills.

    Request

    Path Parameters
    Body ()
    Root Schema : Work Skills
    Type: array
    Title: Work Skills
    An array of objects containing the work skills of the resource.
    Show Source
    Nested Schema : Work Skill
    Type: object
    Title: Work Skill
    Show Source
    • Title: End Date
      The date until when the work skill is effective. Specify the date in 'YYYY-MM-DD' format.
    • Title: Ratio
      Minimum Value: 0
      Maximum Value: 100
      The skill level of the resource.
    • Title: Start Date
      The date when the work skill takes effect. Specify the date in 'YYYY-MM-DD' format.
    • Title: Work Skill Label
      Maximum Length: 40
      The label of the work skill.
    Back to Top

    Response

    Supported Media Types

    200 Response

    This section describes the 200 status response for this operation.
    Body ()
    Root Schema : Work Skills
    Type: object
    Title: Work Skills
    The collection of resource work skill items.
    Show Source
    Nested Schema : Items
    Type: array
    Title: Items
    An array of objects containing the details of the work skills of the resource.
    Show Source
    Nested Schema : Work Skill
    Type: object
    Title: Work Skill
    Show Source
    • Title: End Date
      The date until when the work skill is effective. Specify the date in 'YYYY-MM-DD' format.
    • Title: Ratio
      Minimum Value: 0
      Maximum Value: 100
      The skill level of the resource.
    • Title: Start Date
      The date when the work skill takes effect. Specify the date in 'YYYY-MM-DD' format.
    • Title: Work Skill Label
      Maximum Length: 40
      The label of the work skill.

    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 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"
            }
        ]
    }
    Back to Top