Version: 1.4.0
connhex-resources
Connhex Resources APIs are auto-generated from custom Connhex JSON schemas defined by the Connhex administrator. Each schema defines the attributes and the relationships of a given resource.
Here, as an example, we present a set of APIs automatically generated from the following Connhex JSON Schemas:
TypeOneResource
{
"$id": "https://connhex.com/type-one-resource.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"serial": {
"type": "string",
"title": "Serial"
},
"typeTwoResources": {
"type": "array",
"title": "TypeTwoResources",
"items": {
"type": "string",
"connhex": {
"id": "typeTwoResource"
}
}
},
"createdAt": {
"type": "string",
"title": "Creation Date",
"format": "date-time"
}
}
}
TypeTwoResource
{
"$id": "https://connhex.com/type-two-resource.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Name"
},
"typeOneResource": {
"type": "array",
"title": "TypeOneResource",
"connhex": {
"id": "typeOneResource"
}
},
"createdAt": {
"type": "string",
"title": "Creation Date",
"format": "date-time"
}
}
}
For further details on how Connhex Resources works please check here.
Tenants
Every resource schema must include a tenants field (string[]). This field is required by the platform to support multi-tenancy:
- On read / list: results are automatically scoped to resources belonging to the caller's authorized tenants.
- On create: if
tenantsis not provided in the request body, the resource is automatically assigned to the caller's authorized tenants. If provided, the value is intersected with the caller's authorized tenants. - On update: the
tenantsfield can be updated to reassign a resource to different tenants (within the caller's authorized set).
Authentication
- HTTP: Bearer Auth
- API Key: chx_auth_session
- API Key: thingKey
Security Scheme Type: | http |
|---|---|
HTTP Authorization Scheme: | bearer |
Security Scheme Type: | apiKey |
|---|---|
Cookie parameter name: | chx_auth_session |
Use Authorization header: Thing <thing-key>
Security Scheme Type: | apiKey |
|---|---|
Header parameter name: | Authorization |