Thing Manager API API Reference
The Thing Manager API is responsible for registering and modifying Things, Thing Types and Message Types. More information about these entities can be found in the platform overview.
NOTE: You must get an authorization token from the Connect API before you can use this endpoint. Click here for instructions.
API Endpoint
https://labs.geeny.io/things/api/v1
Schemes: https, http
Version: 1.0
Authentication
jwt
Geeny Connect Auth Token (Format: JWT [token])
Message Types
Create new Message Type
Registers a new Message Type on the platform and returns a JSON object with a Message Type ID and the creation date.
Message Type data
Request Content-Types: application/json
Request Example
{
"name": "Instantaneous Humidity Value",
"description": "Instantaneous Humidity Value",
"media_type": "application/cbor",
"tags": [
"humidity",
"sensor",
"BRAND"
]
}
New Message Type successfully created.
Invalid request.
Unauthorized. Check your JWT with the Connect API.
Server error..
Response Content-Types: application/json
Response Example (201 Created)
{
"id": "75d93472-4b81-46f1-848c-bfa8bf6de881",
"name": "Instantaneous Temperature Value",
"media_type": "application/json",
"description": "Instantaneous temperature value",
"created": "2017-07-18T09:38:16.164Z",
"tags": [
"temperature",
"sensor",
"BRAND"
]
}
Response Example (400 Bad Request)
{
"error": "'id' must be a valid GUID"
}
Response Example (401 Unauthorized)
{
"error": "Unauthorized."
}
Response Example (500 Internal Server Error)
{
"error": "Something went wrong."
}
Get all Message Types
Returns an array of all the Message Types on the Geeny platform.
Number by which to offset the list of Message Types.
Number of Message Types to be returned.
Success.
Unauthorized. Check your JWT with the Connect API.
Server error.
Response Content-Types: application/json
Response Example (200 OK)
{
"meta": {
"limit": "integer",
"offset": "integer"
},
"data": [
{
"id": "75d93472-4b81-46f1-848c-bfa8bf6de881",
"name": "Instantaneous Temperature Value",
"media_type": "application/json",
"description": "Instantaneous temperature value",
"created": "2017-07-18T09:38:16.164Z",
"tags": [
"temperature",
"sensor",
"BRAND"
]
}
]
}
Response Example (401 Unauthorized)
{
"error": "Unauthorized."
}
Response Example (500 Internal Server Error)
{
"error": "Something went wrong."
}
Get Message Type
Returns a single Message Type.
ID of the Message Type to be returned.
Success.
Invalid parameters.
Unauthorized.
Message Type not found.
Server error.
Response Content-Types: application/json
Response Example (200 OK)
{
"id": "75d93472-4b81-46f1-848c-bfa8bf6de881",
"name": "Instantaneous Temperature Value",
"media_type": "application/json",
"description": "Instantaneous temperature value",
"created": "2017-07-18T09:38:16.164Z",
"tags": [
"temperature",
"sensor",
"BRAND"
]
}
Response Example (400 Bad Request)
{
"error": "'id' must be a valid GUID"
}
Response Example (401 Unauthorized)
{
"error": "Unauthorized."
}
Response Example (404 Not Found)
{
"error": "Not found."
}
Response Example (500 Internal Server Error)
{
"error": "Something went wrong."
}
Publish a Message Type
Publishes a single Message Type. This allows other Geeny developers to use this Message Type in their Thing Types.
Your user JWT.
ID of the Message Type to be published.
Response Content-Types: application/json
Response Example (200 OK)
{
"id": "75d93472-4b81-46f1-848c-bfa8bf6de881",
"name": "Instantaneous Temperature Value",
"media_type": "application/json",
"description": "Instantaneous temperature value",
"created": "2017-07-18T09:38:16.164Z",
"tags": [
"temperature",
"sensor",
"BRAND"
]
}
Delete Message Type
Deletes a single Message Type.
ID of the Message Type to be deleted.
Your user JWT.
Message Type deleted.
Response Content-Types: application/json
Thing Types
Create new Thing Type
Registers a new Thing Type on the platform. Returns a JSON object with a unique ID for the Thing Type.
Thing Type data. See the schema definition below for more information about the body contents.
Request Content-Types: application/json
Request Example
{
"name": "BRAND Humidity Sensor",
"resources": [
{
"uri": "humidity/now",
"method": "pub",
"message_type": "e27141fa-5805-41df-94f9-4aec44150b44"
}
]
}
New Thing Type created.
Invalid request.
Unauthorized.
Server error.
Response Content-Types: application/json
Response Example (201 Created)
{
"id": "024d804b-1267-4483-aab8-f25f22441062",
"name": "BRAND Temperature Sensor",
"created": "2017-07-18T09:38:16.164Z",
"public": true
}
Response Example (400 Bad Request)
{
"error": "'id' must be a valid GUID"
}
Response Example (401 Unauthorized)
{
"error": "Unauthorized."
}
Response Example (500 Internal Server Error)
{
"error": "Something went wrong."
}
Get all Thing Types
Returns an array of all the Thing Types on the Geeny platform.
Number by which to offset the list of Thing Types.
Number of Thing Types to be returned.
Success.
Unauthorized
Server error.
Response Content-Types: application/json
Response Example (200 OK)
{
"meta": {
"limit": "integer",
"offset": "integer"
},
"data": [
{
"id": "024d804b-1267-4483-aab8-f25f22441062",
"name": "BRAND Temperature Sensor",
"created": "2017-07-18T09:38:16.164Z",
"public": true
}
]
}
Response Example (401 Unauthorized)
{
"error": "Unauthorized."
}
Response Example (500 Internal Server Error)
{
"error": "Something went wrong."
}
Get Thing Type
Returns a specific Thing Type.
ID of the Thing Type to be returned.
Success.
Invalid parameters.
Unauthorized.
Thing Type not found.
Server error.
Response Content-Types: application/json
Response Example (200 OK)
{
"id": "024d804b-1267-4483-aab8-f25f22441062",
"name": "BRAND Temperature Sensor",
"created": "2017-07-18T09:38:16.164Z",
"public": true
}
Response Example (400 Bad Request)
{
"error": "'id' must be a valid GUID"
}
Response Example (401 Unauthorized)
{
"error": "Unauthorized."
}
Response Example (404 Not Found)
{
"error": "Not found."
}
Response Example (500 Internal Server Error)
{
"error": "Something went wrong."
}
Publish a Thing Type
Publishes a single Thing Type. This enables other Geeny developers to register Things with this Thing Type.
Your user JWT.
ID of the Thing Type to be published.
Response Content-Types: application/json
Response Example (200 OK)
{
"id": "024d804b-1267-4483-aab8-f25f22441062",
"name": "BRAND Temperature Sensor",
"created": "2017-07-18T09:38:16.164Z",
"public": true
}
Delete a Thing Type
Deletes a specific Thing Type.
ID of the Thing Type to be deleted.
Your user JWT.
Thing Type deleted.
Response Content-Types: application/json
Get Resources
Returns all of the resources (i.e., Message Types and routing information) of a given Thing Type.
ID of the Thing Type to be queried.
Success.
Invalid parameters.
Unauthorized
Invalid parameters.
Server error.
Response Content-Types: application/json
Response Example (200 OK)
{
"meta": {
"limit": "50",
"offset": "0"
},
"data": [
{
"uri": "temperature/now",
"method": "pub",
"message_type": "75d93472-4b81-46f1-848c-bfa8bf6de881"
}
]
}
Response Example (400 Bad Request)
{
"error": "'id' must be a valid GUID"
}
Response Example (401 Unauthorized)
{
"error": "Unauthorized."
}
Response Example (404 Not Found)
{
"error": "Resources not found for Thing Type 024d804b-1267-4483-aab8-f25f22441061"
}
Response Example (500 Internal Server Error)
{
"error": "Something went wrong."
}
Things
Create new Thing
Registers a Thing and generates new certificates for it.
The data of the new Thing. See the model definition below for more information about Thing data properties.
Request Content-Types: application/json
Request Example
{
"name": "Humidity Sensor #1",
"serial_number": "1L080B50260",
"thing_type": "4f2c563b-364c-485b-b2b8-3b25d9b9a5ce"
}
New Thing created.
Invalid request.
Unauthorized.
Server error.
Response Content-Types: application/json
Response Example (201 Created)
{
"id": "ede148c5-4eff-4f30-bb54-d41048ee5caa",
"name": "Humidity Sensor #1",
"serial_number": "1L080B50260",
"certs": {
"ca": "-----BEGIN CERTIFICATE-----...",
"cert": "-----BEGIN CERTIFICATE-----...",
"key": "-----BEGIN RSA PRIVATE KEY-----..."
},
"thing_type": "4f2c563b-364c-485b-b2b8-3b25d9b9a5ce",
"created": "2017-07-18T11:54:34.611Z"
}
Response Example (400 Bad Request)
{
"error": "'id' must be a valid GUID"
}
Response Example (401 Unauthorized)
{
"error": "Unauthorized."
}
Response Example (500 Internal Server Error)
{
"error": "Something went wrong."
}
Get all Things
Returns an array of all the Things on the platform. You can supply one or more Thing Type IDs to limit the types of Things to be returned.
Number by which to offset the list of Things.
Number of Things to be returned.
Restrict the response to one or more Thing Types by supplying their Thing Type IDs (comma separated).
Success.
Unauthorized.
Server error.
Response Content-Types: application/json
Response Example (200 OK)
{
"meta": {
"limit": "50",
"offset": "0"
},
"data": [
{
"id": "ab541d15-e785-4f63-9073-90b40432e72c",
"name": "Temperature Sensor #1",
"serial_number": "1L080B50230",
"thing_type": "024d804b-1267-4483-aab8-f25f22441062",
"created": "2017-07-18T09:38:16.164Z"
}
]
}
Response Example (401 Unauthorized)
{
"error": "Unauthorized."
}
Response Example (500 Internal Server Error)
{
"error": "Something went wrong."
}
Get Thing
Returns a specific Thing.
ID of the Thing to be returned.
Success.
Invalid parameters.
Unauthorized.
Not found.
Server error.
Response Content-Types: application/json
Response Example (200 OK)
{
"id": "ab541d15-e785-4f63-9073-90b40432e72c",
"name": "Temperature Sensor #1",
"serial_number": "1L080B50230",
"thing_type": "024d804b-1267-4483-aab8-f25f22441062",
"created": "2017-07-18T09:38:16.164Z"
}
Response Example (400 Bad Request)
{
"error": "'id' must be a valid GUID"
}
Response Example (401 Unauthorized)
{
"error": "Unauthorized."
}
Response Example (404 Not Found)
{
"error": "Not found."
}
Response Example (500 Internal Server Error)
{
"error": "Something went wrong."
}
Delete Thing
Un-registers a Thing from the platform. Does not delete historical records of data sent by the Thing.
ID of the Thing to be deleted.
Thing deleted.
Invalid parameters.
Unauthorized.
Not found.
Server error.
Response Content-Types: application/json
Response Example (400 Bad Request)
{
"error": "'id' must be a valid GUID"
}
Response Example (401 Unauthorized)
{
"error": "Unauthorized."
}
Response Example (404 Not Found)
{
"error": "Not found."
}
Response Example (500 Internal Server Error)
{
"error": "Something went wrong."
}
Update Thing
Modifies one or more properties on a Thing.
New data for the Thing. Only the properties to be updated must be supplied. See the model definition below for more information.
ID of the Thing to be updated.
Request Example
{
"name": "Updated Humidity Sensor #1"
}
Success.
Invalid parameters.
Unauthorized.
Not found.
Server error.
Response Content-Types: application/json
Response Example (200 OK)
{
"id": "ab541d15-e785-4f63-9073-90b40432e72c",
"name": "Temperature Sensor #1",
"serial_number": "1L080B50230",
"thing_type": "024d804b-1267-4483-aab8-f25f22441062",
"created": "2017-07-18T09:38:16.164Z"
}
Response Example (400 Bad Request)
{
"error": "'id' must be a valid GUID"
}
Response Example (401 Unauthorized)
{
"error": "Unauthorized."
}
Response Example (404 Not Found)
{
"error": "Not found."
}
Response Example (500 Internal Server Error)
{
"error": "Something went wrong."
}
Schema Definitions
Thing: object
- id: string (uuid)
-
The Thing's unique ID.
- name: string
-
The name of the Thing.
- serial_number: string
-
Serial number of the Thing.
- thing_type: string (uuid)
-
ID of the Thing Type used to define the Thing.
- created: string (date-time)
-
Date and time when the Thing was registered on Geeny.
Example
{
"id": "ab541d15-e785-4f63-9073-90b40432e72c",
"name": "Temperature Sensor #1",
"serial_number": "1L080B50230",
"thing_type": "024d804b-1267-4483-aab8-f25f22441062",
"created": "2017-07-18T09:38:16.164Z"
}
ThingType: object
- id: string (uuid)
-
Unique ID of the Thing Type.
- name: string
-
Name of the Thing Type.
- public: string (boolean)
-
Specifies whether or not other users can create Things of this Thing Type.
- created: string (date-time)
-
Date and time when the Thing Type was created.
Example
{
"id": "024d804b-1267-4483-aab8-f25f22441062",
"name": "BRAND Temperature Sensor",
"created": "2017-07-18T09:38:16.164Z",
"public": true
}
MessageType: object
- id: string (uuid)
-
Unique ID of the Message Type.
- name: string
-
Name of the Message Type.
- description: string
-
Description of the Message Type.
- media_type: string (uuid)
-
Encoding format of the data contained in messages of this type.
- tags: string[]
-
Optional categorization tags for the Message Type.
- created: string (date-time)
-
Date and time when the Message Type was created.
Example
{
"id": "75d93472-4b81-46f1-848c-bfa8bf6de881",
"name": "Instantaneous Temperature Value",
"media_type": "application/json",
"description": "Instantaneous temperature value",
"created": "2017-07-18T09:38:16.164Z",
"tags": [
"temperature",
"sensor",
"BRAND"
]
}
Resource: object
A schema containing a Message Type and information on how and where it will be published or received via subscription.
- uri: string
-
URI where the Message Type is to be published or consumed via subscription.
- method: string
-
Specifies whether this resource will be published by a Thing (pub) or whether a Thing will subscribe to receiving the message at the given URI (sub).
- message_type: string (uuid)
-
ID of the Message Type that corresponds with the resource's payload.
Example
{
"uri": "temperature/now",
"method": "pub",
"message_type": "75d93472-4b81-46f1-848c-bfa8bf6de881"
}
NewThing: object
- name: string
-
Name of the Thing.
- serial_number: string
-
Serial number of the Thing.
- thing_type: string (uuid)
-
ID of the Thing Type which applies to the Thing.
Example
{
"name": "Humidity Sensor #1",
"serial_number": "1L080B50260",
"thing_type": "4f2c563b-364c-485b-b2b8-3b25d9b9a5ce"
}
NewThingType: object
- name: string
- resources: object[]
-
Array of schemas containing Message Types and information on how the Thing Type publishes or receives them via subscription.
Example
{
"name": "BRAND Humidity Sensor",
"resources": [
{
"uri": "humidity/now",
"method": "pub",
"message_type": "e27141fa-5805-41df-94f9-4aec44150b44"
}
]
}
NewMessageType: object
- name: string
-
Name of the Message Type.
- description: string
-
A description of the Message Type.
- media_type: string
-
Encoding format for the data in messages of this type.
- tags: string[]
-
Optional tags for categorizing the Message Type.
Example
{
"name": "Instantaneous Humidity Value",
"description": "Instantaneous Humidity Value",
"media_type": "application/cbor",
"tags": [
"humidity",
"sensor",
"BRAND"
]
}
NewThingResponse: object
- id: string (uuid)
- name: string
- serial_number: string
- certs: object
- thing_type: string (uuid)
- created: string (date-time)
Example
{
"id": "ede148c5-4eff-4f30-bb54-d41048ee5caa",
"name": "Humidity Sensor #1",
"serial_number": "1L080B50260",
"certs": {
"ca": "-----BEGIN CERTIFICATE-----...",
"cert": "-----BEGIN CERTIFICATE-----...",
"key": "-----BEGIN RSA PRIVATE KEY-----..."
},
"thing_type": "4f2c563b-364c-485b-b2b8-3b25d9b9a5ce",
"created": "2017-07-18T11:54:34.611Z"
}
ThingsResponse: object
- meta: object
- data: object[]
Example
{
"meta": {
"limit": "50",
"offset": "0"
},
"data": [
{
"id": "ab541d15-e785-4f63-9073-90b40432e72c",
"name": "Temperature Sensor #1",
"serial_number": "1L080B50230",
"thing_type": "024d804b-1267-4483-aab8-f25f22441062",
"created": "2017-07-18T09:38:16.164Z"
}
]
}
ResourcesResponse: object
- meta: object
- data: object[]
Example
{
"meta": {
"limit": "50",
"offset": "0"
},
"data": [
{
"uri": "temperature/now",
"method": "pub",
"message_type": "75d93472-4b81-46f1-848c-bfa8bf6de881"
}
]
}
MessageTypesResponse: object
- meta: object
- data: object[]
Example
{
"meta": {
"limit": "integer",
"offset": "integer"
},
"data": [
{
"id": "75d93472-4b81-46f1-848c-bfa8bf6de881",
"name": "Instantaneous Temperature Value",
"media_type": "application/json",
"description": "Instantaneous temperature value",
"created": "2017-07-18T09:38:16.164Z",
"tags": [
"temperature",
"sensor",
"BRAND"
]
}
]
}
ThingTypesResponse: object
- meta: object
- data: object[]
Example
{
"meta": {
"limit": "integer",
"offset": "integer"
},
"data": [
{
"id": "024d804b-1267-4483-aab8-f25f22441062",
"name": "BRAND Temperature Sensor",
"created": "2017-07-18T09:38:16.164Z",
"public": true
}
]
}