Skip to main content
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 tenants is 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 tenants field can be updated to reassign a resource to different tenants (within the caller's authorized set).

Authentication

Security Scheme Type:

http

HTTP Authorization Scheme:

bearer