OpenAPI Specification
openapi: 3.0.1
info:
title: Onshape REST Account Assembly API
description: '## Welcome to the Onshape REST API Explorer
**See the [API Explorer Guide](https://onshape-public.github.io/docs/api-intro/explorer/) for help navigating this page.**
### Using this page
1. Sign in to your [Onshape](https://cad.onshape.com) account in another tab.
2. Click the `Try it out` button below. It toggles to a `Cancel` button when selected.
### Authenticating
To authenticate your calls, click the `Authorize` button. See [API Explorer Guide: Authentication](https://onshape-public.github.io/docs/api-intro/explorer/#authentication) for details. Calls made when authenticated via API Keys or OAuth count against your annual [API limits](https://onshape-public.github.io/docs/auth/limits/#annual-api-call-limits).
* **Tip:** To ensure the current session isn''t used when trying other authentication techniques, make sure to [remove the Onshape cookie](https://support.google.com/chrome/answer/95647#zippy=%2Cdelete-cookies-from-a-site) as per the instructions for your browser, or use a private or incognito window.
### Additional resources
* [Onshape API Guide](https://onshape-public.github.io/docs/): Our full suite of developer guides, to be used as an accompaniment to this API Explorer.
* [Onshape Developer Portal](https://cad.onshape.com/appstore/dev-portal): The Onshape portal for managing your API keys, OAuth2 credentials, your Onshape applications, and your Onshape App Store entries.
* [Authentication Guide](https://onshape-public.github.io/docs/auth/): Our guide to using API keys, request signatures, and OAuth2 in your Onshape applications.'
termsOfService: https://www.onshape.com/legal/terms-of-use
contact:
email: api-support@onshape.zendesk.com
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 1.218.84032-34acba44be17
x-logo:
url: images/logo-onshape-gray-green-nav-bar.svg
backgroundColor: '#ffffff'
altText: Onshape
href: images/logo-onshape-gray-green-nav-bar.svg
x-indeterministic-schemas:
- BTDiffInfo
- BTParameterSpecArray-2600
- BTSplineDescription-2118
- NodeModel
- BTPFunctionDeclaration-246
- BTPFunctionOrPredicateDeclaration-247
- BTPExpression-9
- SkinModel
- BTMAnnotation-4664
x-filter-info: ?restUserRole=PUBLIC
servers:
- url: https://cad.onshape.com/api/v16
description: Current
security:
- BasicAuth: []
tags:
- name: Assembly
description: Create and manage assemblies.
paths:
/assemblies/d/{did}/e/{eid}/namedViews:
get:
tags:
- Assembly
summary: Get the view data for all named views for the specified element.
operationId: getNamedViews
parameters:
- name: did
in: path
description: The id of the document in which to perform the operation.
required: true
schema:
type: string
- name: linkDocumentId
in: query
description: The id of the document through which the above document should be accessed; only applicable when accessing a version of the document. This allows a user who has access to document a to see data from document b, as long as document b has been linked to document a by a user who has permission to both.
schema:
type: string
default: ''
- name: eid
in: path
required: true
schema:
type: string
- name: skipPerspective
in: query
schema:
type: boolean
default: true
- name: includeSectionCutViews
in: query
schema:
type: boolean
default: false
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTNamedViewsInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/assemblies/d/{did}/w/{wid}:
post:
tags:
- Assembly
summary: Create a new assembly tab in the document.
operationId: createAssembly
parameters:
- name: did
in: path
required: true
schema:
type: string
- name: wid
in: path
required: true
schema:
type: string
requestBody:
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTModelElementParams'
required: true
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTDocumentElementInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Write
BasicAuth:
- OAuth2Write
x-BTVisibility: PRODUCTION
/assemblies/d/{did}/w/{wid}/e/{eid}/bomelement:
post:
tags:
- Assembly
summary: Gets the Bill Of Materials (BOM) for the specified assembly, or creates a BOM if none exist.
operationId: getOrCreateBillOfMaterialsElement
parameters:
- name: did
in: path
required: true
schema:
type: string
- name: wid
in: path
required: true
schema:
type: string
- name: eid
in: path
required: true
schema:
type: string
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTDocumentElementInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/assemblies/d/{did}/w/{wid}/e/{eid}/features/featureid/{fid}:
post:
tags:
- Assembly
summary: Update an existing feature for an Assembly.
operationId: updateFeature
parameters:
- name: did
in: path
required: true
schema:
type: string
- name: wid
in: path
required: true
schema:
type: string
- name: eid
in: path
required: true
schema:
type: string
- name: fid
in: path
required: true
schema:
type: string
requestBody:
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTFeatureDefinitionCall-1406'
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTFeatureDefinitionResponse-1617'
deprecated: false
security:
- OAuth2:
- OAuth2Write
BasicAuth:
- OAuth2Write
x-BTVisibility: PRODUCTION
delete:
tags:
- Assembly
summary: Delete a feature from an assembly.
operationId: deleteFeature
parameters:
- name: did
in: path
required: true
schema:
type: string
- name: wid
in: path
required: true
schema:
type: string
- name: eid
in: path
required: true
schema:
type: string
- name: fid
in: path
required: true
schema:
type: string
responses:
'200':
description: Success!
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTFeatureApiBase-1430'
deprecated: false
security:
- OAuth2:
- OAuth2Write
BasicAuth:
- OAuth2Write
x-BTVisibility: PRODUCTION
/assemblies/d/{did}/w/{wid}/e/{eid}/instance/nodeid/{nid}:
delete:
tags:
- Assembly
summary: Delete an instance of an assembly.
operationId: deleteInstance
parameters:
- name: did
in: path
required: true
schema:
type: string
- name: eid
in: path
required: true
schema:
type: string
- name: wid
in: path
required: true
schema:
type: string
- name: nid
in: path
required: true
schema:
type: string
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
type: object
deprecated: false
security:
- OAuth2:
- OAuth2Write
BasicAuth:
- OAuth2Write
x-BTVisibility: PRODUCTION
/assemblies/d/{did}/w/{wid}/e/{eid}/instances:
post:
tags:
- Assembly
summary: Insert an instance of a part, sketch, assembly, or Part Studio into an assembly.
description: Part Studio instances may include multiple parts.
operationId: createInstance
parameters:
- name: did
in: path
required: true
schema:
type: string
- name: wid
in: path
required: true
schema:
type: string
- name: eid
in: path
required: true
schema:
type: string
requestBody:
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAssemblyInstanceDefinitionParams'
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
type: object
deprecated: false
security:
- OAuth2:
- OAuth2Read
- OAuth2Write
BasicAuth:
- OAuth2Read
- OAuth2Write
x-BTVisibility: PRODUCTION
/assemblies/d/{did}/w/{wid}/e/{eid}/matevalues:
post:
tags:
- Assembly
summary: Update mate values for the given mates in the specified assembly.
description: "* The input mates must support motion along the provided input degrees of freedom; otherwise, the input mate value will be ignored. \n* Values associated with multiple allowed degrees of freedom for a mate can be updated simultaneously. \n* Values associated with multiple mate features can be updated simultaneously."
operationId: updateMateValues
parameters:
- name: did
in: path
required: true
schema:
type: string
- name: wid
in: path
required: true
schema:
type: string
- name: eid
in: path
required: true
schema:
type: string
requestBody:
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAssemblyMateValuesInfo'
required: true
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAssemblyMateValuesInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Write
BasicAuth:
- OAuth2Write
x-BTVisibility: PRODUCTION
/assemblies/d/{did}/w/{wid}/e/{eid}/modify:
post:
tags:
- Assembly
summary: Modify an assembly.
description: This endpoint can include multiple modifications to an assembly with one change. For example, it can delete/suppress/unsuppress/transform multiple instances. It creates one history entry in the document history list.
operationId: modify
parameters:
- name: did
in: path
description: The id of the document in which to perform the operation.
required: true
schema:
type: string
- name: linkDocumentId
in: query
description: The id of the document through which the above document should be accessed; only applicable when accessing a version of the document. This allows a user who has access to document a to see data from document b, as long as document b has been linked to document a by a user who has permission to both.
schema:
type: string
default: ''
- name: wid
in: path
description: The id of the workspace in which to perform the operation.
required: true
schema:
type: string
- name: eid
in: path
description: The id of the element in which to perform the operation.
required: true
schema:
type: string
requestBody:
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAssemblyModificationParams'
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
type: object
deprecated: false
security:
- OAuth2:
- OAuth2Write
BasicAuth:
- OAuth2Write
x-BTVisibility: PRODUCTION
/assemblies/d/{did}/w/{wid}/e/{eid}/occurrencetransforms:
post:
tags:
- Assembly
summary: Transform a list of assembly occurrences.
operationId: transformOccurrences
parameters:
- name: did
in: path
required: true
schema:
type: string
- name: eid
in: path
required: true
schema:
type: string
- name: wid
in: path
required: true
schema:
type: string
requestBody:
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAssemblyTransformDefinitionParams'
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
type: object
deprecated: false
security:
- OAuth2:
- OAuth2Read
- OAuth2Write
BasicAuth:
- OAuth2Read
- OAuth2Write
x-BTVisibility: PRODUCTION
/assemblies/d/{did}/w/{wid}/e/{eid}/transformedinstances:
post:
tags:
- Assembly
summary: Create new instances with transformation.
operationId: insertTransformedInstances
parameters:
- name: did
in: path
required: true
schema:
type: string
- name: eid
in: path
required: true
schema:
type: string
- name: wid
in: path
required: true
schema:
type: string
requestBody:
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAssemblyTransformedInstancesDefinitionParams'
required: true
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAssemblyInsertTransformedInstancesResponse'
deprecated: false
security:
- OAuth2:
- OAuth2Read
- OAuth2Write
BasicAuth:
- OAuth2Read
- OAuth2Write
x-BTVisibility: PRODUCTION
/assemblies/d/{did}/{wvm}/{wvmid}/e/{eid}:
get:
tags:
- Assembly
summary: Get definition information for the specified assembly.
description: All coordinates and translation matrix components are in meters (m).
operationId: getAssemblyDefinition
parameters:
- name: did
in: path
description: The id of the document in which to perform the operation.
required: true
schema:
type: string
- name: linkDocumentId
in: query
description: The id of the document through which the above document should be accessed; only applicable when accessing a version of the document. This allows a user who has access to document a to see data from document b, as long as document b has been linked to document a by a user who has permission to both.
schema:
type: string
default: ''
- name: wvm
in: path
description: Indicates which of workspace (w), version (v), or document microversion (m) id is specified below.
required: true
schema:
type: string
enum:
- w
- v
- m
- name: wvmid
in: path
description: The id of the workspace, version or document microversion in which the operation should be performed.
required: true
schema:
type: string
- name: eid
in: path
description: The id of the element in which to perform the operation.
required: true
schema:
type: string
- name: configuration
in: query
description: URL-encoded string of configuration values (separated by `;`). See the [Configurations API Guide](https://onshape-public.github.io/docs/api-adv/configs/) for details.
schema:
type: string
default: ''
- name: explodedViewId
in: query
schema:
type: string
- name: includeMateFeatures
in: query
schema:
type: boolean
default: false
- name: includeNonSolids
in: query
schema:
type: boolean
default: false
- name: includeMateConnectors
in: query
schema:
type: boolean
default: false
- name: excludeSuppressed
in: query
description: Whether or not to exclude suppressed instances/mate features in response
schema:
type: boolean
default: false
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAssemblyDefinitionInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/assemblies/d/{did}/{wvm}/{wvmid}/e/{eid}/bom:
get:
tags:
- Assembly
summary: Get the Bill Of Materials (BOM) content for the specified assembly.
description: Returns the BOM in JSON in the Onshape BOM Standard format.
operationId: getBillOfMaterials
parameters:
- name: did
in: path
description: The id of the document in which to perform the operation.
required: true
schema:
type: string
- name: linkDocumentId
in: query
description: The id of the document through which the above document should be accessed; only applicable when accessing a version of the document. This allows a user who has access to document a to see data from document b, as long as document b has been linked to document a by a user who has permission to both.
schema:
type: string
default: ''
- name: wvm
in: path
description: Indicates which of workspace (w), version (v), or document microversion (m) id is specified below.
required: true
schema:
type: string
enum:
- w
- v
- m
- name: wvmid
in: path
description: The id of the workspace, version or document microversion in which the operation should be performed.
required: true
schema:
type: string
- name: eid
in: path
description: The id of the element in which to perform the operation.
required: true
schema:
type: string
- name: configuration
in: query
description: URL-encoded string of configuration values (separated by `;`). See the [Configurations API Guide](https://onshape-public.github.io/docs/api-adv/configs/) for details.
schema:
type: string
default: ''
- name: bomColumnIds
in: query
description: Ids of the columns to include, or all columns if empty. BOM column ids correspond to metadata property ids.
schema:
type: array
items:
type: string
- name: indented
in: query
description: Return the Structured BOM table with all rows collapsed, otherwise returns the Flattened BOM.
schema:
type: boolean
default: true
- name: multiLevel
in: query
description: Return the Structured BOM table with all rows expanded. Ignored if indented is false.
schema:
type: boolean
default: false
- name: generateIfAbsent
in: query
description: Return the BOM table data even if the BOM does not exist. If this is false and the BOM does not exist, a 404 status code will be returned. This option is highly recommended.
schema:
type: boolean
default: false
- name: templateId
in: query
description: The id of the BOM table template to use when generating the table.
schema:
type: string
- name: includeExcluded
in: query
description: Include items that have been excluded from the BOM table.
schema:
type: boolean
- name: onlyVisibleColumns
in: query
description: Only return data for visible columns, instead of all possible columns.
schema:
type: boolean
- name: ignoreSubassemblyBomBehavior
in: query
description: Ignore the 'Subassembly BOM behavior' property when constructing the BOM table.
schema:
type: boolean
- name: includeItemMicroversions
in: query
description: Include element microversions and version metadata microversions in the JSON.
schema:
type: boolean
default: false
- name: includeTopLevelAssemblyRow
in: query
description: Include top-level assembly row when constructing the BOM table.
schema:
type: boolean
default: false
- name: thumbnail
in: query
description: Return thumbnail info
schema:
type: boolean
default: false
- name: respectSubassemblyBomBehavior
in: query
description: Force respect subassembly BOM Behavior Property
schema:
type: boolean
default: false
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTBillOfMaterialsInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/assemblies/d/{did}/{wvm}/{wvmid}/e/{eid}/boundingboxes:
get:
tags:
- Assembly
summary: Get bounding box information for the specified assembly.
operationId: getAssemblyBoundingBoxes
parameters:
- name: did
in: path
description: The id of the document in which to perform the operation.
required: true
schema:
type: string
- name: linkDocumentId
in: query
description: The id of the document through which the above document should be accessed; only applicable when accessing a version of the document. This allows a user who has access to document a to see data from document b, as long as document b has been linked to document a by a user who has permission to both.
schema:
type: string
default: ''
- name: wvm
in: path
description: Indicates which of workspace (w), version (v), or document microversion (m) id is specified below.
required: true
schema:
type: string
enum:
- w
- v
- m
- name: wvmid
in: path
description: The id of the workspace, version or document microversion in which the operation should be performed.
required: true
schema:
type: string
- name: eid
in: path
description: The id of the element in which to perform the operation.
required: true
schema:
type: string
- name: configuration
in: query
description: URL-encoded string of configuration values (separated by `;`). See the [Configurations API Guide](https://onshape-public.github.io/docs/api-adv/configs/) for details.
schema:
type: string
default: ''
- name: explodedViewId
in: query
schema:
type: string
- name: includeHidden
in: query
schema:
type: boolean
- name: displayStateId
in: query
description: Call the [getDisplayStates](#/Assembly/getDisplayStates) endpoint to get display state ID(s).
schema:
type: string
- name: namedPositionId
in: query
schema:
type: string
- name: includeSketches
in: query
schema:
type: boolean
default: false
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTBoundingBoxInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/assemblies/d/{did}/{wvm}/{wvmid}/e/{eid}/displaystates:
get:
tags:
- Assembly
summary: Get a list of display states for the specified assembly.
operationId: getDisplayStates
parameters:
- name: did
in: path
description: The id of the document in which to perform the operation.
required: true
schema:
type: string
- name: linkDocumentId
in: query
description: The id of the document through which the above document should be accessed; only applicable when accessing a version of the document. This allows a user who has access to document a to see data from document b, as long as document b has been linked to document a by a user who has permission to both.
schema:
type: string
default: ''
- name: wvm
in: path
description: Indicates which of workspace (w), version (v), or document microversion (m) id is specified below.
required: true
schema:
type: string
enum:
- w
- v
- m
- name: wvmid
in: path
description: The id of the workspace, version or document microversion in which the operation should be performed.
required: true
schema:
type: string
- name: eid
in: path
description: The id of the element in which to perform the operation.
required: true
schema:
type: string
responses:
'200':
description: Success!
content:
application/json;charset=UTF-8; qs=0.09:
schema:
type: array
items:
$ref: '#/components/schemas/BTDisplayStateInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/assemblies/d/{did}/{wvm}/{wvmid}/e/{eid}/explodedviews:
get:
tags:
- Assembly
summary: Get a list of exploded views for the specified assembly.
operationId: getExplodedViews
parameters:
- name: did
in: path
description: The id of the document in which to perform the operation.
required: true
schema:
type: string
- name: linkDocumentId
in: query
description: The id of the document through which the above document should be accessed; only applicable when accessing a version of the document. This allows a user who has access to document a to see data from document b, as long as document b has been linked to document a by a user who has permission to both.
schema:
type: string
default: ''
- name: wvm
in: path
description: Indicates which of workspace (w), version (v), or document microversion (m) id is specified below.
required: true
schema:
type: string
enum:
- w
- v
- m
- name: wvmid
in: path
description: The id of the workspace, version or document microversion in which the operation should be performed.
required: true
schema:
type: string
- name: eid
in: path
description: The id of the element in which to perform the operation.
required: true
schema:
type: string
- name: configuration
in: query
description: URL-encoded string of configuration values (separated by `;`). See the [Configurations API Guide](https://onshape-public.github.io/docs/api-adv/configs/) for details.
schema:
type: string
default: ''
- name: explodedViewId
in: query
schema:
type: string
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
type: array
items:
$ref: '#/components/schemas/BTViewFeatureBaseInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/assemblies/d/{did}/{wvm}/{wvmid}/e/{eid}/features:
get:
tags:
- Assembly
summary: Get the definitions of the specified features in an assembly.
operationId: getFeatures
parameters:
- name: did
in: path
description: The id of the document in which to perform the operation.
required: true
schema:
type: string
- name: linkDocumentId
in: query
description: The id of the document through which the above document should be accessed; only applicable when accessing a version of the document. This allows a user who has access to document a to see data from document b, as long as document b has been linked to document a by a user who has permission to both.
schema:
type: string
default: ''
- name: wvm
in: path
description: Indicates which of workspace (w), version (v), or document microversion (m) id is specified below.
required: true
schema:
type: string
enum:
- w
- v
- m
- name: wvmid
in: path
description: The id of the workspace, version or document microversion in which the operation should be performed.
required: true
schema:
type: string
- name: eid
in: path
description: The id of the element in which to perform the operation.
required: true
schema:
type: string
- name: configuration
in: query
description: URL-encoded string of configuration values (separated by `;`). See the [Configurations API Guide](https://onshape-public.github.io/docs/api-adv/configs/) for details.
schema:
type: string
default: ''
- name: explodedViewId
in: query
schema:
type: string
- name: featureId
in: query
schema:
type: array
items:
type: string
responses:
'200':
description: Success!
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAssemblyFeatureListResponse-1174'
deprecated: false
security:
- OAuth2:
- OAuth
# --- truncated at 32 KB (139 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/onshape/refs/heads/main/openapi/onshape-assembly-api-openapi.yml