Create a new machine.
curl -X POST
-H "Authorization:Token token=xxx"
-H "Content-Type:multipart/form-data"
-H "Accept: application/json"
-F machine[name]="Epilog laser"
-F machine[description]="La découpeuse laser vous permet de découper ou graver des matériaux."
-F machine[machine_image_attributes[attachment]]=@epilog.jpeg
/open_api/v1/machines
curl -X POST
-H "Authorization:Token token=xxx"
-H "Content-Type:application/json"
-H "Accept: application/json"
-d '{"machine": { "name": "DMP Flex 100", "description": "Cette imprimante 3D peut imprimer des métaux." }}'
/open_api/v1/machines
| Param name | Description |
|---|---|
|
machine required |
Validations:
|
|
machine[name] required |
The name of the machine. Validations:
|
|
machine[description] required |
A long textual description of the machine. HTML is supported. Validations:
|
|
machine[spec] optional |
A long textual description of the technical specifications of the machine. HTML is supported. Validations:
|
|
machine[disabled] optional |
Should the machine be disabled? If yes, the machine won’t be reservable and will be shown apart. Validations:
|
|
machine[machine_image_attributes] optional |
Validations:
|
|
machine[machine_image_attributes][attachment] required |
Upload a picture for the machine. Validations:
|
The machine was successfully created
| Param name | Description |
|---|