Skip to content

[Device] Add new device

Gledson Afonso edited this page Aug 16, 2022 · 5 revisions

Resource: /device

Method Action Header Request Response
POST add new device ["Content-Type: application/json"] # #

Request

{
  "name": "string",
  "type": "string"
}
  • type can be either windows or mac

Response

{
  "id": 1234,
  "name": "string",
  "type": "string",
  "services": []
}
  • services will always start as an empty array, since it's a new device that has been added

Keep in mind that:

  • In the case of success, an HTTP status code of 201 should be expected with the above response body
  • In the case of incorrect use of type, or trying to add duplicates (same name and type between devices), an HTTP status code of 400 should be expected, with a common Spring error message body template as a response
Clone this wiki locally