Set assigned locations

put

/rest/ofscCore/v1/resources/{resourceId}/assignedLocations

This operation creates or updates the locations assigned to the specified resource. The locations include the 'start', 'end', and 'home zone center' locations.

Note: When the location is specified in the request, it is assigned to the resource. When the location is not specified in the request, the location is removed from the resource for the specified weekdays.

Request

Path Parameters
Body ()
Root Schema : Assigned Resource Locations
Type: object
Title: Assigned Resource Locations
The locations assigned to the resource for a week.
Show Source
Nested Schema : Resource Locations Assigned for a Day
Type: object
Title: Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday.
Show Source
Back to Top

Response

Supported Media Types

200 Response

This section describes the 200 status response for this operation.
Body ()
Root Schema : Assigned Resource Locations
Type: object
Title: Assigned Resource Locations
The locations assigned to the resource for a week.
Show Source
Nested Schema : Resource Locations Assigned for a Day
Type: object
Title: Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday.
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 set assigned locations for a resource by submitting a PUT request on the REST resource.

Example of Request Header

The following shows an example of the request header.

PUT /rest/ofscCore/v1/resources/44025/assignedLocations HTTP/1.0
Authorization: Basic c29hcEB5YW1hdG86MQ==
Host: etadev1f
Accept: */*

Example of Request Body

The following example shows the contents of the request body in JSON format.

{
        "mon": {
            "start": 1,
            "end": 7,
            "homeZoneCenter": 7
        },
        "tue": {
            "start": 1,
            "end": 7,
            "homeZoneCenter": 7
        }
}

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 200 OK
Server: nginx/1.6.2
Date: Fri, 24 Jul 2015 08:35:48 GMT
Content-Type: application/json; charset=utf-8
Connection: close

Example of Response Body

The following example shows the contents of the response body in JSON format.

 {
        "mon": {
            "start": 1,
            "end": 7,
            "homeZoneCenter": 7
        },
        "tue": {
            "start": 1,
            "end": 7,
            "homeZoneCenter": 7
        },
        "links": [
            {
                "rel": "canonical",
                "href": "https://etadev1f/rest/ofscCore/v1/resources/44025/assignedLocations"
            },
            {
                "rel": "describedby",
                "href": "https://etadev1f/rest/ofscCore/v1/metadata-catalog/resources"
            }
        ]
    }
Back to Top