Update an existing machine.

Supported Formats

json, multipart/form-data

Examples

 curl -X PATCH
      -H "Authorization:Token token=xxx"
      -H "Content-Type:multipart/form-data"
      -H "Accept: application/json"
      -F machine[spec]="Laser CO2 de 60W<br>Surface de travail de 812 x 508 mm"
      -F machine[machine_image_attributes[attachment]]=@epilog2.jpg
      /open_api/v1/machines/10

curl -X PATCH
     -H "Authorization:Token token=xxx"
     -H "Content-Type:application/json"
     -H "Accept: application/json"
     -d '{"machine": { "disabled": true }}'
     /open_api/v1/machines/10

Params

Param name Description
machine
required

Validations:

  • Must be a Hash

machine[name]
required

The name of the machine.

Validations:

  • Must be a String

machine[description]
required

A long textual description of the machine. HTML is supported.

Validations:

  • Must be a String

machine[spec]
optional

A long textual description of the technical specifications of the machine. HTML is supported.

Validations:

  • Must be a String

machine[disabled]
optional

Should the machine be disabled? If yes, the machine won’t be reservable and will be shown apart.

Validations:

  • Must be one of: TrueClass, FalseClass.

machine[machine_image_attributes]
optional

Validations:

  • Must be a Hash

machine[machine_image_attributes][attachment]
required

Upload a picture for the machine.

Validations:

  • Must be a ActionDispatch::Http::UploadedFile

Returns

HTTP code: 200

Description:

The machine was successfully updated

Param name Description