Data revisioning

PolyWorks|DataLoop keeps track of every modification made to resources. DataLoop API allows you to modify some resource properties so understanding how the revision process works is fundamental.

Every modification made to a resource creates a new resource revision. Each revision is linked to an upload message that contains the name of the user, the date, and some information about the modification. The diagram below shows an example of a resource lifespan with three revisions, with each one being linked to a message.

Users should create an upload message prior to using it in a modification endpoint.
This can be done using POST UploadMessages endpoints with a payload.

POST https://example.com/dataloopcore/api/metrology/v2/UploadMessages
{
    "message": "Any information you want to mention about the coming modifications"
}

The previous call will return the created message:

{
    "@odata.context": "https://127.0.0.1:5003/v1/$metadata#UploadMessages/$entity",
    "date": "2024-04-15T14:00:09.9383071Z",
    "id": "f214d01e-07a2-4dfc-cabb-08dc5d545d0f",
    "message": "Any information you want to mention about the coming modifications",
    "polyworksversion": "",
    "user": "Username",
    "schemaversion": "4.76",
    "closed": false
}

The ID of the created upload message can then be used as shown in the workspace modification example below:

PATCH https://example.com/dataloopcore/api/metrology/v2/Workspaces/WORKSPACE_ID
[
	{
    "op": "replace",
    "path": "note",
    "value": "Whatever you want to mention on the workspace"
	},
	{
    "op": "replace",
    "path": "uploadMessageId",
    "value": "f214d01e-07a2-4dfc-cabb-08dc5d545d0f"
	}
]

📘

JSON Patch document

For more information about the JSON Patch syntax, refer to: JSON Patch