OpenAPI Specification
openapi: 3.0.1
info:
title: Onshape REST Account AppElement 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: AppElement
description: Access and modify application elements.
paths:
/appelements/d/{did}/w/{wid}:
post:
tags:
- AppElement
summary: Create a new application element.
description: 'See [API Guide: Structured Storage](https://onshape-public.github.io/docs/app-dev/structuredstorage/) for more information.'
operationId: createElement
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
requestBody:
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAppElementParams'
required: true
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAppElementModifyInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Write
BasicAuth:
- OAuth2Write
x-BTVisibility: PRODUCTION
/appelements/d/{did}/w/{wid}/bulkcreate:
post:
tags:
- AppElement
summary: Create multiple empty application elements at once.
description: Call this faster API instead of creating multiple app elements one at a time or in parallel.
operationId: bulkCreateElement
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
requestBody:
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAppElementBulkCreateParams'
required: true
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAppElementBulkCreateInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Write
BasicAuth:
- OAuth2Write
x-BTVisibility: PRODUCTION
/appelements/d/{did}/w/{wid}/e/{eid}/blob/{bid}:
get:
tags:
- AppElement
summary: Download the blob element (i.e., a file) stored in an app element in a document's workspace.
description: The downloaded file can be used to retrieve stored subelements.
operationId: downloadBlobSubelementWorkspace
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: bid
in: path
required: true
schema:
type: string
- name: contentDisposition
in: query
schema:
type: string
- name: If-None-Match
in: header
schema:
type: string
- name: transactionId
in: query
schema:
type: string
- name: changeId
in: query
schema:
type: string
responses:
default:
description: File download.
content:
application/json;charset=UTF-8; qs=0.09:
schema:
type: string
format: binary
application/octet-stream:
schema:
type: string
format: binary
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
post:
tags:
- AppElement
summary: Create a new blob subelement from an uploaded file.
description: Request body parameters are multipart fields, so you must use `"Content-Type":"multipart/form-data"` in the request header.
operationId: uploadBlobSubelement
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: bid
in: path
required: true
schema:
type: string
requestBody:
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/BTBAppElementBlobUploadParams'
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAppElementModifyInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Write
BasicAuth:
- OAuth2Write
x-BTVisibility: PRODUCTION
delete:
tags:
- AppElement
summary: Delete a blob subelement from an app element.
operationId: deleteBlobSubelement
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: bid
in: path
required: true
schema:
type: string
- name: transactionId
in: query
schema:
type: string
- name: changeId
in: query
schema:
type: string
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAppElementModifyInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Write
BasicAuth:
- OAuth2Write
x-BTVisibility: PRODUCTION
/appelements/d/{did}/w/{wid}/e/{eid}/transactions:
get:
tags:
- AppElement
summary: Get a list of all transactions performed on an element.
operationId: getElementTransactions
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
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAppElementTransactionsInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
post:
tags:
- AppElement
summary: Start a transaction
description: Creates a microbranch (i.e., a branch for a new microversion).
operationId: startTransaction
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/BTAppElementStartTransactionParams'
required: true
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAppElementModifyInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Write
BasicAuth:
- OAuth2Write
x-BTVisibility: PRODUCTION
/appelements/d/{did}/w/{wid}/e/{eid}/transactions/{tid}:
delete:
tags:
- AppElement
summary: Abort a transaction.
description: Deletes a microbranch (i.e., the branch with the microversion for the transaction).
operationId: abortTransaction
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: tid
in: path
required: true
schema:
type: string
- name: returnError
in: query
schema:
type: boolean
default: true
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
/appelements/d/{did}/w/{wid}/transactions:
post:
tags:
- AppElement
summary: Merge multiple transactions into one microversion.
description: If successful, all transactions will be committed to a single microversion. If the call raises an error, nothing will be committed.
operationId: commitTransactions
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
requestBody:
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAppElementCommitTransactionParams'
required: true
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAppElementBulkModifyInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Write
BasicAuth:
- OAuth2Write
x-BTVisibility: PRODUCTION
/appelements/d/{did}/{vm}/{vmid}/e/{eid}/blob/{bid}:
get:
tags:
- AppElement
summary: Download a blob subelement from the specified app element.
description: Download a blob subelement as a file.
operationId: downloadBlobSubelement
parameters:
- name: did
in: path
required: true
schema:
type: string
- name: vm
in: path
required: true
schema:
type: string
- name: vmid
in: path
required: true
schema:
type: string
- name: eid
in: path
required: true
schema:
type: string
- name: bid
in: path
required: true
schema:
type: string
- name: contentDisposition
in: query
schema:
type: string
- name: If-None-Match
in: header
schema:
type: string
- name: transactionId
in: query
schema:
type: string
- name: changeId
in: query
schema:
type: string
- name: linkDocumentId
in: query
schema:
type: string
responses:
default:
description: File download.
content:
application/json;charset=UTF-8; qs=0.09:
schema:
type: string
format: binary
application/octet-stream:
schema:
type: string
format: binary
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/blob:
get:
tags:
- AppElement
summary: Get a list of all blob subelement IDs for the specified workspace, version, or microversion.
operationId: getBlobSubelementIds
parameters:
- name: did
in: path
required: true
schema:
type: string
- name: eid
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: transactionId
in: query
schema:
type: string
- name: changeId
in: query
schema:
type: string
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAppElementIdsInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/compare:
get:
tags:
- AppElement
summary: Compare app element JSON trees between workspaces/versions/microversions in a document.
description: Specify the source workspace/version/microversion in the URL and specify the target workspace/version/microversion in the query parameters.
operationId: compareAppElementJson
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: workspaceId
in: query
schema:
type: string
- name: versionId
in: query
schema:
type: string
- name: microversionId
in: query
schema:
type: string
- name: linkDocumentId
in: query
schema:
type: string
- name: jsonDifferenceFormat
in: query
schema:
type: string
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTDiffJsonResponse-2725'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/content:
get:
tags:
- AppElement
summary: Get a list of all subelement IDs in a specified workspace/version/microversion.
operationId: getSubElementContent
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: transactionId
in: query
schema:
type: string
- name: changeId
in: query
schema:
type: string
- name: baseChangeId
in: query
schema:
type: string
- name: subelementId
in: query
schema:
type: string
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAppElementContentInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
post:
tags:
- AppElement
summary: Update the content for the specified app element.
description: 'See [API Guide: Structured Storage](https://onshape-public.github.io/docs/app-dev/structuredstorage/) for more information.'
operationId: updateAppElement
parameters:
- name: did
in: path
required: true
schema:
type: string
- name: eid
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
requestBody:
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAppElementUpdateParams'
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAppElementModifyInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
- OAuth2Write
BasicAuth:
- OAuth2Read
- OAuth2Write
x-BTVisibility: PRODUCTION
/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/content/history:
get:
tags:
- AppElement
summary: Get the history of the specified all element.
operationId: getAppElementHistory
parameters:
- name: did
in: path
required: true
schema:
type: string
- name: eid
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
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAppElementHistoryInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/content/ids:
get:
tags:
- AppElement
summary: Get a list of all subelement IDs in a specified workspace/version/microversion.
operationId: getSubelementIds
parameters:
- name: did
in: path
required: true
schema:
type: string
- name: eid
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: transactionId
in: query
schema:
type: string
- name: changeId
in: query
schema:
type: string
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAppElementIdsInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/content/json:
get:
tags:
- AppElement
summary: Get the full JSON tree for the specified workspace/version/microversion.
operationId: getJson
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: transactionId
in: query
description: The id of the transaction in which this operation should take place. Transaction ids can be generated through the AppElement startTransaction API.
schema:
type: string
- name: changeId
in: query
description: The id of the last change made to this application element. This can be retrieved from the response for any app element modification endpoint.
schema:
type: string
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTGetJsonResponse-2137'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/content/jsonpaths:
post:
tags:
- AppElement
summary: Get the JSON at specified paths for an element.
description: Use this endpoint to return the JSON at the specified path instead of returning the entire JSON for the element. This POST endpoint does not write any information.
operationId: getJsonPaths
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: transactionId
in: query
schema:
type: string
- name: changeId
in: query
schema:
type: string
requestBody:
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTGetJsonPaths-1697'
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTGetJsonPathsResponse-1544'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/content/subelements:
get:
tags:
- AppElement
summary: Get a list of multiple subelements by document ID, workspace or version or microversion ID, tab ID, and subelement IDs.
operationId: getSubElementContentBatch
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: transactionId
in: query
description: The id of the transaction in which this operation should take place. Transaction ids can be generated through the AppElement startTransaction API.
schema:
type: string
- name: changeId
in: query
description: The id of the last change made to this application element. This can be retrieved from the response for any app element modification endpoint.
schema:
type: string
- name: baseChangeId
in: query
description: The id of a change made prior to the specified or implied changeId. If specified, only changes made after the base changeId are returned.
schema:
type: string
- name: subelementIds
in: query
description: 'The array of subelementIds in format: `&subelementIds=ID1& &subelementIds=ID2...&subelementIds=IDn.`'
schema:
type: array
items:
type: string
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAppElementContentInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCT
# --- truncated at 32 KB (69 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/onshape/refs/heads/main/openapi/onshape-appelement-api-openapi.yml