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
NameLocated inDescriptionRequiredSchema
deviceTypequeryValues are 'Device' or 'Agent'. Selects only devices of that type.Nostring (string)
formatqueryThe format of the response document: 'xml' or 'json'Nostring (string)
prettyqueryInstructs the result to be pretty printedNoboolean (bool)
Responses
CodeDescription
200OK

/asset

GET

Summary

MTConnect asset request

Description

Returns up to count assets

Parameters
NameLocated inDescriptionRequiredSchema
countqueryMaximum number of entities to include in resultsNolong
devicequeryDevice UUID or nameNostring (string)
formatqueryThe format of the response document: 'xml' or 'json'Nostring (string)
prettyqueryInstructs the result to be pretty printedNoboolean (bool)
removedqueryBoolean indicating if removed assets are included in resultsNoboolean (bool)
typequeryOnly include assets of type type in the resultsNostring (string)
Responses
CodeDescription
200OK

/asset/{assetIds}

GET

Summary

MTConnect asset request

Description

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

Parameters
NameLocated inDescriptionRequiredSchema
assetIdspathSemi-colon (;) separated list of assetIdsYesstring (string)
Responses
CodeDescription
200OK

/assets

GET

Summary

MTConnect assets request

Description

Returns up to count assets

Parameters
NameLocated inDescriptionRequiredSchema
countqueryMaximum number of entities to include in resultsNolong
devicequeryDevice UUID or nameNostring (string)
formatqueryThe format of the response document: 'xml' or 'json'Nostring (string)
prettyqueryInstructs the result to be pretty printedNoboolean (bool)
removedqueryBoolean indicating if removed assets are included in resultsNoboolean (bool)
typequeryOnly include assets of type type in the resultsNostring (string)
Responses
CodeDescription
200OK

/assets/{assetIds}

GET

Summary

MTConnect assets request

Description

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

Parameters
NameLocated inDescriptionRequiredSchema
assetIdspathSemi-colon (;) separated list of assetIdsYesstring (string)
Responses
CodeDescription
200OK

/cancel/id={string}

GET

Summary

MTConnect WebServices Cancel Stream

Description

Cancels a streaming sample request

Parameters
NameLocated inDescriptionRequiredSchema
stringpathYesstring (string)
Responses
CodeDescription
200OK

/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
NameLocated inDescriptionRequiredSchema
atquerySequence number at which the observation snapshot is takenNointeger (uint64)
deviceTypequeryValues are 'Device' or 'Agent'. Selects only devices of that type.Nostring (string)
formatqueryThe format of the response document: 'xml' or 'json'Nostring (string)
intervalqueryTime in ms between publishing data–starts streamingNolong
pathqueryXPath to filter DataItems matched against the probe documentNostring (string)
prettyqueryInstructs the result to be pretty printedNoboolean (bool)
Responses
CodeDescription
200OK

/probe

GET

Summary

MTConnect probe request

Description

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

Parameters
NameLocated inDescriptionRequiredSchema
deviceTypequeryValues are 'Device' or 'Agent'. Selects only devices of that type.Nostring (string)
formatqueryThe format of the response document: 'xml' or 'json'Nostring (string)
prettyqueryInstructs the result to be pretty printedNoboolean (bool)
Responses
CodeDescription
200OK

/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
NameLocated inDescriptionRequiredSchema
countqueryMaximum number of entities to include in resultsNolong
deviceTypequeryValues are 'Device' or 'Agent'. Selects only devices of that type.Nostring (string)
formatqueryThe format of the response document: 'xml' or 'json'Nostring (string)
fromquerySequence number at to start reporting observationsNointeger (uint64)
heartbeatqueryTime in ms between publishing a empty document when no data has changedNolong
intervalqueryTime in ms between publishing data–starts streamingNolong
pathqueryXPath to filter DataItems matched against the probe documentNostring (string)
prettyqueryInstructs the result to be pretty printedNoboolean (bool)
toquerySequence number at to stop reporting observationsNointeger (uint64)
Responses
CodeDescription
200OK

/{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
NameLocated inDescriptionRequiredSchema
devicepathDevice UUID or nameYesstring (string)
deviceTypequeryValues are 'Device' or 'Agent'. Selects only devices of that type.Nostring (string)
formatqueryThe format of the response document: 'xml' or 'json'Nostring (string)
prettyqueryInstructs the result to be pretty printedNoboolean (bool)
Responses
CodeDescription
200OK

/{device}/asset

GET

Summary

MTConnect asset request

Description

Returns up to count assets for deivce device

Parameters
NameLocated inDescriptionRequiredSchema
devicepathDevice UUID or nameYesstring (string)
countqueryMaximum number of entities to include in resultsNolong
devicequeryDevice UUID or nameNostring (string)
formatqueryThe format of the response document: 'xml' or 'json'Nostring (string)
prettyqueryInstructs the result to be pretty printedNoboolean (bool)
removedqueryBoolean indicating if removed assets are included in resultsNoboolean (bool)
typequeryOnly include assets of type type in the resultsNostring (string)
Responses
CodeDescription
200OK

/{device}/assets

GET

Summary

MTConnect assets request

Description

Returns up to count assets for deivce device

Parameters
NameLocated inDescriptionRequiredSchema
devicepathDevice UUID or nameYesstring (string)
countqueryMaximum number of entities to include in resultsNolong
devicequeryDevice UUID or nameNostring (string)
formatqueryThe format of the response document: 'xml' or 'json'Nostring (string)
prettyqueryInstructs the result to be pretty printedNoboolean (bool)
removedqueryBoolean indicating if removed assets are included in resultsNoboolean (bool)
typequeryOnly include assets of type type in the resultsNostring (string)
Responses
CodeDescription
200OK

/{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
NameLocated inDescriptionRequiredSchema
devicepathDevice UUID or nameYesstring (string)
atquerySequence number at which the observation snapshot is takenNointeger (uint64)
deviceTypequeryValues are 'Device' or 'Agent'. Selects only devices of that type.Nostring (string)
formatqueryThe format of the response document: 'xml' or 'json'Nostring (string)
intervalqueryTime in ms between publishing data–starts streamingNolong
pathqueryXPath to filter DataItems matched against the probe documentNostring (string)
prettyqueryInstructs the result to be pretty printedNoboolean (bool)
Responses
CodeDescription
200OK

/{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
NameLocated inDescriptionRequiredSchema
devicepathDevice UUID or nameYesstring (string)
deviceTypequeryValues are 'Device' or 'Agent'. Selects only devices of that type.Nostring (string)
formatqueryThe format of the response document: 'xml' or 'json'Nostring (string)
prettyqueryInstructs the result to be pretty printedNoboolean (bool)
Responses
CodeDescription
200OK

/{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
NameLocated inDescriptionRequiredSchema
devicepathDevice UUID or nameYesstring (string)
countqueryMaximum number of entities to include in resultsNolong
deviceTypequeryValues are 'Device' or 'Agent'. Selects only devices of that type.Nostring (string)
formatqueryThe format of the response document: 'xml' or 'json'Nostring (string)
fromquerySequence number at to start reporting observationsNointeger (uint64)
heartbeatqueryTime in ms between publishing a empty document when no data has changedNolong
intervalqueryTime in ms between publishing data–starts streamingNolong
pathqueryXPath to filter DataItems matched against the probe documentNostring (string)
prettyqueryInstructs the result to be pretty printedNoboolean (bool)
toquerySequence number at to stop reporting observationsNointeger (uint64)
Responses
CodeDescription
200OK

Clone this wiki locally