Get capacity areas
get
/rest/ofscMetadata/v1/capacityAreas
This operation retrieves a collection of capacity areas.
Request
Query Parameters
-
expand: string
The related entities that are embedded for each capacity area item. This parameter accepts only 'parent' as a valid value. If the 'fields' parameter is not specified in the request, then by default only the 'label' field of the parent area is returned. You can also retrieve other fields for the parent area by specifying the 'fields' parameter as follows:
?expand=parent&fields=parent.name,parent.label
-
fields: array[string]
Collection Format:
csv
The list of fields that are returned in the response.- Supported fields: label, name, type, status, parent.name, parent.label.
- Default values: label.
Note: The fields 'parent.name' and 'parent.label' are ignored if the value of the 'expand' parameter is not 'parent'.
-
status: string
The status of the capacity area. If the specified value is 'Active', then only the active capacity areas and their capacity area groups are returned. If the specified value is 'Inactive', then only the inactive capacity areas and their capacity area groups are returned.
-
type: string
The type of the capacity area. If the specified value is 'Area', then only the capacity areas are returned. If the specified value is 'Group', then the capacity area groups along with the capacity areas are returned.
Response
Supported Media Types
- application/schema+json
- application/json
200 Response
This section describes the 200 status response for this operation.
Nested Schema : Capacity Area
Type:
object
Title:
Show Source
Capacity Area
-
label:
string
Title:
Label
Minimum Length:1
Maximum Length:255
The label of the capacity area or the capacity area group. -
name:
string
Title:
Name
The name of the capacity area or the capacity area group in the user's language. -
parent:
object Parent
Title:
Parent
The details of the parent capacity area.The Parent value is returned, if the value is specified in the Expand parameter. The value is not returned when:
- The capacity area or capacity area group is located at the top level of the hierarchy.
- The value is not visible for the current user.
-
status:
string
Title:
Status
Allowed Values:[ "active", "inactive" ]
The status of the capacity area or the capacity area group specified in the request. -
type:
string
Title:
Type
Allowed Values:[ "group", "area" ]
The type of the capacity area specified in the request.
Nested Schema : Parent
Type:
object
Title:
Parent
The details of the parent capacity area.
Show Source
The Parent value is returned, if the value is specified in the Expand parameter. The value is not returned when:
- The capacity area or capacity area group is located at the top level of the hierarchy.
- The value is not visible for the current user.
-
label:
string
Minimum Length:
1
Maximum Length:255
The label of the parent capacity area group. -
name:
string
The name of the parent capacity area group in user's language.
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 get all capacity areas 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/capacityAreas/?fields=label,type,name,status&expand=parent&links=none 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 13:22:04 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.
{ "items": [ { "label": "22", "name": "Sunrise Enterprise", "type": "group", "status": "active" }, { "label": "ASIA", "name": "Asia", "type": "area", "status": "active", "parent": { "label": "22" } }, { "label": "EUROPE", "name": "Europe", "type": "area", "status": "active", "parent": { "label": "22" } }, { "label": "66000", "name": "Newfoundland", "type": "group", "status": "active", "parent": { "label": "22" } }, { "label": "CapacityArea", "name": "Capacity Area", "type": "area", "status": "active", "parent": { "label": "66000" } }, { "label": "routing", "name": "Planning", "type": "area", "status": "active", "parent": { "label": "22" } }, { "label": "São José", "name": "São José dos Campos", "type": "area", "status": "active", "parent": { "label": "22" } }, { "label": "Texasin", "name": "Texas inventories", "type": "group", "status": "active", "parent": { "label": "22" } }, { "label": "routing_bucket_T", "name": "Texas City", "type": "area", "status": "active", "parent": { "label": "Texasin" } } ] }