Queries
drawing
Retrieves an object representing a drawing.
Drawings contain 2D projected views of designs.
Template for Query:
query GetDrawing($drawingId: String!) {
drawing(drawingId: $drawingId) {
# Drawing Fields
}
}
Template for Query Variables:
{
"drawingId" : "<SOME-STRING-TYPE-SCALAR-VALUE>"
}
Arguments
drawingId* String! non-null | The ID of the drawing to fetch. |
* Required
Possible Returns
Value Type | Description |
---|---|
Drawing | Represents a 2D drawing that contains projected views of a design. |
Examples
Example 1
This example retrieves a drawing by its ID.
Query:
query GetDrawing($drawingId: String!) {
drawing(drawingId: $drawingId) {
id
tipVersion{
id
name
componentVersion {
id
name
}
}
}
}
Show More
Query Variables:
{
"drawingId": "ZHJhd35jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRflphMGgycVlIMk9ZbWd2Y0ZLdDlqeEhfYWdhfn4"
}
Response:
{
"data": {
"drawing": {
"id": "ZHJhd35jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRflphMGgycVlIMk9ZbWd2Y0ZLdDlqeEhfYWdhfn4",
"tipVersion": {
"id": "ZHJhd35jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRflphMGgycVlIMk9ZbWd2Y0ZLdDlqeEhfYWdhfmVUMGdYbGNkc3d3RkFxbjlJWkRabFE",
"name": "Pump Assembly Iso Drawing",
"componentVersion": {
"id": "Y29tcH5jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRfkRGa21Za1MxaVlIZm9xVkl3VFVybjhfYWdhflFnN2h3UGh6OUdhaWZOdzdpNURpQmE",
"name": "Pump Assembly"
}
}
}
}
}
Show More
Example 2
Retrieves a drawing along with the lifecycle, revision, itemNumber, itemURN and itemURL.
Query:
query drawing($drawingId: String!) {
drawing(drawingId: $drawingId) {
id
name
lifeCycle
revision
itemNumber
itemURN
itemURL
createdOn
createdBy {
id
userName
}
lastModifiedOn
lastModifiedBy {
id
userName
}
}
}
Show More
Query Variables:
{
"drawingId": "ZHJhd35jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRfldRc0xNR3VvSVFjMHdnUVBhZEU1R1dfYWdh"
}
Response:
{
"data": {
"drawing": {
"id": "ZHJhd35jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRfldRc0xNR3VvSVFjMHdnUVBhZEU1R1dfYWdh",
"name": "Noemie's Box Drawing 1",
"lifeCycle": "Pre-Production",
"revision": "w",
"itemNumber": "DWG-000002",
"itemURN": "urn:adsk.plm:tenant.workspace.item:AUTODESK2006.76.15186",
"itemURL": "https://AUTODESK2006.autodeskplm.com/plm/extAccess?itemUrn=urn%3Aadsk.plm%3Atenant.workspace.item%3AAUTODESK2006.76.15186&tab=details",
"createdOn": "2022-01-24T17:24:00.000Z",
"createdBy": {
"id": "ZBDTN3YZTEHE",
"userName": "Noemie.landry-boisvert"
},
"lastModifiedOn": "2022-11-28T12:53:30.000Z",
"lastModifiedBy": {
"id": "5DLJPBX2NL87E5WS",
"userName": "sneha.kadam"
}
}
}
}
Show More