Create and Manage Data Versions API

Important

Some or all of this functionality is available as part of a preview release. The content and the functionality are subject to change.

Manufacturing data solutions supports the ability to version all data loaded into it. It deploys with a default version, and you can later create new versions and load data separately into them. You can switch between versions at any time. Only one version can be active at a time. To check the status of data versions, check the value of dataVersionStatus in the response of the Health Check API.

Important

You should not ingest data while creating or switching data versions. All other Manufacturing data solutions operations will be temporarily halted while creating or switching data versions. Also be aware that data versions for data ingested using OPC UA is not yet supported. For now, the user will need to update the OPC UA mapping table to use the mappings for the desired data version.

Get Data Versions API

Retrieves a list of all data versions.

Method

GET

URL

https://{serviceUrl}/mds/service/admin/version?api-version=2024-09-30-preview

Role Required

Manufacturing Admin

Request headers

Name Required Description
Authorization True The bearer token used to authenticate the request
User-Agent True Short string to identify the client. See here for details

Request parameters

Name Required Type Default Description
api-version True string - The API version to use (2024-09-30-preview)

Response

Response codes

Code Name Description
200 OK Successful request
401 Unauthorized Unable to authenticate the request
403 Forbidden Insufficient role access: (for example, you don't have the right role or you aren't added to the registration)

Sample Response

{
    "currentVersion": "V2",
    "versions": [
        {
            "description": "Default DMM Data Version",
            "versionId": "V1",
            "isActive": false
        },
        {
            "description": "Second data version",
            "versionId": "V2",
            "isActive": true
        }
    ]
}

Create Data Version API

Create a new data version and set it as active. It uses a versionId one greater than the latest one.

Method

POST

URL

https://{serviceUrl}/mds/service/admin/version?api-version=2024-09-30-preview

Role Required

Manufacturing Admin

Request headers

Name Required Description
Authorization True The bearer token used to authenticate the request
User-Agent True Short string to identify the client. See here for details

Request parameters

Name Required Type Default Description
api-version True string - The API version to use (2024-09-30-preview)

Request payload

{
    "description": "string"
}

Response

Response codes

Code Name Description
202 OK Accepted request
401 Unauthorized Unable to authenticate the request
403 Forbidden Insufficient role access: (for example, you don't have the right role or you aren't added to the registration)

Switch Data Version API

Switch to an existing data version.

Method

PUT

URL

https://{serviceUrl}/mds/service/admin/version?api-version=2024-09-30-preview

Role Required

Manufacturing Admin

Request headers

Name Required Description
Authorization True The bearer token used to authenticate the request
User-Agent True Short string to identify the client. See here for details

Request parameters

Name Required Type Default Description
api-version True string - The API version to use (2024-09-30-preview)

Request payload

{
    "versionId": "string" // example: V2
}

Response

Response codes

Code Name Description
202 OK Accepted request
304 Not Modified No change
400 Bad request Syntax of the body is incorrect. (Bad body request)
401 Unauthorized Unable to authenticate the request
403 Forbidden Insufficient role access: (for example, you don't have the right role or you aren't added to the registration)

Delete Data Version API

Delete an existing data version.

Note

You cannot delete the active data version.

Method

DELETE

URL

https://{serviceUrl}/mds/service/admin/version?api-version=2024-09-30-preview

Role Required

Manufacturing Admin

Request headers

Name Required Description
Authorization True The bearer token used to authenticate the request
User-Agent True Short string to identify the client. See here for details

Request parameters

Name Required Type Default Description
api-version True string - The API version to use (2024-09-30-preview)

Request payload

{
    "versionId": "string" // example: V2
}

Response

Response codes

Code Name Description
202 OK Accepted request
400 Bad request Syntax of the body is incorrect. (Bad body request)
401 Unauthorized Unable to authenticate the request
403 Forbidden Insufficient role access: (for example, you don't have the right role or you aren't added to the registration)