Get capacity areas

get

/rest/ofscMetadata/v1/capacityAreas

This operation retrieves a collection of capacity areas.

Request

Query Parameters
  • 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
  • Collection Format: csv
    The list of fields that are returned in the response.
    • Supported fields: area.label, area.name, area.type, area.status, parent.name, parent.label.
    • Default values: date, area.label.
    • Note: The fields 'parent.name' and 'parent.label' are ignored if the value of the 'expand' parameter is not 'parent'.

  • 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.
  • 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.
Back to Top

Response

Supported Media Types

200 Response

This section describes the 200 status response for this operation.
Body ()
Root Schema : CapacityAreas
Type: object
The collection of capacity areas.
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : Capacity Area
Type: object
Title: Capacity Area
Show Source
  • Title: Label
    Minimum Length: 1
    Maximum Length: 255
    The label of the capacity area or the capacity area group.
  • Title: Name
    The name of the capacity area or the capacity area group in the user's language.
  • 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.
  • Title: Status
    Allowed Values: [ "active", "inactive" ]
    The status of the capacity area or the capacity area group specified in the request.
  • 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.

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.
Show Source

Default Response

This section describes the default error response for this operation.
Body ()
Root Schema : Error
Type: object
Error response
Show Source
Back to Top

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