Type

Updating types of a schema

put

Updates assigned types to the schema. It's allowed to change the assigned types to the newest schema as well as to the previous versions of the schema. This operation does not generate a new version of the schema.

Required scopes

  • schema.schema_manage

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: Always write the tenant name in lowercase.

Pattern: ^[a-z][a-z0-9]+$
idstringRequired

Unique identifier of the entity.

Query parameters
versionintegerRequired

Version of the entity.

modestring · enumOptional

Defines how types assigned to given schema should be resolved. REPLACE is a default value. REPLACE takes provided types and replaces the existing ones with it. ADD adds provided types to the existing ones. REMOVE removes provided types from the existing ones.

Default: REPLACEPossible values:
Bodystring · enum[]

List of types to which assign the schema.

itemsstring · enumOptional

Type which the schema should be assigned to. Can be one of the predefined values or any custom schema type id.

Possible values:
Responses
204
No content
put
PUT /schema/{tenant}/schemas/{id}/types HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 19

[
  "PRODUCT",
  "ORDER"
]

No content

Retrieving types

get

Retrieves types which have at least one schema assigned.

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: Always write the tenant name in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Responses
200Success
application/json
Responsestring[]
get
GET /schema/{tenant}/types HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  "ORDER",
  "PRODUCT",
  "QUOTE"
]

Was this helpful?