OpenAPI Specification
openapi: 3.0.1
info:
title: Onshape REST Account Part 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: Part
description: Export Parts and access Part details.
paths:
/parts/d/{did}/{wvm}/{wvmid}:
get:
tags:
- Part
summary: Get all parts in a workspace, version, or microversion.
operationId: getPartsWMV
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: elementId
in: query
description: The id of the element in which to perform the operation.
required: true
schema:
type: string
- name: configuration
in: query
schema:
type: string
default: ''
- name: withThumbnails
in: query
description: Whether or not to include thumbnails (not supported for microversion)
schema:
type: boolean
default: false
- name: includePropertyDefaults
in: query
description: If true, include metadata schema property defaults in response
schema:
type: boolean
default: false
- name: includeFlatParts
in: query
schema:
type: boolean
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
type: array
items:
$ref: '#/components/schemas/BTPartMetadataInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/parts/d/{did}/{wvm}/{wvmid}/e/{eid}:
get:
tags:
- Part
summary: Get all parts in an element.
operationId: getPartsWMVE
parameters:
- name: did
in: path
description: Document ID.
required: true
schema:
type: string
- name: wvm
in: path
description: One of w or v or m corresponding to whether a workspace or version or microversion was entered.
required: true
schema:
type: string
- name: wvmid
in: path
description: Workspace (w), Version (v) or Microversion (m) ID.
required: true
schema:
type: string
- name: eid
in: path
description: Element ID.
required: true
schema:
type: string
- name: withThumbnails
in: query
description: Whether or not to include thumbnails (not supported for microversion)
schema:
type: boolean
default: false
- name: includePropertyDefaults
in: query
description: If true, include metadata schema property defaults in response
schema:
type: boolean
default: false
- name: includeFlatParts
in: query
schema:
type: boolean
- 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
- name: linkDocumentId
in: query
description: Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
schema:
type: string
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
type: array
items:
$ref: '#/components/schemas/BTPartMetadataInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/parts/d/{did}/{wvm}/{wvmid}/e/{eid}/partid/{partid}/bodydetails:
get:
tags:
- Part
summary: Get a part's body details.
description: All coordinates are in meters (m).
operationId: getBodyDetails
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: rollbackBarIndex
in: query
description: Index specifying the location of the rollback bar when the call is evaluated. A -1 indicates that it should be at the end of the featurelist.
schema:
type: integer
format: int32
default: -1
- name: elementMicroversionId
in: query
description: A specific element microversion in which to evaluate the request.
schema:
type: string
- name: partid
in: path
required: true
schema:
type: string
- name: includeGeometricData
in: query
description: Whether or not geometric data should be included in the response.
schema:
type: boolean
default: true
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTExportModelBodiesResponse-734'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/parts/d/{did}/{wvm}/{wvmid}/e/{eid}/partid/{partid}/boundingboxes:
get:
tags:
- Part
summary: Get a part's bounding box details.
operationId: getBoundingBoxes
parameters:
- name: did
in: path
required: true
schema:
type: string
- name: wvm
in: path
required: true
schema:
type: string
- name: wvmid
in: path
required: true
schema:
type: string
- name: eid
in: path
required: true
schema:
type: string
- name: partid
in: path
required: true
schema:
type: string
- name: includeHidden
in: query
schema:
type: boolean
default: false
- name: configuration
in: query
schema:
type: string
- name: linkDocumentId
in: query
schema:
type: string
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
/parts/d/{did}/{wvm}/{wvmid}/e/{eid}/partid/{partid}/gltf:
get:
tags:
- Part
summary: Synchronously export a part to a glTF file.
description: "Creates a synchronous export of the part (with limited tessellation settings) to a glTF file. \n* Returns a 307 redirect from which to download the exported file. \n* Export is much faster than asynchronous endpoints at the expense of limited control on tessellation settings. \n* Use the [PartStudio/createPartStudioTranslation](#/PartStudio/createPartStudioTranslation) asynchronous export for greater control. \n \nSee [API Guide: Synchronous Exports](https://onshape-public.github.io/docs/api-adv/translation/#synchronous-exports) for more details."
operationId: exportPartGltf
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: rollbackBarIndex
in: query
description: Index specifying the location of the rollback bar when the call is evaluated. A -1 indicates that it should be at the end of the featurelist.
schema:
type: integer
format: int32
default: -1
- name: elementMicroversionId
in: query
description: A specific element microversion in which to evaluate the request.
schema:
type: string
- name: partid
in: path
required: true
schema:
type: string
- name: angleTolerance
in: query
schema:
type: number
format: double
- name: chordTolerance
in: query
schema:
type: number
format: double
- name: precomputedLevelOfDetail
in: query
schema:
type: string
- name: outputSeparateFaceNodes
in: query
schema:
type: boolean
default: false
- name: faceId
in: query
schema:
type: array
items:
type: string
- name: outputFaceAppearances
in: query
schema:
type: boolean
default: false
- name: maxFacetWidth
in: query
schema:
type: number
format: double
responses:
'200':
description: Success!
content:
model/gltf+json;charset=UTF-8;qs=0.08:
schema:
$ref: '#/components/schemas/GlTF'
model/gltf-binary;qs=0.08:
schema:
type: string
description: Binary representation of glTF data
format: binary
example: data
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/parts/d/{did}/{wvm}/{wvmid}/e/{eid}/partid/{partid}/massproperties:
get:
tags:
- Part
summary: Get a part's mass properties.
description: "Parts must have density. The returned schema includes the same information as in the Onshape [Mass Properties Tool](https://cad.onshape.com/help/Content/massprops-ps.htm). \nWhen three values are returned: \n * The first is the calculated value. \n * The second is the minimum possible value, considering tolerance. \n * The third is the maximum possible value, considering tolerance."
operationId: getMassProperties
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: rollbackBarIndex
in: query
description: Index specifying the location of the rollback bar when the call is evaluated. A -1 indicates that it should be at the end of the featurelist.
schema:
type: integer
format: int32
default: -1
- name: elementMicroversionId
in: query
description: A specific element microversion in which to evaluate the request.
schema:
type: string
- name: partid
in: path
required: true
schema:
type: string
- name: inferMetadataOwner
in: query
schema:
type: boolean
default: true
- name: useMassPropertyOverrides
in: query
description: If true, use the user mass property overrides when calculated mass properties
schema:
type: boolean
default: false
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTMassPropertiesBulkInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/parts/d/{did}/{wvm}/{wvmid}/e/{eid}/partid/{partid}/parasolid:
get:
tags:
- Part
summary: Synchronously export a part to a Parasolid file.
description: "Creates a synchronous export of the part (with limited tessellation settings) to a Parasolid file. \n* Returns a 307 redirect from which to download the exported file. \n* Export is much faster than asynchronous endpoints at the expense of limited control on tessellation settings. \n* Use the [PartStudio/createPartStudioTranslation](#/PartStudio/createPartStudioTranslation) asynchronous export for greater control. \n \nSee [API Guide: Synchronous Exports](https://onshape-public.github.io/docs/api-adv/translation/#synchronous-exports) for more details."
operationId: exportPS
parameters:
- name: did
in: path
required: true
schema:
type: string
- name: wvm
in: path
required: true
schema:
type: string
- name: wvmid
in: path
required: true
schema:
type: string
- name: eid
in: path
required: true
schema:
type: string
- name: partid
in: path
required: true
schema:
type: string
- name: version
in: query
schema:
type: string
default: '0'
- name: configuration
in: query
schema:
type: string
- name: linkDocumentId
in: query
schema:
type: string
responses:
'307':
description: A Redirect!
content:
application/octet-stream:
schema:
type: string
format: binary
application/json;charset=UTF-8; qs=0.09:
schema:
type: string
format: binary
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/parts/d/{did}/{wvm}/{wvmid}/e/{eid}/partid/{partid}/shadedviews:
get:
tags:
- Part
summary: Get a part's shaded views.
operationId: getPartShadedViews
parameters:
- name: did
in: path
required: true
schema:
type: string
- name: wvm
in: path
required: true
schema:
type: string
- name: wvmid
in: path
required: true
schema:
type: string
- name: eid
in: path
required: true
schema:
type: string
- name: partid
in: path
required: true
schema:
type: string
- name: viewMatrix
in: query
schema:
type: string
default: front
- name: outputHeight
in: query
schema:
type: integer
format: int32
default: 500
- name: outputWidth
in: query
schema:
type: integer
format: int32
default: 500
- name: pixelSize
in: query
schema:
type: number
format: double
default: 0.003
- name: edges
in: query
schema:
type: string
default: show
- name: useAntiAliasing
in: query
schema:
type: boolean
default: false
- name: configuration
in: query
schema:
type: string
- name: linkDocumentId
in: query
schema:
type: string
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTShadedViewsInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/parts/d/{did}/{wvm}/{wvmid}/e/{eid}/partid/{partid}/sheetmetal/bendtable:
get:
tags:
- Part
summary: Get a part's sheet metal bend table.
operationId: getBendTable
parameters:
- name: did
in: path
required: true
schema:
type: string
- name: wvm
in: path
required: true
schema:
type: string
- name: wvmid
in: path
required: true
schema:
type: string
- name: eid
in: path
required: true
schema:
type: string
- name: partid
in: path
required: true
schema:
type: string
- name: linkDocumentId
in: query
schema:
type: string
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTTableResponse-1546'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/parts/d/{did}/{wvm}/{wvmid}/e/{eid}/partid/{partid}/stl:
get:
tags:
- Part
summary: Synchronously export a part to an STL file.
description: "Creates a synchronous export of the part (with limited tessellation settings) to an STL file. \n* Returns a 307 redirect from which to download the exported file. \n* Export is much faster than asynchronous endpoints at the expense of limited control on tessellation settings. \n* Use the [PartStudio/createPartStudioTranslation](#/PartStudio/createPartStudioTranslation) asynchronous export for greater control. \n \nSee [API Guide: Synchronous Exports](https://onshape-public.github.io/docs/api-adv/translation/#synchronous-exports) for more details."
operationId: exportStl
parameters:
- name: did
in: path
required: true
schema:
type: string
- name: wvm
in: path
required: true
schema:
type: string
- name: wvmid
in: path
required: true
schema:
type: string
- name: eid
in: path
required: true
schema:
type: string
- name: partid
in: path
required: true
schema:
type: string
- name: mode
in: query
schema:
type: string
default: text
- name: grouping
in: query
schema:
type: boolean
default: true
- name: scale
in: query
schema:
type: number
format: double
default: 1.0
- name: units
in: query
schema:
type: string
default: inch
- name: angleTolerance
in: query
schema:
type: number
format: double
- name: chordTolerance
in: query
schema:
type: number
format: double
- name: maxFacetWidth
in: query
schema:
type: number
format: double
- name: minFacetWidth
in: query
schema:
type: number
format: double
- name: configuration
in: query
schema:
type: string
- name: linkDocumentId
in: query
schema:
type: string
responses:
default:
description: default response
content:
application/octet-stream:
schema:
type: object
application/json;charset=UTF-8; qs=0.09:
schema:
type: object
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/parts/d/{did}/{wvm}/{wvmid}/e/{eid}/partid/{partid}/tessellatededges:
get:
tags:
- Part
summary: Get a list of a part's tessellation edges.
description: Returns the coordinates (in meters) of each edge's endpoints.
operationId: getEdges
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: rollbackBarIndex
in: query
description: Index specifying the location of the rollback bar when the call is evaluated. A -1 indicates that it should be at the end of the featurelist.
schema:
type: integer
format: int32
default: -1
- name: elementMicroversionId
in: query
description: A specific element microversion in which to evaluate the request.
schema:
type: string
- name: partid
in: path
required: true
schema:
type: string
- name: angleTolerance
in: query
schema:
type: number
format: double
- name: chordTolerance
in: query
schema:
type: number
format: double
- name: precomputedLevelOfDetail
in: query
schema:
type: string
- name: edgeId
in: query
schema:
type: array
items:
type: string
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTExportTessellatedEdgesResponse-327'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/parts/d/{did}/{wvm}/{wvmid}/e/{eid}/partid/{partid}/tessellatedfaces:
get:
tags:
- Part
summary: Get a list of a part's tessellation faces.
description: Coordinates are in meters (m).
operationId: getFaces_1
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: rollbackBarIndex
in: query
description: Index specifying the location of the rollback bar when the call is evaluated. A -1 indicates that it should be at the end of the featurelist.
schem
# --- truncated at 32 KB (194 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/onshape/refs/heads/main/openapi/onshape-part-api-openapi.yml