Method: networks.vehicles.makeUnavailable

  • This endpoint, vehicles.makeUnavailable, is used to make a vehicle unavailable for scheduling, effectively removing it from the pool of available resources.

  • To utilize this endpoint, a POST request must be sent to the specified URL, including the vehicle's name in the path parameters.

  • The request body can optionally include unavailabilityStarts, specifying the periods when the vehicle becomes unavailable, with future timestamps; if omitted, unavailability starts immediately.

  • Upon success, the response provides the vehicle's name and a list of updated paths (path[]) impacted by the vehicle's unavailability.

Makes a vehicle unavailable.

HTTP request

POST https://middlemileoptimization.googleapis.com/v1/{name=networks/*/vehicles/*}:makeUnavailable

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The name of the vehicle to make unavailable. Format: "networks/{network}/vehicles/{vehicle}"

Request body

The request body contains data with the following structure:

JSON representation
{
  "unavailabilityStarts": [
    {
      object (DateTime)
    }
  ]
}
Fields
unavailabilityStarts[]

object (DateTime)

Required. The periods where unavailability will start. They must be points in time in the future. If this field is absent, unavailability starts when the message is received.

Response body

The response message for vehicles.makeUnavailable method.

If successful, the response body contains data with the following structure:

JSON representation
{
  "name": string,
  "path": [
    {
      object (Path)
    }
  ]
}
Fields
name

string

The name of the vehicle whose unavailability was updated. Format: "networks/{network}/vehicles/{vehicle}"

path[]

object (Path)

The paths that were updated.