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
-
resourceId(required): string
The unique identifier of the resource.
Root Schema : Assigned Resource Locations
Type:
object
Title:
Assigned Resource Locations
The locations assigned to the resource for a week.
Show Source
-
fri:
object Resource Locations Assigned for a Day
Title:
Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday. -
mon:
object Resource Locations Assigned for a Day
Title:
Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday. -
sat:
object Resource Locations Assigned for a Day
Title:
Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday. -
sun:
object Resource Locations Assigned for a Day
Title:
Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday. -
thu:
object Resource Locations Assigned for a Day
Title:
Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday. -
tue:
object Resource Locations Assigned for a Day
Title:
Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday. -
wed:
object Resource Locations Assigned for a Day
Title:
Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday.
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
-
end:
integer
Title:
End Location ID
The identifier of the end location for this weekday. -
homeZoneCenter:
integer
Title:
Home Zone Center Location ID
The identifier of the home zone center location for this weekday. -
start:
integer
Title:
Start Location ID
The identifier of the start location for this weekday.
Response
Supported Media Types
- application/json
200 Response
This section describes the 200 status response for this operation.
Root Schema : Assigned Resource Locations
Type:
object
Title:
Assigned Resource Locations
The locations assigned to the resource for a week.
Show Source
-
fri:
object Resource Locations Assigned for a Day
Title:
Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday. -
mon:
object Resource Locations Assigned for a Day
Title:
Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday. -
sat:
object Resource Locations Assigned for a Day
Title:
Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday. -
sun:
object Resource Locations Assigned for a Day
Title:
Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday. -
thu:
object Resource Locations Assigned for a Day
Title:
Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday. -
tue:
object Resource Locations Assigned for a Day
Title:
Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday. -
wed:
object Resource Locations Assigned for a Day
Title:
Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday.
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
-
end:
integer
Title:
End Location ID
The identifier of the end location for this weekday. -
homeZoneCenter:
integer
Title:
Home Zone Center Location ID
The identifier of the home zone center location for this weekday. -
start:
integer
Title:
Start Location ID
The identifier of the start location for this weekday.
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 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" } ] }