Skip to content

[EXPERIMENTAL] Upsert External Deployment

Request

Create or update an external Deployment. A unique ID is required to identify the Deployment. Calling this endpoint with an existing id will update the `Deployment.

External Deployments represent work assignments that are managed outside of the Resource Management system.

We don't allow overlap between Deployments for the same Employee or Transport Resource.

The version of the Deployment can optionally be provided as a weak ETag in the If-Match header. This allows the caller to ensure that the Deployment has not been modified since the last time it was retrieved.

Security
clientCredentials
Path
idstringrequired

Unique identifier for this external Deployment. Should only contain characters which do not need URL encoding.

Headers
PreferArray of strings

The RFC7240 Prefer header indicates that a particular server behavior is preferred by the client but is not required for successful completion of the request (see RFC 7240).

The following behavior (see Examples) is supported by this API:

  • return=<minimal|representation> is used to suggest the server to return using 204 without resource (minimal) or using 200 or 201 with resource (representation) in the response body on success.
Examples:
minimal
Indicate no response is needed, can be omitted
["return=minimal"]
representation
Request the result of the operation as response
["return=representation"]
If-Matchstring

Weak Etag used for optimistic locking.

Example:W/"24"
Bodyapplication/json
employeestringrequired

The business ID of the employee for this deployment.

Example:"employee-42"
transport_resourcesArray of stringsrequired

The business IDs of the transport resources for this deployment.

Example:
[ "truck-1", "trailer-2" ]
startobject(DeploymentStart)required
endobject(DeploymentEnd)required
total_break_timestringrequired

Total break time during the deployment, formatted as ISO-8601 duration.

Example:"PT1H"
Payload
{ "employee": "employee-42", "transport_resources": [ "truck-1", "trailer-2" ], "start": { "at": "2021-01-01T08:00:00Z", "location": { … } }, "end": { "at": "2021-01-01T17:00:00Z", "location": { … } }, "total_break_time": "PT1H" }

Responses

External Deployment created or updated

Headers
ETagstring

A weak Etag (ex W/"<etag_value>") which contains the current version of the entity

Example:"W/\"25\""
Preference-Appliedstring

Indicates whether a preference has been applied. (ex return=representation)

Locationstring, (URI)

A URI to access the result of the operation.

Bodyapplication/json
idstring

The unique deployment ID.

Example:"deployment-123"
resource_combination_idstring

The ID of the associated resource combination, if any.

Example:"rc-456"
availability_idstring

The ID of the associated availability, if any.

Example:"avail-789"
employee_idstring

The ID of the employee assigned to this deployment.

Example:"employee-42"
transport_resource_idsArray of strings

The IDs of the transport resources assigned to this deployment.

Example:
[ "truck-1", "trailer-2" ]
startobject(DeploymentStart)
endobject(DeploymentEnd)
total_break_timestring

Total break time during the deployment, formatted as ISO-8601 duration.

Example:"PT1H"
planning_idstring

The ID of the planning that created this deployment, if any.

Example:"planning-123"
Response
{ "id": "deployment-123", "resource_combination_id": "rc-456", "availability_id": "avail-789", "employee_id": "employee-42", "transport_resource_ids": [ "truck-1", "trailer-2" ], "start": { "at": "2021-01-01T08:00:00Z", "location": { … } }, "end": { "at": "2021-01-01T17:00:00Z", "location": { … } }, "total_break_time": "PT1H", "planning_id": "planning-123" }