Get capacity categories
get
/rest/ofscMetadata/v1/capacityCategories
This operation retrieves a collection of capacity categories.
Request
Query Parameters
-
limit: integer
The number of items to be returned in the response. The minimum value that can be specified is 1 and the maximum value that can be specified is 100. If the specified value is greater than 100, zero, or if no value is specified, then it defaults to 100.
-
offset: integer
The record number from which the retrieval starts. The default value is zero. If no value is specified, then it defaults to zero. The value zero indicates that the retrieval will start from the beginning of the collection.
Response
Supported Media Types
- application/json
- application/schema+json
200 Response
This section describes the 200 status response for this operation.
Root Schema : CapacityCategories
Type:
objectThe collection of capacity categories.
Show Source
-
items:
array items
-
limit:
integer
The limit value specified in the request. If the value is not specified in the request or if the specified value is greater than 100, then it defaults to 100.
-
offset:
integer
The offset value specified in the request.
-
totalResults:
integer
The total number of capacity categories in the response.
Nested Schema : items
Type:
Show Source
array-
Array of:
object Capacity Category
Title:
Capacity Category
Nested Schema : Capacity Category
Type:
objectTitle:
Show Source
Capacity Category-
active(required):
boolean
Title:
ActiveContains 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:
LabelMinimum Length:1Maximum Length:40The label of the capacity category. The label is returned by the GET operation and is ignored in the PUT operation. -
name:
string
Title:
NameMinimum Length:1Maximum Length:5000The 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 SlotsThe array of time slots objects. It is optional for the PUT operation. -
translations:
array Translations
Title:
TranslationsThe 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 GroupsThe array of work skill group objects. It is optional for the PUT operation. -
workSkills:
array Work Skills
Title:
Work SkillsThe array of work skill objects. It is optional for the PUT operation.
Nested Schema : Time Slots
Type:
arrayTitle:
Time SlotsThe array of time slots objects. It is optional for the PUT operation.
Show Source
Nested Schema : Translations
Type:
arrayTitle:
TranslationsThe list of translations associated with the name of the capacity category.
Show Source
- 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.
Nested Schema : Work Skill Groups
Type:
arrayTitle:
Work Skill GroupsThe array of work skill group objects. It is optional for the PUT operation.
Show Source
Nested Schema : Work Skills
Type:
arrayTitle:
Work SkillsThe array of work skill objects. It is optional for the PUT operation.
Show Source
Nested Schema : Translation
Type:
Show Source
object-
language(required):
string
The language code of the translated text. The code in the response is two characters long (for example, 'en', 'es').
See Supported Language Codes to view the values that are supported.
-
languageISO:
string
The ISO language code (for example, 'en-US').
-
name(required):
string
The specified name of the property translated to the language code available in the system.
Nested Schema : items
Type:
Show Source
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.
Nested Schema : items
Type:
Show Source
object-
label(required):
string
The label of the work skill.
-
ratio(required):
integer
Minimum Value:
1Maximum Value:100The 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
This section describes the default error response for this operation.
Root Schema : Error
Type:
objectError response
Show Source
-
detail:
string
The detailed information about the error.
-
status:
string
The HTTP status code.
-
title:
string
The summary of the error message.
-
type:
string
The URL of the page containing the error details.
Examples
The following example shows how to get a collection of capacity categories by submitting a GET request on the REST resource.
Example of Request Header
The following shows an example of the request header.
GET /rest/ofscMetadata/v1/capacityCategories?offset=2&limit=1 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 Response Header
The following shows an example of the response header.
HTTP/1.1 200 OK Server: nginx Date: Wed, 23 Aug 2017 14:58:16 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.
{
"hasMore": true,
"totalResults": 8,
"limit": 1,
"offset": 2,
"items": [ {
"label": "UP",
"name": "Upgrade",
"active": true,
"workSkills": [ {
"label": "UP",
"ratio": 1,
"startDate": "2000-01-01"
}],
"workSkillGroups": [],
"timeSlots": [
{"label": "08-10"},
{"label": "10-12"},
{"label": "13-15"},
{"label": "15-17"}
],
"translations": [
{
"language": "en",
"name": "Upgrade",
"languageISO": "en-US"
},
{
"language": "es",
"name": "Upgrade",
"languageISO": "es-ES"
},
{
"language": "fr",
"name": "Upgrade",
"languageISO": "fr-FR"
},
{
"language": "nl",
"name": "Upgrade",
"languageISO": "nl-NL"
},
{
"language": "de",
"name": "Upgrade",
"languageISO": "de-DE"
},
{
"language": "ro",
"name": "Upgrade",
"languageISO": "ro-RO"
},
{
"language": "ru",
"name": "Модернизация",
"languageISO": "ru-RU"
},
{
"language": "br",
"name": "Upgrade",
"languageISO": "pt-BR"
}
],
"links": [
{
"rel": "canonical",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/capacityCategories/UP"
},
{
"rel": "describedby",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/capacityCategories"
}
]
}],
"links": [
{
"rel": "canonical",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/capacityCategories?limit=1&offset=2"
},
{
"rel": "prev",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/capacityCategories?offset=1"
},
{
"rel": "next",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/capacityCategories?offset=3"
},
{
"rel": "describedby",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/capacityCategories"
}
]
}