Create a new device
Motivation
Create(register) a new device
Functional design
POST /api/v2/apps/{owner}/{app}/devices
Headers
Key
Value
Authorization
Bearer {PrincipalToken}
Content-Type
application/json
Parameters
Parameter
Type
Description
owner
string
name of a user who owns the application
app
string
name of an application
Body
JSON object:
Result
Code
Description
Body
201
Created, see response below
400
Bad Request
401
Unauthorized
403
Forbidden
429
Too may requests, rate limiting
500+
Server errors / service unavailable
Response example 201:
Technical design
Components
pkg/router
URL path handler
~cmp.routerDevicesCreatePathHandler~
âť“:parses the request Body
generates, login, password and pseudo-wsid
sends v2 request
c.registry.CreateLogin
to Command Processorhandles the response and replies with the login and Password
pkg/sys/it
integration test for /users
~it.TestDevicesCreate~
âť“
Last updated
Was this helpful?