Types by data source
- Last UpdatedNov 02, 2026
- 2 minute read
The types by datasource feature enables you to retrieve type information for types that belong to an entity or event from a particular datasource.
Use these query fields:
-
entityTypesByDataSource for components on any entities from that particular datasource.
-
eventTypesByDataSource for the type on any events from that particular datasource.
When to use types by datasource
Use types by datasource queries when you want to query types ingested from a particular datasource that also belong to an entity or an event.
Field reference
entityTypesByDataSource
You must specify the non-whitespace datasource to filter on:
entityTypesByDataSource(
dataSource: String!
): TypesByDataSourceResult`
eventTypesByDataSource
You must specify the non-whitespace datasource to filter on:
eventTypesByDataSource(
dataSource: String!
): TypesByDataSourceResult`
TypesByDataSourceResult
type TypesByDataSourceResult {
items: [Type!]
responseContext: ResponseContext
}
Examples
entityTypesByDataSource
If you send a query specifying datasource PI, you will find all components on any entities from datasource PI:
query {
entityTypesByDataSource(dataSource: "PI") {
responseContext {
requestTime
}
items {
id
name
state
typeCode
baseType {
id
}
isInheritable
isSystemDefined
properties {
id
name
state
uom
typeCode
isRequired
}
relationships {
id
name
state
isRequired
isCollection
targetTypes {
id
}
}
}
}
}
Your response should look like the following:
{
"data": {
"entityTypesByDataSource": {
"responseContext": {
"requestTime": "2026-08-11T17:58:17.2387831Z"
},
"items": [
{
"id": "PI.Asset.Definition.Pump",
"name": "PI.Asset.Definition.Pump",
"state": "ACTIVE",
"typeCode": "OBJECT",
"baseType": {
"id": "BaseAsset"
},
"isInheritable": true,
"isSystemDefined": false,
"properties": [
{
"id": "Temperature",
"name": "Temperature",
"state": "ACTIVE",
"uom": "degree Fahrenheit",
"typeCode": "DOUBLE",
"isRequired": false
}
],
"relationships": [
{
"id": "IsPrimarilyAChildOf",
"name": "is primarily a child of",
"state": "ACTIVE",
"isRequired": false,
"isCollection": false,
"targetTypes": [
{
"id": "BaseAsset"
}
]
},
{
"id": "FlowRate",
"name": "Flowrate",
"state": "ACTIVE",
"isRequired": false,
"isCollection": false,
"targetTypes": [
{
"id": "BaseStream"
}
]
}
]
}
]
}
}
}
eventTypesByDataSource
If you send a query specifying datasource MES, you will find all types on any events from datasource MES:
query {
eventTypesByDataSource(dataSource: "MES") {
responseContext {
requestTime
}
items {
id
name
state
typeCode
baseType {
id
}
isInheritable
isSystemDefined
properties {
id
name
state
uom
typeCode
isRequired
}
relationships {
id
name
state
isRequired
isCollection
targetTypes {
id
}
}
}
}
}
Your response should look like the following:
{
"data": {
"eventTypesByDataSource": {
"responseContext": {
"requestTime": "2026-08-11T17:58:17.2387831Z"
},
"items": [
{
"id": "MES.Event.Definition.TemperatureAlarm",
"name": "TemperatureAlarm Type",
"state": "ACTIVE",
"typeCode": "OBJECT",
"baseType": {
"id": "BaseEvent"
},
"isInheritable": true,
"isSystemDefined": false,
"properties": [
{
"id": "Temperature",
"name": "Temperature",
"state": "ACTIVE",
"uom": "degree Fahrenheit",
"typeCode": "DOUBLE",
"isRequired": false
}
],
"relationships": [
{
"id": "IsPrimarilyAChildOf",
"name": "is primarily a child of",
"state": "ACTIVE",
"isRequired": false,
"isCollection": false,
"targetTypes": [
{
"id": "BaseAsset"
}
]
}
]
}
]
}
}
}