Create or update a capacity category
/rest/ofscMetadata/v1/capacityCategories/{label}
Request
-
label(required): string
Minimum Length:
1
Maximum Length:40
The label of the capacity category.
object
Capacity Category
-
active(required):
boolean
Title:
Active
Contains one of the following values: true or false.If true, then the active capacity categories are returned. If false, then the inactive capacity categories are returned. The default value is true.
-
label:
string
Title:
Label
Minimum Length:1
Maximum Length:40
The label of the capacity category. The label is returned by the GET operation and is ignored in the PUT operation. -
name:
string
Title:
Name
Minimum Length:1
Maximum Length:5000
The name of the capacity category in the user's language. The name is returned by the GET operation and is ignored in the PUT operation. -
timeSlots:
array Time Slots
Title:
Time Slots
The array of time slots objects. It is optional for the PUT operation. -
translations:
array Translations
Title:
Translations
The list of translations associated with the name of the capacity category.- The translations parameter is required in the PUT method for creating a capacity category, but the parameter is optional for updating a capacity category.
- If the parameter is not specified, then the translations in the response are not changed.
- The translation for the 'name' attribute must not be empty atleast for the default language.
-
workSkillGroups:
array Work Skill Groups
Title:
Work Skill Groups
The array of work skill group objects. It is optional for the PUT operation. -
workSkills:
array Work Skills
Title:
Work Skills
The array of work skill objects. It is optional for the PUT operation.
array
Time Slots
array
Translations
- The translations parameter is required in the PUT method for creating a capacity category, but the parameter is optional for updating a capacity category.
- If the parameter is not specified, then the translations in the response are not changed.
- The translation for the 'name' attribute must not be empty atleast for the default language.
array
Work Skill Groups
array
Work Skills
object
-
language(required):
string
This field contains language code of a text translation, it conatains two characters length code in responses (e.g. 'en', 'es') but can be used in requests as extended ISO code (e.g. 'en-US') as well as old two character format.
-
languageISO:
string
This field is used only in responses and returns ISO language code (e.g. 'en-US'). This field is ignored in the requests (use 'language' instead)
-
name(required):
string
object
-
label(required):
string
The label of the work skill group.
-
startDate:
string(date)
The start date of the work skill group. It is ignored in the PUT operation.
object
-
label(required):
string
The label of the work skill.
-
ratio(required):
integer
Minimum Value:
1
Maximum Value:100
The ratio used for assigning the work skill to a resource. -
startDate:
string(date)
The start date of the work skill. It is ignored in the PUT operation.
Response
- application/schema+json
- application/json
200 Response
object
Capacity Category
-
active(required):
boolean
Title:
Active
Contains one of the following values: true or false.If true, then the active capacity categories are returned. If false, then the inactive capacity categories are returned. The default value is true.
-
label:
string
Title:
Label
Minimum Length:1
Maximum Length:40
The label of the capacity category. The label is returned by the GET operation and is ignored in the PUT operation. -
name:
string
Title:
Name
Minimum Length:1
Maximum Length:5000
The name of the capacity category in the user's language. The name is returned by the GET operation and is ignored in the PUT operation. -
timeSlots:
array Time Slots
Title:
Time Slots
The array of time slots objects. It is optional for the PUT operation. -
translations:
array Translations
Title:
Translations
The list of translations associated with the name of the capacity category.- The translations parameter is required in the PUT method for creating a capacity category, but the parameter is optional for updating a capacity category.
- If the parameter is not specified, then the translations in the response are not changed.
- The translation for the 'name' attribute must not be empty atleast for the default language.
-
workSkillGroups:
array Work Skill Groups
Title:
Work Skill Groups
The array of work skill group objects. It is optional for the PUT operation. -
workSkills:
array Work Skills
Title:
Work Skills
The array of work skill objects. It is optional for the PUT operation.
array
Time Slots
array
Translations
- The translations parameter is required in the PUT method for creating a capacity category, but the parameter is optional for updating a capacity category.
- If the parameter is not specified, then the translations in the response are not changed.
- The translation for the 'name' attribute must not be empty atleast for the default language.
array
Work Skill Groups
array
Work Skills
object
-
language(required):
string
This field contains language code of a text translation, it conatains two characters length code in responses (e.g. 'en', 'es') but can be used in requests as extended ISO code (e.g. 'en-US') as well as old two character format.
-
languageISO:
string
This field is used only in responses and returns ISO language code (e.g. 'en-US'). This field is ignored in the requests (use 'language' instead)
-
name(required):
string
object
-
label(required):
string
The label of the work skill group.
-
startDate:
string(date)
The start date of the work skill group. It is ignored in the PUT operation.
object
-
label(required):
string
The label of the work skill.
-
ratio(required):
integer
Minimum Value:
1
Maximum Value:100
The ratio used for assigning the work skill to a resource. -
startDate:
string(date)
The start date of the work skill. It is ignored in the PUT operation.
201 Response
object
Capacity Category
-
active(required):
boolean
Title:
Active
Contains one of the following values: true or false.If true, then the active capacity categories are returned. If false, then the inactive capacity categories are returned. The default value is true.
-
label:
string
Title:
Label
Minimum Length:1
Maximum Length:40
The label of the capacity category. The label is returned by the GET operation and is ignored in the PUT operation. -
name:
string
Title:
Name
Minimum Length:1
Maximum Length:5000
The name of the capacity category in the user's language. The name is returned by the GET operation and is ignored in the PUT operation. -
timeSlots:
array Time Slots
Title:
Time Slots
The array of time slots objects. It is optional for the PUT operation. -
translations:
array Translations
Title:
Translations
The list of translations associated with the name of the capacity category.- The translations parameter is required in the PUT method for creating a capacity category, but the parameter is optional for updating a capacity category.
- If the parameter is not specified, then the translations in the response are not changed.
- The translation for the 'name' attribute must not be empty atleast for the default language.
-
workSkillGroups:
array Work Skill Groups
Title:
Work Skill Groups
The array of work skill group objects. It is optional for the PUT operation. -
workSkills:
array Work Skills
Title:
Work Skills
The array of work skill objects. It is optional for the PUT operation.
array
Time Slots
array
Translations
- The translations parameter is required in the PUT method for creating a capacity category, but the parameter is optional for updating a capacity category.
- If the parameter is not specified, then the translations in the response are not changed.
- The translation for the 'name' attribute must not be empty atleast for the default language.
array
Work Skill Groups
array
Work Skills
object
-
language(required):
string
This field contains language code of a text translation, it conatains two characters length code in responses (e.g. 'en', 'es') but can be used in requests as extended ISO code (e.g. 'en-US') as well as old two character format.
-
languageISO:
string
This field is used only in responses and returns ISO language code (e.g. 'en-US'). This field is ignored in the requests (use 'language' instead)
-
name(required):
string
object
-
label(required):
string
The label of the work skill group.
-
startDate:
string(date)
The start date of the work skill group. It is ignored in the PUT operation.
object
-
label(required):
string
The label of the work skill.
-
ratio(required):
integer
Minimum Value:
1
Maximum Value:100
The ratio used for assigning the work skill to a resource. -
startDate:
string(date)
The start date of the work skill. It is ignored in the PUT operation.
Default Response
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
You can create or update capacity categories by submitting a PUT request on the REST resource. The following example shows how to create a capacity category by submitting a PUT request on the REST resource.
Example of Request Header
The following shows an example of the request header.
PUT /rest/ofscMetadata/v1/capacityCategories/test1 Connection: close Accept-Encoding: gzip,deflate Authorization: Basic bXlyb290QHFhNTUwMzox Host: <instance_name>.fs.ocs.oraclecloud.com User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Example of Request Body
The following example shows the contents of the request body in JSON format.
{ "active": true, "workSkills": [ { "label": "IN", "ratio": 11 } ], "workSkillGroups": [ { "label": "disconnect" } ], "timeSlots": [ { "label": "08-10" } ], "translations": [ { "language": "en", "name": "4534534" }, { "language": "es", "name": "4534534" } ] }
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 201 Created Server: nginx Date: Wed, 23 Aug 2017 14:36:58 GMT Content-Type: application/json; charset=utf-8 Transfer-Encoding: chunked Connection: keep-alive Access-Control-Allow-Credentials: true Strict-Transport-Security: max-age=31536000; includeSubDomains;
Example of Response Body
The following example shows the contents of the response body in JSON format.
{ "label": "test1", "name": "4534534", "active": true, "workSkills": [ { "label": "IN", "ratio": 11, "startDate": "2017-08-23" } ], "workSkillGroups": [ { "label": "disconnect", "startDate": "2017-08-23", "links": [ { "rel": "canonical", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/workSkillGroups/disconnect" } ] } ], "timeSlots": [ { "label": "08-10" }], "translations": [ { "language": "en", "name": "4534534", "languageISO": "en-US" }, { "language": "es", "name": "4534534", "languageISO": "es-ES" } ], "links": [ { "rel": "canonical", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/capacityCategories/test1" }, { "rel": "describedby", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/capacityCategories" } ] }