componentVersion
Retrieves an object representing a version of a component.
For example, there can be different versions of a lug nut in a wheel assembly.
Template for Query:
query GetComponentVersion($componentVersionId: String!) {
componentVersion(componentVersionId: $componentVersionId) {
# ComponentVersion Fields
}
}
Template for Query Variables:
{
"componentVersionId" : "<SOME-STRING-TYPE-SCALAR-VALUE>"
}
Arguments
componentVersionId* String! non-null | The ID of the component version to fetch. |
Possible Returns
Value Type | Description |
---|---|
ComponentVersion | Represents a version of a component. |
Examples
Example 1
This example retrieves a version of a component by its ID, and displays the status of thumbnail generation.
Query:
query GetComponentVersion ($componentVersionId: String!) {
componentVersion(componentVersionId: $componentVersionId) {
id
name
thumbnail{
status
}
}
}
Query Variables:
{
"componentVersionId": "Y29tcH5jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRfkJOeUsydk1Ua20ySFdPWEE1M1oyMWNfYWdhfjNxTG5YT29pTzFYWGRKMGhtMGhxRE9+cmtHcm9WYXFMbnBBZmZsOXFkalRHNQ"
}
Response:
{
"data": {
"componentVersion": {
"id": "Y29tcH5jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRfkJOeUsydk1Ua20ySFdPWEE1M1oyMWNfYWdhfjNxTG5YT29pTzFYWGRKMGhtMGhxRE9+cmtHcm9WYXFMbnBBZmZsOXFkalRHNQ",
"name": "End Cap",
"thumbnail": {
"status": "SUCCESS"
}
}
}
}
Example 2
- Manage Extension Data for a Component Version.
Note: Fields namely owner, approvers, and approvedBy are no longer supported and should not be used.
Query:
query componentVersion ($componentVersionId: String!) {
componentVersion (componentVersionId: $componentVersionId) {
itemNumber
lifeCycle
isLocked
isNextReleaseMilestone
revision
changeOrder
changeOrderURN
changeOrderURL
owner {
id
}
approvers {
id
}
releasedOn
approvedBy {
id
}
component {
lifeCycle
revision
itemNumber
itemURN
itemURL
}
}
}
Query Variables:
{
"componentVersionId": "Y29tcH5jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRflJ2OWJvZjdIaEt1RTNob3RVdjBuU1NfYWdhfkZtN3Z1SXF5aUN3dkRoTEQ0MjYzQW4"
}
Response:
{
"data": {
"componentVersion": {
"itemNumber": "PN-000001",
"lifeCycle": "Pre-Production",
"isLocked": true,
"isNextReleaseMilestone": false,
"revision": "3",
"changeOrder": "CO-000011 - CO # 2",
"changeOrderURN": "urn:adsk.plm:tenant.workspace.item:AUTODESK2006.9.15182",
"changeOrderURL": "https://AUTODESK2006.autodeskplm.com/plm/extAccess?itemUrn=urn%3Aadsk.plm%3Atenant.workspace.item%3AAUTODESK2006.9.15182&tab=details",
"owner": {
"id": "Noemie Landry-Boisvert"
},
"approvers": [],
"releasedOn": "2022-11-17T02:03:21.236Z",
"approvedBy": {
"id": ""
},
"component": {
"lifeCycle": "Pre-Production",
"revision": "3",
"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"
}
}
}
}
Example 3
This example retrieves the full list of occurrences under a given componentVersion.
Query:
query getAllModelOccurrences($componentVersionId: String!) {
componentVersion(componentVersionId: $componentVersionId) {
id
name
allModelOccurrences {
results {
parentComponentVersion {
id
name
}
componentVersion {
id
name
}
}
}
}
}
Query Variables:
{
"componentVersionId": "Y29tcH5jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRfjVCcGNCY05scjJYMWRqWWpISUFBYUtfYWdhfnYyMmVyV1V1aFpzRjlUNkJ0MGFQbnM"
}
Response:
{
"data": {
"componentVersion": {
"id": "Y29tcH5jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRfjVCcGNCY05scjJYMWRqWWpISUFBYUtfYWdhfnYyMmVyV1V1aFpzRjlUNkJ0MGFQbnM",
"name": "Big Assembly",
"allModelOccurrences": {
"results": [
{
"parentComponentVersion": {
"id": "Y29tcH5jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRfnpHcnF1NHlMZ3Y2dWM4M3ltT3F4WEtfYWdhfkZOcjNHTDF0dWRyT1VUZFR2WHZpU3E",
"name": "Assembly 1"
},
"componentVersion": {
"id": "Y29tcH5jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRfjRFek9Zc000cEFHMFZBc1p5TXI0YmlfYWdhfnh5Wk5nRXczSjZxNWtUdFJGQXFaekc",
"name": "Sub Component 1"
}
},
{
"parentComponentVersion": {
"id": "Y29tcH5jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRfnpHcnF1NHlMZ3Y2dWM4M3ltT3F4WEtfYWdhfkZOcjNHTDF0dWRyT1VUZFR2WHZpU3E",
"name": "Assembly 1"
},
"componentVersion": {
"id": "Y29tcH5jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRfm1WUDhiVENhZDJwQ2Roa1U3eWZPMVhfYWdhfmdabTBQVDlBdFMyUnc0dE02RmFxb2c",
"name": "Sub Component 2"
}
},
{
"parentComponentVersion": {
"id": "Y29tcH5jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRfjVCcGNCY05scjJYMWRqWWpISUFBYUtfYWdhfnYyMmVyV1V1aFpzRjlUNkJ0MGFQbnM",
"name": "Big Assembly"
},
"componentVersion": {
"id": "Y29tcH5jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRfnpHcnF1NHlMZ3Y2dWM4M3ltT3F4WEtfYWdhfkZOcjNHTDF0dWRyT1VUZFR2WHZpU3E",
"name": "Assembly 1"
}
},
{
"parentComponentVersion": {
"id": "Y29tcH5jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRfjVCcGNCY05scjJYMWRqWWpISUFBYUtfYWdhfnYyMmVyV1V1aFpzRjlUNkJ0MGFQbnM",
"name": "Big Assembly"
},
"componentVersion": {
"id": "Y29tcH5jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRfjRFek9Zc000cEFHMFZBc1p5TXI0YmlfYWdhfnh5Wk5nRXczSjZxNWtUdFJGQXFaekc",
"name": "Sub Component 1"
}
}
]
}
}
}
}
Example 4
Retrieves url to download and export different derivative formats of a component version.
Query:
query componentVersion ($componentVersionId: String! ,$derivativeInput: DerivativeInput!) {
componentVersion (componentVersionId: $componentVersionId) {
id
name
partNumber
isMilestone
materialName
lastModifiedOn
derivatives( derivativeInput: $derivativeInput){
id
progress
status
signedUrl
outputFormat
expires
}
}
}
Query Variables:
{
"componentVersionId": "Y29tcH5jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRflFPN0R6NkpYMFc3YUxhUnFxbU9UQUZfYWdhfkVKdUN6VkVHQWp5N1liamlrSndxUU8",
"derivativeInput": {
"generate": true,
"outputFormat": ["STEP"]
}
}
Response:
{
"data": {
"componentVersion": {
"id": "Y29tcH5jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRfmlSM0pQdElyM0dvOXdQZTJPM0lxdkpfYWdhfkFwOU5CVXloTzNkWHNQOTBGYUFocFY",
"name": "Noemie's Box 2",
"partNumber": "Noemie's Box 2",
"isMilestone": true,
"materialName": "Steel",
"lastModifiedOn": null,
"derivatives": [
{
"id": "Y29tcH5jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRfmlSM0pQdElyM0dvOXdQZTJPM0lxdkpfYWdhfkFwOU5CVXloTzNkWHNQOTBGYUFocFY",
"progress": 100,
"status": "SUCCESS",
"signedUrl": "https://cdn-stg.derivative.autodesk.com/dXJuOmFkc2suZm9yZ2U6bDJhZy5hc3NldDpzdGc6aVIzSlB0SXIzR285d1BlMk8zSXF2Sl9hZ2E_c25hcHNob3Q9QXA5TkJVeWhPM2RYc1A5MEZhQWhwVg/output/files/8b78b072-053d-4df4-8983-4ebea5da23ab/4d41e7ec-b66c-48e9-b9ff-95a0bca5f8ff.stp?Signature=D0LkQZRzT7SeCMHJUQYfnM0mL2jGHNlcV8iBGfVhPX0bNTX2oMXRhq~ZM3K-LdjxJ3tDOc2Xrij7bJCozUErT59oAZTJuUtZLUORbTH8WLwJ3IQLLOwYXRQ30yBipA6GCLKIhij-I6R82HBhM52RWs73U1mmL3bmOpMrmRH4AOHEPOyvbJ3VQTHwSlQKPCBBDEEUC5ipiZSKrFBe40pf-SWtBA9NmBc4YXiae37cOpjb54DcRQkrwbst28HDnUiAIVTS9gtLXOCwRW2FsLPkaZb5RnEaD1Eg4tFpb83pw8Kc5ugXEPj6Ym8poczQ84w6iCrouP9nKKM-y-vMyLWB7A__&Key-Pair-Id=APKAJVJIJZ6OEYDPJSQA&Policy=eyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6Imh0dHBzOi8vY2RuLXN0Zy5kZXJpdmF0aXZlLmF1dG9kZXNrLmNvbS9kWEp1T21Ga2Myc3VabTl5WjJVNmJESmhaeTVoYzNObGREcHpkR2M2YVZJelNsQjBTWEl6UjI4NWQxQmxNazh6U1hGMlNsOWhaMkVfYzI1aGNITm9iM1E5UVhBNVRrSlZlV2hQTTJSWWMxQTVNRVpoUVdod1ZnL291dHB1dC9maWxlcy84Yjc4YjA3Mi0wNTNkLTRkZjQtODk4My00ZWJlYTVkYTIzYWIvNGQ0MWU3ZWMtYjY2Yy00OGU5LWI5ZmYtOTVhMGJjYTVmOGZmLnN0cCIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTY3ODk4ODgwN319fV19",
"outputFormat": "STEP",
"expires": "2023-03-16T17:46:04Z"
}
]
}
}
}
Example 5
Retrieves all physical properties of component version
Query:
query componentVersionPhysicalProperties($componentVersionId: String!){
componentVersion(componentVersionId: $componentVersionId){
physicalProperties{
status
area{
value
displayValue
propertyDefinition{
name
type
units{
id
name
}
}
}
mass{
value
displayValue
propertyDefinition{
name
type
units{
id
name
}
}
}
volume{
value
displayValue
propertyDefinition{
name
type
units{
id
name
}
}
}
density{
value
displayValue
propertyDefinition{
name
type
units{
id
name
}
}
}
boundingBox{
length{
value
displayValue
propertyDefinition{
name
type
units{
id
name
}
}
}
}
}
}
}
Query Variables:
{
"componentVersionId": "Y29tcH5jby5Kd254Q0p3YVNQeWcwbGRGdUZpNkxRfkRxWENOdE1hczlxOGlNRENaNDFMdTNfYWdhfmMxbHEzZ2o0MzBIM2thcWhINTBPalU"
}
Response:
{
"data": {
"componentVersion": {
"physicalProperties": {
"status": "COMPLETED",
"area": {
"value": 124.8425999902595,
"displayValue": "124.8425999902595",
"propertyDefinition": {
"name": "area",
"type": "AREA",
"units": {
"id": "squareCentimeters",
"name": "Square centimeters"
}
}
},
"mass": {
"value": 0.4900072049617686,
"displayValue": "0.4900072049617686",
"propertyDefinition": {
"name": "mass",
"type": "MASS",
"units": {
"id": "kilograms",
"name": "Kilograms"
}
}
},
"volume": {
"value": 62.42129999512976,
"displayValue": "62.42129999512976",
"propertyDefinition": {
"name": "volume",
"type": "VOLUME",
"units": {
"id": "cubicCentimeters",
"name": "Cubic centimeters"
}
}
},
"density": {
"value": 0.00785,
"displayValue": "0.00785",
"propertyDefinition": {
"name": "density",
"type": "DENSITY",
"units": {
"id": "cubicCentimeters",
"name": "Cubic centimeters"
}
}
},
"boundingBox": {
"length": {
"value": 8.3246,
"displayValue": "8.3246",
"propertyDefinition": {
"name": "Bounding Box: Length",
"type": "DISTANCE",
"units": {
"id": "centimeters",
"name": "Centimeters"
}
}
}
}
}
}
}
}