# Types v2
# PUB Create a type definition
# from/module/{module_id}/action/type/create
Use this endpoint to create a type definition of a given model definition.
Parameters:
Name | Type | Description | Accepted values |
---|---|---|---|
module_id | string | Module identifier | Name of module |
Message format
Properties:
Key | Value | Notes | Mandatory |
---|---|---|---|
correlationId | <string> | Unique String (e.g. uuid) | No |
ack | <string> | No | |
target | <string> | No | |
context | <string> | No | |
timestamp | <string> | Date time in ISO-8601 format | No |
These properties can be included in the request by adding them to the topic to which you are sending the messages. See the Message Properties section to find out more.
Here is an example of the properties used:
from/module/{module_id}/action/type/create&ack=all
Payload information:
Key | Value | Notes | Mandatory |
---|---|---|---|
typeId | <string> | Format: uuid | Yes |
model | <string> | Yes | |
version | <string> | No | |
name | <string> | No | |
properties | <string> | No | |
variables | <string> | No | |
references | <string> | No | |
methods | <string> | No | |
attributes | <string> | No |
Here is a sample payload:
{
"model": "abb.ability.configuration",
"typeId": "abb.ability.configuration.edge.sample",
"version": "1.0.0",
"description": "Description",
"attributes": { },
"properties": { }
}
# SUB Ack for type definition creation
# to/module/{module_id}/ack/type/create
Use this endpoint to check whether the type definition was created successfully.
Parameters:
Name | Type | Description | Accepted values |
---|---|---|---|
module_id | string | Module identifier | Name of module |
# PUB Delete a type definition
# from/module/{module_id}/action/type/delete
Use this endpoint to delete a type definition.
Parameters:
Name | Type | Description | Accepted values |
---|---|---|---|
module_id | string | Module identifier | Name of module |
Message format
Properties:
Key | Value | Notes | Mandatory |
---|---|---|---|
correlationId | <string> | Unique String (e.g.uuid) | No |
ack | <string> | No | |
target | <string> | No | |
context | <string> | No | |
timestamp | <string> | Date time in ISO-8601 format | No |
model | <string> | No | |
typeId | <string> | No | |
version | <string> | No |
These properties can be included in the request by adding them to the topic to which you are sending the messages. See the Message Properties section to find out more.
Here is an example of the properties used:
from/module/{module_id}/action/type/delete&typeId={type_id}&version={version}&model={model_id}&ack=all
Payload information
There is no payload for this endpoint.
# SUB Ack for type definition deletion
# to/module/{module_id}/ack/type/delete
Use this endpoint to check whether the type definition was deleted successfully.
Parameters:
Name | Type | Description | Accepted values |
---|---|---|---|
module_id | string | Module identifier | Name of module |
# PUB Query a type definition
# from/module/{module_id}/action/type/query
Use this endpoint to query one or more type definitions.
Parameters:
Name | Type | Description | Accepted values |
---|---|---|---|
module_id | string | Module identifier | Name of module |
Message format
Properties:
Key | Value | Notes | Mandatory |
---|---|---|---|
correlationId | <string> | Unique String (e.g. uuid) | No |
ack | <string> | No | |
target | <string> | No | |
context | <string> | No | |
timestamp | <string> | Date time in ISO-8601 format | No |
These properties can be included in the request by adding them to the topic you are sending the messages to. See the Message Properties section to find out more.
Here is an example of the properties used:
from/module/{module_id}/action/type/query&ack=all
Payload information:
Key | Value | Mandatory |
---|---|---|
limit | <integer> | No |
filter | <string> | Yes |
Here is a sample payload:
{
"limit": 1,
"filter": "typeId='foobar' AND version starts_with '1.'"
}
# SUB
# to/module/{module_id}/ack/type/query
Use this endpoint to check whether the type definition query was carried out successfully.
Multiple messages
There may be more than one message per id if the result set size exceeds the C2D message limit.
Parameters:
Name | Type | Description | Accepted values |
---|---|---|---|
module_id | string | Module identifier | Name of module |
Valid ack property values
Because the acknowledgement also contains types resulting from the query, you need to request a positive acknowledgement to be able to see those results. This means that "ack" requests must contain the "all" or "positive" property value to be valid.
Depending on the number of types returned, there may be one or more acknowledgement messages. This is because a single acknowledgement message cannot exceed the 64KB C2D message size limit, including message headers.
You can find more information regarding this topic on our Platform Specifications page.