Partilhar via


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 shouldn't ingest data while creating or switching data versions. All other Manufacturing data solutions operations are temporarily halted while creating or switching data versions. Also data versions for data ingested using OPC UA isn't yet supported. For now, the user needs 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

This API doesn't return a response body.

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

This API doesn't return a response body.

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

This API doesn't return a response body.

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 can't 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

This API doesn't return a response body.

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)

Job Status API

Retrieve the job status using the job ID.

Method

GET

URL

https://{serviceUrl}/mds/service/admin/job/status/{jobId}?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

This API doesn't require request payload.

Response

{
	"jobId": "6f3b2e7c7e9a4d61b727e7644ab404d1",
	"jobStatus": "NotCompleted",
	"message": "Job status: NotCompleted, Operation ID: AdxVersioningJob."
}

Response codes

Code Name Description
200 OK Successful 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)