White Label API Reference
The myDevices IoT platform is composed of microservices. This allows us to maintain a high level of uptime and allows us to ensure speed and code quality in each feature. The API is therefore naturally organized in a group of services based upon the feature provided.
Companies
Methods
Method | URI | Name | Summary |
---|---|---|---|
GET | /v1.0/admin/companies | Company | Retrieve all companies for current application |
GET | /v1.0/admin/companies/{company_id} | Company List | Retrieve a company |
GET | /v1.0/admin/companies/count | Company Count | Count all companies for current application |
Query Parameters
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
application_id | query | string | string | ||||
limit | query | number | float64 | 50 | |||
page | query | number | float64 | ||||
user_id | query | string | string |
Responses
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | Successful company retrieval | schema | |
400 | Bad Request | Bad request sent to server | schema | |
401 | Unauthorized | You are unauthorized | schema | |
403 | Forbidden | You are forbidden to perform this action | schema |
Locations
GET /v1.0/admin/locations
Security Requirements
- token
- jwt
- explicit
Parameters
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
application_id | query | string | string | ||||
company_id | query | number | float64 | ||||
limit | query | number | float64 | 50 | |||
page | query | number | float64 | ||||
user_id | query | string | string |
All responses
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | Successful location retrieval | schema | |
400 | Bad Request | Bad request sent to server | schema | |
401 | Unauthorized | You are unauthorized | schema | |
403 | Forbidden | You are forbidden to perform this action | schema |
Responses
200 - Successful location retrieval
Status: OK
Schema
400 - Bad request sent to server
Status: Bad Request
Schema
401 - You are unauthorized
Status: Unauthorized
Schema
403 - You are forbidden to perform this action
Status: Forbidden
Schema
Count all locations for current application (getV10AdminLocationsCount)
GET /v1.0/admin/locations/count
Security Requirements
- token
- jwt
- explicit
Parameters
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
application_id | query | string | string | ||||
company_id | query | number | float64 | ||||
user_id | query | string | string |
All responses
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | Successful location count retrieval | schema | |
400 | Bad Request | Bad request sent to server | schema | |
401 | Unauthorized | You are unauthorized | schema | |
403 | Forbidden | You are forbidden to perform this action | schema |
Responses
200 - Successful location count retrieval
Status: OK
Schema
400 - Bad request sent to server
Status: Bad Request
Schema
401 - You are unauthorized
Status: Unauthorized
Schema
403 - You are forbidden to perform this action
Status: Forbidden
Schema
Retrieve a location (getV10AdminLocationsLocation_id)
GET /v1.0/admin/locations/{location_id}
Security Requirements
- token
- jwt
- explicit
Parameters
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
location_id | path | number | float64 | ✓ |
Responses
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | Successful location retrieval | schema | |
400 | Bad Request | Bad request sent to server | schema | |
401 | Unauthorized | You are unauthorized | schema | |
403 | Forbidden | You are forbidden to perform this action | schema | |
404 | Not Found | Requested resource not found | schema |
Companies
Get all Companies
Locations
Get all Locations
Devices
Get all Devices
Get all Devices for specific User
https://api.mydevices.com/v1.0/admin/things?user_id={userId}
Get all Devices for specific Location
https://api.mydevices.com/v1.0/admin/things?location_id={locationId}
Get specific Device
Users
Get all Users
https://auth.mydevices.com/auth/admin/realms/CLIENT_ID/users
Get Admin/Owner for location
https://auth.mydevices.com/auth/admin/realms/CLIENT_ID/users/{userId} Use the user_id found under the appropriate call for Companies / Locations.