This API retrieves the work package of a project from Smart Materials. You can either retrieve a single work package using work package Id or all the work packages of a project.
Required Privilege: API_READONLY
Headers
Header Name |
Description |
Required |
Values |
---|---|---|---|
Authorization |
Access token |
Required |
Bearer <access_token> |
Content-Type |
Request type format |
Required |
application/JSON |
Body
URL Format: GET https://{host}/Smat/V1/Projects(‘:project’)/Disciplines(‘:discipline’)/Nls(‘:language’)/Workpackages({key})
Specify values for the project, discipline, language, and key parameter in the URL. The project, discipline, and language together, define the project environment and the key parameter defines the work package Id (WpId).
To retrieve all the work packages of a project, use the following URL:
GET https://{host}/Smat/V1/Projects(‘:project’)/Disciplines(‘:discipline’)/Nls(‘:language’)/Workpackages
Sample Code
GET https://{host}/Smat/V1/Projects(‘RS’)/Disciplines(‘PIPING’)/Nls(‘English’)/Workpackages(5100)
Success Response
Status: 200 OK
Content:
{
"@odata.context": "https://{host}/Smat/V1/$metadata#Projects('RS')/Disciplines('PIPING')/Nls('English')/Workpackages",
"value":[
{
"WpId":5100,
"ProjId":"RS",
"WpCode":"RW"
}]
}
Element |
Description |
Type |
---|---|---|
WpId |
Unique ID of the work package |
Integer |
ProjId |
Unique ID of the Project. Retrieved work package belongs to this Project. |
String |
WpCode |
Name of the work package |
String |