Assign or remove a document from a work package.
When using this endpoint, be aware of the following behavior:
-
To be able to look up tasks associated to a work step each task model must have a unique form number.
-
If you associate a document with an object that has no assigned task, the software will look up the appropriate task model, assign the model to the task, and link the task to the work step, all at the same time.
-
An object will not have an assigned task if you create a work package step and associate it with the object in one operation.
Supported HTTPS Methods: GET, PUT, PATCH, POST
Request URLs:
-
Assign a punchlist to a work package - <HOSTNAME>/sc/datalake/v1/Instances(2)/Projects(313)/WorkPackages(1024)/WorkPackagesDocuments
-
Remove a punchlist from a work package - <HOSTNAME>/sc/datalake/v1/Instances(2)/Projects(313)/WorkPackages(1024)/WorkPackagesDocuments(9999)
Header parameters:
Header Parameter |
Description |
---|---|
Authorization |
A token required for authenticating a request. The bearer token is a string, usually generated by the server in response to a login request. You must include this header in every request. |
Content-Type |
The request format or the original media type of the resource. |
Sample request payload to add a document to a work package:
{
"WPId": 1024,
"DocumentId": 11077
}
Sample request payload to remove a document from a work package:
{
"dtRemoved": "2023-07-14T16:09:13-06:00"
}
Request payload parameters:
|
|
Required, Optional, |
|
---|---|---|---|
WPId |
Integer |
GET - Required PUT - Required PATCH - Required POST - Required |
ID of the work package that the document is being added to or removed from. Options are chosen from the WorkPackageItem select list. |
DocumentId |
Integer |
GET - Required PUT - Required PATCH - Required POST - Required |
ID of the document to assign to or remove from the work package. Options are chosen from the DocumentItem select list. |
dtRemoved |
Integer |
GET - Optional PUT - Optional PATCH - Optional POST - Unused |
Date on which the document was removed from the work package. |
Response:
POST returns the newly-created record. PATCH and PUT return the confirmation update status 204.