Skip to content

[EXPERIMENTAL] Create TransportResource Unavailability

Request

This endpoint allows you to create an Unavailability with a generated ID. This can be used for ad hoc Unavailabilities or situations where the source system does not contain any unique IDs.

See the PUT operation for more information on the functional impact of adding a new unavailability.

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

A unique identifier of an entity instance. 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"]
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 created.

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" }