component
Retrieves an object representing a component.
A component is an individual part of an assembly that acts as a single unit. For example, a lug nut is an individual component in a wheel assembly.
Template for Query:
query GetComponent($componentId: ID!) {
component(componentId: $componentId) {
# Component Fields
}
}
Template for Query Variables:
{
"componentId" : "<SOME-ID-TYPE-SCALAR-VALUE>"
}
Arguments
componentId* ID! non-null | The ID of the component to fetch. |
Possible Returns
Value Type | Description |
---|---|
Component | Represents 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. A component serves as a container for a variety of design objects, including bodies, sketches, and construction geometry. See the blog post Autodesk Fusion Bodies vs. Components for more information on components. |
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 GetComponentModelOccurences($componentId: ID!) {
component (componentId: $componentId) {
id
name
tipVersion {
id
name
thumbnail {
status
}
occurrences {
results {
componentVersion {
name
partNumber
}
}
}
}
}
}
Query Variables:
{
"componentId": "Y29tcH5WQVZNUW1sYmxrZDBtaXJwU0NYMHJ0X0wyQ35GUnM3Nkl1NGlxdGlaNFZXejZiYU13X2FnYQ"
}
Response:
{
"data": {
"component": {
"id": "Y29tcH5WQVZNUW1sYmxrZDBtaXJwU0NYMHJ0X0wyQ35GUnM3Nkl1NGlxdGlaNFZXejZiYU13X2FnYQ",
"name": "ALCOA Bracket (1)",
"tipVersion": {
"id": "Y29tcH5WQVZNUW1sYmxrZDBtaXJwU0NYMHJ0X0wyQ35GUnM3Nkl1NGlxdGlaNFZXejZiYU13X2FnYX42eWJick15dTlsM2I0Nk9KWTE2MnF2",
"name": "ALCOA Bracket (1)",
"thumbnail": {
"status": "SUCCESS"
},
"occurrences": {
"results": [
{
"componentVersion": {
"name": "ALCOA Bracket",
"partNumber": "ALCOA Bracket"
}
}
]
}
}
}
}
}
Example 2
Retrieves a component along with the lifecycle, revision, itemNumber, itemURN and itemURL.
Query:
query GetManageExtensionDetails($componentId: ID!) {
component (componentId: $componentId) {
id
name
manage {
itemNumber
itemURL
itemURN
lifeCycle
revision
}
}
}
Query Variables:
{
"componentId": "Y29tcH5WQVZNUW1sYmxrZDBtaXJwU0NYMHJ0X0wyQ35FQlNERENFWmhOcU1YSkpUUHpHbnpvX2FnYQ"
}
Response:
{
"data": {
"component": {
"id": "Y29tcH5WQVZNUW1sYmxrZDBtaXJwU0NYMHJ0X0wyQ35FQlNERENFWmhOcU1YSkpUUHpHbnpvX2FnYQ",
"name": "Drawings Utility Knife",
"manage": {
"itemNumber": "PN-000003",
"itemURL": "https://AUTODESK2398.autodeskplm.com/plm/extAccess?itemUrn=urn%3Aadsk.plm%3Atenant.workspace.item%3AAUTODESK2398.57.15148&tab=details",
"itemURN": "urn:adsk.plm:tenant.workspace.item:AUTODESK2398.57.15148",
"lifeCycle": "Pre-Production",
"revision": "1"
}
}
}
}
Example 3
Retrieves Properties associated with the Component.
Query:
query GetComponentProperties($componentId: ID!) {
component(componentId: $componentId) {
id
name
customProperties {
results {
value
displayValue
definition {
id
name
specification
isHidden
isReadOnly
isArchived
description
propertyBehavior
units {
id
name
}
}
}
}
}
}
Query Variables:
{
"componentId": "Y29tcH5WQVZNUW1sYmxrZDBtaXJwU0NYMHJ0X0wyQ35OWXU4a2duSVdtNGNnUVd3MmljMFl0X2FnYQ"
}
Response:
{
"data": {
"component": {
"id": "Y29tcH5WQVZNUW1sYmxrZDBtaXJwU0NYMHJ0X0wyQ35OWXU4a2duSVdtNGNnUVd3MmljMFl0X2FnYQ",
"name": "Hydraulic_Bottle_Jack",
"customProperties": {
"results": [
{
"value": "ArchiveTest",
"displayValue": "ArchiveTest",
"definition": {
"id": "cHJvcGRlZn5DZlhvYUM0SzUzU1R3YjZUbklyWFhaVEFJRWRkRzlBcn5DZlhvYUM0SzUzU1R3YjZUbklyWFhaVEFJRWRkRzlBcn5URVNUX0NQX0RPQ35wYXJhbWV0ZXJzLkNmWG9hQzRLNTNTVHdiNlRuSXJYWFpUQUlFZGRHOUFyOmY2OTkxMGY4ZWZlMTQ5ZTQ5YTgwNTBlYWYyOGZlM2NiLTEuMC4w",
"name": "ARCHIVETEST",
"specification": "STRING",
"isHidden": false,
"isReadOnly": false,
"isArchived": true,
"description": "description",
"propertyBehavior": "TIMELESS",
"units": null
}
},
{
"value": "10D123E001",
"displayValue": "10D123E001",
"definition": {
"id": "cHJvcGRlZn5DZlhvYUM0SzUzU1R3YjZUbklyWFhaVEFJRWRkRzlBcn5DZlhvYUM0SzUzU1R3YjZUbklyWFhaVEFJRWRkRzlBcn5wcm9wX2RlZl9jb2xfMTcwNzM3NjE0MTM1N35wYXJhbWV0ZXJzLkNmWG9hQzRLNTNTVHdiNlRuSXJYWFpUQUlFZGRHOUFyOmJiN2JlZDVkOTFhMTQxY2I5YmY0Nzc4OTA0MTMwYWVmLTEuMC4w",
"name": "ERP ID",
"specification": "STRING",
"isHidden": false,
"isReadOnly": false,
"isArchived": false,
"description": "description",
"propertyBehavior": "TIMELESS",
"units": null
}
}
]
}
}
}
}
Example 4
Retrieves Properties associated with the component, supported by a filter on property name.
Query:
query GetComponentProperties($componentId: ID!) {
component(componentId: $componentId) {
id
name
customProperties {
results {
value
displayValue
definition {
id
name
specification
isHidden
isReadOnly
isArchived
description
propertyBehavior
units {
id
name
}
}
}
}
}
}
Query Variables:
{
"componentId": "Y29tcH5WQVZNUW1sYmxrZDBtaXJwU0NYMHJ0X0wyQ35OWXU4a2duSVdtNGNnUVd3MmljMFl0X2FnYQ",
"names": ["ERP ID"]
}
Response:
{
"data": {
"component": {
"id": "Y29tcH5WQVZNUW1sYmxrZDBtaXJwU0NYMHJ0X0wyQ35OWXU4a2duSVdtNGNnUVd3MmljMFl0X2FnYQ",
"name": "Hydraulic_Bottle_Jack",
"customProperties": {
"results": [
{
"value": "ArchiveTest",
"displayValue": "ArchiveTest",
"definition": {
"id": "cHJvcGRlZn5DZlhvYUM0SzUzU1R3YjZUbklyWFhaVEFJRWRkRzlBcn5DZlhvYUM0SzUzU1R3YjZUbklyWFhaVEFJRWRkRzlBcn5URVNUX0NQX0RPQ35wYXJhbWV0ZXJzLkNmWG9hQzRLNTNTVHdiNlRuSXJYWFpUQUlFZGRHOUFyOmY2OTkxMGY4ZWZlMTQ5ZTQ5YTgwNTBlYWYyOGZlM2NiLTEuMC4w",
"name": "ARCHIVETEST",
"specification": "STRING",
"isHidden": false,
"isReadOnly": false,
"isArchived": true,
"description": "description",
"propertyBehavior": "TIMELESS",
"units": null
}
}
]
}
}
}
}