Queries
component
Retrieves an object representing a component.
A component is an independent part of an assembly that acts as a single unit. For example, a lug-nut is an independent part (component) of a wheel assembly.
Template for Query:
query GetComponent($componentId: String!) {
component(componentId: $componentId) {
# Component Fields
}
}
Template for Query Variables:
{
"componentId" : "<SOME-STRING-TYPE-SCALAR-VALUE>"
}
Arguments
componentId* String non-null | The ID of the component to fetch. |
* Required
Possible Returns
Value Type | Description |
---|---|
Component | An object that represents a component. |
Examples
Example 1
This example retrieves a component by its ID, and displays the status of thumbnail generation of the most recent version of the component. It also shows a list of occurrences of other components within that component.
Query:
query GetComponent($componentId: String!) {
component(componentId: $componentId) {
id
tipVersion {
id
name
thumbnail {
status
}
modelOccurrences {
results {
componentVersion {
name
partNumber
}
}
}
}
}
}
Show More
Query Variables:
{
"componentId": "Y29tcH5jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRfk5VaXVSdXFWWEYzejNZVUd5RW5OQVdfYWdhfn4"
}
Response:
{
"data": {
"component": {
"id": "Y29tcH5jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRfk5VaXVSdXFWWEYzejNZVUd5RW5OQVdfYWdhfn4",
"tipVersion": {
"id": "Y29tcH5jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRfkRGa21Za1MxaVlIZm9xVkl3VFVybjhfYWdhflFnN2h3UGh6OUdhaWZOdzdpNURpQmE",
"name": "Pump Assembly",
"thumbnail": {
"status": "SUCCESS"
},
"modelOccurrences": {
"results": [
{
"componentVersion": {
"name": "M10 Washer",
"partNumber": "M10 Washer"
}
},
{
"componentVersion": {
"name": "Shaft Seal",
"partNumber": "Shaft Seal"
}
},
{
"componentVersion": {
"name": "M6 Washer",
"partNumber": "M6 Washer"
}
},
{
"componentVersion": {
"name": "M6 Washer",
"partNumber": "M6 Washer"
}
},
{
"componentVersion": {
"name": "Water Outlet Gasket",
"partNumber": "Water Outlet Gasket"
}
},
{
"componentVersion": {
"name": "V-Belt Pulley",
"partNumber": "V-Belt Pulley"
}
},
{
"componentVersion": {
"name": "M6 x 22mm SHCS",
"partNumber": "M6 x 22mm SHCS"
}
},
{
"componentVersion": {
"name": "M6 x 22mm SHCS",
"partNumber": "M6 x 22mm SHCS"
}
},
{
"componentVersion": {
"name": "M6 x 22mm SHCS",
"partNumber": "M6 x 22mm SHCS"
}
},
{
"componentVersion": {
"name": "M6 x 22mm SHCS",
"partNumber": "M6 x 22mm SHCS"
}
}
]
}
}
}
}
}
Show More
Example 2
Retrieves a component along with the lifecycle, revision, itemNumber, itemURN and itemURL.
Query:
query component($componentId: String!) {
component (componentId: $componentId) {
id
name
lifeCycle
revision
itemNumber
itemURN
itemURL
createdOn
createdBy {
id
userName
}
lastModifiedOn
lastModifiedBy {
id
userName
}
}
}
Show More
Query Variables:
{
"componentId": "Y29tcH5jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRflJ2OWJvZjdIaEt1RTNob3RVdjBuU1NfYWdh"
}
Response:
{
"data": {
"component": {
"id": "Y29tcH5jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRflJ2OWJvZjdIaEt1RTNob3RVdjBuU1NfYWdh",
"name": "ME Data Test",
"lifeCycle": "Pre-Production",
"revision": "w",
"itemNumber": "PN-000001",
"itemURN": "urn:adsk.plm:tenant.workspace.item:AUTODESK2006.57.15183",
"itemURL": "https://AUTODESK2006.autodeskplm.com/plm/extAccess?itemUrn=urn%3Aadsk.plm%3Atenant.workspace.item%3AAUTODESK2006.57.15183&tab=details",
"createdOn": "2022-10-20T01:46:20.000Z",
"createdBy": {
"id": "ZBDTN3YZTEHE",
"userName": "Noemie.landry-boisvert"
},
"lastModifiedOn": "2022-11-17T07:03:25.000Z",
"lastModifiedBy": {
"id": "2JA23L87MQSERSDX",
"userName": "nikesh.goel"
}
}
}
}
Show More