Skip to content

Swagger REST API Documentation

William Sobel edited this page Jun 5, 2025 · 2 revisions

MTConnect – REST API

MTConnect REST API

Version: MTConnect Agent Version 2.5.0.6

Contact information:
will@metalogi.io

License: Apache 2.0

For information related to MTConnect


/

GET

Summary

MTConnect probe request

Description

Provides metadata service for the MTConnect Devices information model for all devices.

Parameters
Name Located in Description Required Schema
deviceType query Values are 'Device' or 'Agent'. Selects only devices of that type. No string (string)
format query The format of the response document: 'xml' or 'json' No string (string)
pretty query Instructs the result to be pretty printed No boolean (bool)
Responses
Code Description
200 OK

/asset

GET

Summary

MTConnect asset request

Description

Returns up to count assets

Parameters
Name Located in Description Required Schema
count query Maximum number of entities to include in results No long
device query Device UUID or name No string (string)
format query The format of the response document: 'xml' or 'json' No string (string)
pretty query Instructs the result to be pretty printed No boolean (bool)
removed query Boolean indicating if removed assets are included in results No boolean (bool)
type query Only include assets of type type in the results No string (string)
Responses
Code Description
200 OK

/asset/{assetIds}

GET

Summary

MTConnect asset request

Description

Returns a set of assets identified by asset ids asset separated by semi-colon (;)

Parameters
Name Located in Description Required Schema
assetIds path Semi-colon (;) separated list of assetIds Yes string (string)
Responses
Code Description
200 OK

/assets

GET

Summary

MTConnect assets request

Description

Returns up to count assets

Parameters
Name Located in Description Required Schema
count query Maximum number of entities to include in results No long
device query Device UUID or name No string (string)
format query The format of the response document: 'xml' or 'json' No string (string)
pretty query Instructs the result to be pretty printed No boolean (bool)
removed query Boolean indicating if removed assets are included in results No boolean (bool)
type query Only include assets of type type in the results No string (string)
Responses
Code Description
200 OK

/assets/{assetIds}

GET

Summary

MTConnect assets request

Description

Returns a set assets identified by asset ids asset separated by semi-colon (;)

Parameters
Name Located in Description Required Schema
assetIds path Semi-colon (;) separated list of assetIds Yes string (string)
Responses
Code Description
200 OK

/cancel/id={string}

GET

Summary

MTConnect WebServices Cancel Stream

Description

Cancels a streaming sample request

Parameters
Name Located in Description Required Schema
string path Yes string (string)
Responses
Code Description
200 OK

/current

GET

Summary

MTConnect current request

Description

Gets a stapshot of the state of all the observations for all devices optionally filtered by the path

Parameters
Name Located in Description Required Schema
at query Sequence number at which the observation snapshot is taken No integer (uint64)
deviceType query Values are 'Device' or 'Agent'. Selects only devices of that type. No string (string)
format query The format of the response document: 'xml' or 'json' No string (string)
interval query Time in ms between publishing data–starts streaming No long
path query XPath to filter DataItems matched against the probe document No string (string)
pretty query Instructs the result to be pretty printed No boolean (bool)
Responses
Code Description
200 OK

/probe

GET

Summary

MTConnect probe request

Description

Provides metadata service for the MTConnect Devices information model for all devices.

Parameters
Name Located in Description Required Schema
deviceType query Values are 'Device' or 'Agent'. Selects only devices of that type. No string (string)
format query The format of the response document: 'xml' or 'json' No string (string)
pretty query Instructs the result to be pretty printed No boolean (bool)
Responses
Code Description
200 OK

/sample

GET

Summary

MTConnect sample request

Description

Gets a time series of at maximum count observations for all devices optionally filtered by the path and starting at from. By default, from is the first available observation known to the agent

Parameters
Name Located in Description Required Schema
count query Maximum number of entities to include in results No long
deviceType query Values are 'Device' or 'Agent'. Selects only devices of that type. No string (string)
format query The format of the response document: 'xml' or 'json' No string (string)
from query Sequence number at to start reporting observations No integer (uint64)
heartbeat query Time in ms between publishing a empty document when no data has changed No long
interval query Time in ms between publishing data–starts streaming No long
path query XPath to filter DataItems matched against the probe document No string (string)
pretty query Instructs the result to be pretty printed No boolean (bool)
to query Sequence number at to stop reporting observations No integer (uint64)
Responses
Code Description
200 OK

/{device}

GET

Summary

MTConnect probe request

Description

Provides metadata service for the MTConnect Devices information model for device identified by device matching name or uuid.

Parameters
Name Located in Description Required Schema
device path Device UUID or name Yes string (string)
deviceType query Values are 'Device' or 'Agent'. Selects only devices of that type. No string (string)
format query The format of the response document: 'xml' or 'json' No string (string)
pretty query Instructs the result to be pretty printed No boolean (bool)
Responses
Code Description
200 OK

/{device}/asset

GET

Summary

MTConnect asset request

Description

Returns up to count assets for deivce device

Parameters
Name Located in Description Required Schema
device path Device UUID or name Yes string (string)
count query Maximum number of entities to include in results No long
device query Device UUID or name No string (string)
format query The format of the response document: 'xml' or 'json' No string (string)
pretty query Instructs the result to be pretty printed No boolean (bool)
removed query Boolean indicating if removed assets are included in results No boolean (bool)
type query Only include assets of type type in the results No string (string)
Responses
Code Description
200 OK

/{device}/assets

GET

Summary

MTConnect assets request

Description

Returns up to count assets for deivce device

Parameters
Name Located in Description Required Schema
device path Device UUID or name Yes string (string)
count query Maximum number of entities to include in results No long
device query Device UUID or name No string (string)
format query The format of the response document: 'xml' or 'json' No string (string)
pretty query Instructs the result to be pretty printed No boolean (bool)
removed query Boolean indicating if removed assets are included in results No boolean (bool)
type query Only include assets of type type in the results No string (string)
Responses
Code Description
200 OK

/{device}/current

GET

Summary

MTConnect current request

Description

Gets a stapshot of the state of all the observations for device device optionally filtered by the path

Parameters
Name Located in Description Required Schema
device path Device UUID or name Yes string (string)
at query Sequence number at which the observation snapshot is taken No integer (uint64)
deviceType query Values are 'Device' or 'Agent'. Selects only devices of that type. No string (string)
format query The format of the response document: 'xml' or 'json' No string (string)
interval query Time in ms between publishing data–starts streaming No long
path query XPath to filter DataItems matched against the probe document No string (string)
pretty query Instructs the result to be pretty printed No boolean (bool)
Responses
Code Description
200 OK

/{device}/probe

GET

Summary

MTConnect probe request

Description

Provides metadata service for the MTConnect Devices information model for device identified by device matching name or uuid.

Parameters
Name Located in Description Required Schema
device path Device UUID or name Yes string (string)
deviceType query Values are 'Device' or 'Agent'. Selects only devices of that type. No string (string)
format query The format of the response document: 'xml' or 'json' No string (string)
pretty query Instructs the result to be pretty printed No boolean (bool)
Responses
Code Description
200 OK

/{device}/sample

GET

Summary

MTConnect sample request

Description

Gets a time series of at maximum count observations for device device optionally filtered by the path and starting at from. By default, from is the first available observation known to the agent

Parameters
Name Located in Description Required Schema
device path Device UUID or name Yes string (string)
count query Maximum number of entities to include in results No long
deviceType query Values are 'Device' or 'Agent'. Selects only devices of that type. No string (string)
format query The format of the response document: 'xml' or 'json' No string (string)
from query Sequence number at to start reporting observations No integer (uint64)
heartbeat query Time in ms between publishing a empty document when no data has changed No long
interval query Time in ms between publishing data–starts streaming No long
path query XPath to filter DataItems matched against the probe document No string (string)
pretty query Instructs the result to be pretty printed No boolean (bool)
to query Sequence number at to stop reporting observations No integer (uint64)
Responses
Code Description
200 OK
Clone this wiki locally