Components
Components are the fundamental building blocks in Duro. They represent parts, assemblies, documents, and other items that make up your products. This guide covers how to query, create, and update components through the API.
Overview
Every component in Duro has:
A unique identifier (
id)A name and optional description
A revision value (e.g., "1.A", "2.B") tracking design iterations
A category defining its type (Part, Assembly, Document, etc.)
A status indicating its lifecycle state
Attributes specific to its category
Required Headers
All component operations require these headers:
curl 'https://api.durohub.com/graphql' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'x-organization: @your-org' \
-H 'x-library: @your-org/your-library' \
-H 'Content-Type: application/json' \
-d '{"query": "..."}'Querying Components
Get a Single Component
Retrieve a component by its ID:
List Components
Query multiple components with optional filtering and pagination:
Filter Options
The ComponentFilterInput supports these fields:
ids
[ID!]
Filter by specific component IDs
name
String
Filter by name (partial match)
names
[String!]
Filter by multiple names
exactNames
[String!]
Filter by exact name matches
cpns
[String!]
Filter by Component Part Numbers
statusId
String
Filter by status ID
categoryId
String
Filter by category ID
categoryType
CategoryType
Filter by category type (ASSEMBLY, PART, DOCUMENT)
isArchived
Boolean
Include/exclude archived components
eid
String
Filter by external identifier
Advanced Filtering
For complex queries with AND/OR logic, use the filter method:
See Searching and Filtering for comprehensive filtering options.
Creating Components
Create one or more components using the create mutation:
CreateComponentInput Fields
name
String
Yes
Component name
description
String
No
Detailed description
categoryId
String
No
Category/type for this component
statusId
ID
No
Initial status
revisionValue
String
No
Initial revision (defaults based on library config)
eid
String
No
External identifier for integrations
attributeValues
[AttributeValueInput!]
No
Category-specific attribute values
fileId
ID
No
Attached file ID
imageFileId
ID
No
Component image file ID
Example Response
Updating Components
Update existing components using the update mutation:
Optimistic Concurrency: Use expectedVersion to prevent overwriting concurrent changes. If the current version doesn't match, the update will fail with a conflict error.
UpdateComponentInput Fields
id
ID!
Component ID to update (required)
name
String
New name
description
String
New description
statusId
ID
New status
revisionValue
String
New revision value
categoryId
ID
Change category
attributeValues
[AttributeValueInput!]
Updated attribute values
isArchived
Boolean
Archive/unarchive the component
expectedVersion
Int
For optimistic concurrency control
Deleting Components
Delete components by their IDs:
Deleting components is permanent. Consider archiving instead by setting isArchived: true in an update mutation.
Component States and Revisions
State
Components have a state field indicating their modification status:
RELEASED
Component is released and locked
MODIFIED
Component has unreleased changes
Revisions
The revisionValue field tracks design iterations (e.g., "1.A", "1.B", "2.A"). Revision schemes are configured per-library. See Revision Scheme for configuration options.
Working with Assemblies
Assemblies are components that contain other components. Query assembly structure using:
Complete cURL Example
Here's a complete example creating a component:
Next Steps
Learn about Documents associated with components
Explore Change Orders for managing component modifications
See Searching and Filtering for advanced queries
Last updated
Was this helpful?