Skip to content

[EXPERIMENTAL] Upsert TransportResource Unavailability

Request

Create or update a TransportResourceUnavailability.

When a TransportResource becomes unavailable, the ResourceCombinations whose guaranteed working time overlapped with the unavailability are deleted. For other overlaps the existing combinations are only re-evaluated.

Security
clientCredentials
Path
transport_resource_idstring^[a-zA-Z0-9.~\-_]{1,512}$required

the business id of the TransportResource for which to add an unavailability

unavailability_idstring, (uuid)required

The provided identifier of the Unavailability, or the generated identifier in case of an Unavailability created through the POST endpoint.

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
fromstring, (date-time)required
Example:"2021-01-01T06:00:00Z"
tostring, (date-time)required

must be strictly greater than from

Example:"2021-01-10T06:00:00Z"
descriptionstring
Example:"maintenance"
Payload
{ "from": "2021-01-01T06:00:00Z", "to": "2021-01-10T06:00:00Z", "description": "maintenance" }

Responses

Unavailability 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
idstringread-only

The unique Unavailability ID.

transport_resource_idstring(TransportResourceId)^[a-zA-Z0-9.~\-_]+$read-only

The TransportResource that has this Unavailability.

Example:"tractor-1"
fromstring, (date-time)required
Example:"2021-01-01T06:00:00Z"
tostring, (date-time)required

must be strictly greater than from

Example:"2021-01-10T06:00:00Z"
descriptionstring
Example:"maintenance"
Response
{ "id": "string", "transport_resource_id": "tractor-1", "from": "2021-01-01T06:00:00Z", "to": "2021-01-10T06:00:00Z", "description": "maintenance" }