OpenAPI Specification
openapi: 3.0.1
info:
title: Onshape REST Account Metadata 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: Metadata
description: Access and modify metadata.
paths:
/metadata/d/{did}/{wvm}/{wvmid}/e:
get:
tags:
- Metadata
summary: Get the metadata for all elements in a document.
description: "See [API Guide: Metadata](https://onshape-public.github.io/docs/api-adv/metadata/) for details. \n* You can specify the optional `depth` query parameter to get multiple levels in an assembly. Default `depth` is `1`. \n* `linkDocumentId` can be specified where applicable. Combined with `inferMetadataOwner` (default value is `false`), this is used to infer metadata owner. \n* `includeComputedProperties` can be used to include or omit computed properties. Default value is `true`. \n* `includeComputedAssemblyProperties` can be used to query computed assembly properties which are generally expensive. Default value is `false`. \n* You can also choose to include a `thumbnail`. Default value is `false`."
operationId: getWMVEsMetadata
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: linkDocumentId
in: query
schema:
type: string
- name: inferMetadataOwner
in: query
schema:
type: boolean
default: false
- name: depth
in: query
schema:
type: string
default: '1'
- name: includeComputedProperties
in: query
schema:
type: boolean
default: true
- name: includeComputedAssemblyProperties
in: query
schema:
type: boolean
default: false
- name: thumbnail
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/BTMetadataObjectListInfoBTMetadataElementInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/metadata/d/{did}/{wvm}/{wvmid}/e/{eid}:
get:
tags:
- Metadata
summary: Get the metadata for an element.
description: "See [API Guide: Metadata](https://onshape-public.github.io/docs/api-adv/metadata/) for details. \n* `linkDocumentId` can be specified where applicable and this combined with the query param `inferMetadataOwner` (default value is `false`) will be used to infer metadata owner. \n* `configuration` optional query parameter defaults to default configuration. \n* You can specify an optional `depth` query parameter to get multiple levels in an assembly. Default `depth` is `1`. \n* `includeComputedProperties` can be used to include or omit computed properties. Default value is `true`. \n* `includeComputedAssemblyProperties` can be used to query computed assembly properties which are generally expensive. Default value is `false`. \n* You can also choose to include a `thumbnail`. Default value is `false`."
operationId: getWMVEMetadata
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
schema:
type: string
- name: inferMetadataOwner
in: query
schema:
type: boolean
default: false
- name: depth
in: query
schema:
type: string
default: '1'
- name: includeComputedProperties
in: query
schema:
type: boolean
default: true
- name: includeComputedAssemblyProperties
in: query
schema:
type: boolean
default: false
- name: thumbnail
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/BTMetadataObjectInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
post:
tags:
- Metadata
summary: Update the metadata for an element.
description: "See [API Guide: Metadata](https://onshape-public.github.io/docs/api-adv/metadata/) for details. \n* Microversion (`m`) in `wvm` path parameter option is not supported. \n* Specify the property metadata to update in the Request body."
operationId: updateWVEMetadata
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: configuration
in: query
schema:
type: string
requestBody:
content:
application/json;charset=UTF-8; qs=0.09:
schema:
type: string
required: 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
/metadata/d/{did}/{wvm}/{wvmid}/e/{eid}/assembly-debug:
get:
tags:
- Metadata
summary: Get the metadata for an assembly, including supporting metadata.
description: "See [API Guide: Metadata](https://onshape-public.github.io/docs/api-adv/metadata/) for details. \n* `linkDocumentId` can be specified where applicable and this combined with the query param `inferMetadataOwner` (default value is `false`) will be used to infer metadata owner. \n* `configuration` optional query parameter defaults to default configuration. \n* `includeComputedProperties` can be used to include or omit computed properties. Default value is `true`. \n* `includeComputedAssemblyProperties` can be used to query computed assembly properties which are generally expensive. Default value is `false`. \n* You can also choose to include a `thumbnail`. Default value is `false`."
operationId: getFullAssemblyMetadata
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
schema:
type: string
responses:
default:
description: default response
content:
application/json;charset=UTF-8; qs=0.09:
schema:
$ref: '#/components/schemas/BTAssemblyItemMetadataInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/metadata/d/{did}/{wvm}/{wvmid}/e/{eid}/p:
get:
tags:
- Metadata
summary: Get the metadata for all parts in a document.
description: "See [API Guide: Metadata](https://onshape-public.github.io/docs/api-adv/metadata/) for details. \n* The `configuration` optional query parameter uses the default configuration unless otherwise specified. \n* You can specify an optional `depth` query parameter to get multiple levels in an assembly. Default `depth` is `1`. \n* `linkDocumentId` can be specified where applicable. Combined with `inferMetadataOwner` (default value is `false`), this is used to infer metadata owner. \n* `includeComputedProperties` can be used to include or omit computed properties. Default value is `true`. \n* `includeComputedAssemblyProperties` can be used to query computed assembly properties which are generally expensive. Default value is `false`. \n* You can also choose to include a `thumbnail`. Default value is `false`."
operationId: getWMVEPsMetadata
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: inferMetadataOwner
in: query
schema:
type: boolean
default: false
- name: includeComputedProperties
in: query
schema:
type: boolean
default: true
- name: includeComputedAssemblyProperties
in: query
schema:
type: boolean
default: false
- name: thumbnail
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/BTMetadataObjectListInfoBTMetadataPartInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
/metadata/d/{did}/{wvm}/{wvmid}/e/{eid}/{iden}/{pid}:
get:
tags:
- Metadata
summary: Get the metadata for a part.
description: "See [API Guide: Metadata](https://onshape-public.github.io/docs/api-adv/metadata/) for details. \n* Specify the part in the `iden` or `pid` path parameter. \n* The `configuration` optional query parameter uses the default configuration unless otherwise specified. \n* `linkDocumentId` can be specified where applicable. Combined with `inferMetadataOwner` (default value is `false`), this is used to infer metadata owner. \n* `includeComputedProperties` can be used to include or omit computed properties. Default value is `true`. \n* `includeComputedAssemblyProperties` can be used to query computed assembly properties which are generally expensive. Default value is `false`. \n* You can also choose to include a `thumbnail`. Default value is `false`."
operationId: getWMVEPMetadata
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: iden
in: path
description: Denotes whether the pid specified is a part id (p) or a part identity (pi).
required: true
schema:
type: string
enum:
- p
- pi
- name: pid
in: path
required: true
schema:
type: string
- name: inferMetadataOwner
in: query
schema:
type: boolean
default: false
- name: includeComputedProperties
in: query
schema:
type: boolean
default: true
- name: includeComputedAssemblyProperties
in: query
schema:
type: boolean
default: false
- name: thumbnail
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/BTMetadataObjectInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
post:
tags:
- Metadata
summary: Update the metadata for a part.
description: "See [API Guide: Metadata](https://onshape-public.github.io/docs/api-adv/metadata/) for details. \n* Specify the part in the `iden` or `pid` path parameter. \n* The `configuration` optional query parameter uses the default configuration unless otherwise specified. \n* `linkDocumentId` can be specified where applicable. Combined with `inferMetadataOwner` (default value is `false`), this is used to infer metadata owner. \n* Specify the property metadata to update in the Request body."
operationId: updateWVEPMetadata
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: iden
in: path
description: Denotes whether the pid specified is a part id (p) or a part identity (pi).
required: true
schema:
type: string
enum:
- p
- pi
- name: pid
in: path
required: true
schema:
type: string
requestBody:
content:
application/json;charset=UTF-8; qs=0.09:
schema:
type: string
required: 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
/metadata/d/{did}/{wv}/{wvid}:
get:
tags:
- Metadata
summary: Get the metadata for a workspace or version.
description: "See [API Guide: Metadata](https://onshape-public.github.io/docs/api-adv/metadata/) for details. \n* `linkDocumentId` can be specified where applicable. Combined with `inferMetadataOwner` (default value is `false`), this is used to infer metadata owner. \n* You can specify an optional `depth` query parameter to get multiple levels in an assembly. Default `depth` is `1`. \n* `includeComputedProperties` can be used to include or omit computed properties. Default value is `true`. \n* `includeComputedAssemblyProperties` can be used to query computed assembly properties which are generally expensive. Default value is `false`. \n* You can also choose to include a `thumbnail`. Default value is `false`."
operationId: getWVMetadata
parameters:
- name: did
in: path
required: true
schema:
type: string
- name: wv
in: path
required: true
schema:
type: string
- name: wvid
in: path
required: true
schema:
type: string
- name: linkDocumentId
in: query
schema:
type: string
- name: inferMetadataOwner
in: query
schema:
type: boolean
default: false
- name: depth
in: query
schema:
type: string
default: '1'
- name: includeComputedProperties
in: query
schema:
type: boolean
default: true
- name: includeComputedAssemblyProperties
in: query
schema:
type: boolean
default: false
- name: thumbnail
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/BTMetadataObjectInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
post:
tags:
- Metadata
summary: Update the metadata for a workspace or version.
description: 'See [API Guide: Metadata](https://onshape-public.github.io/docs/api-adv/metadata/) for details.'
operationId: updateWVMetadata
parameters:
- name: did
in: path
required: true
schema:
type: string
- name: wv
in: path
required: true
schema:
type: string
- name: wvid
in: path
required: true
schema:
type: string
requestBody:
content:
application/json;charset=UTF-8; qs=0.09:
schema:
type: string
required: 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
/metadata/standardcontent/d/{did}:
post:
tags:
- Metadata
summary: Update the metadata for a standard content part.
description: 'Specify the property metadata to update in the Request body. See [API Guide: Metadata](https://onshape-public.github.io/docs/api-adv/metadata/#update-standard-content-part-metadata) for an example.'
operationId: updateVEOPStandardContentPartMetadata
parameters:
- name: did
in: path
description: The ID of the document that owns the standard content part.
required: true
schema:
type: string
- name: linkDocumentId
in: query
description: The ID of the document in which you have inserted the standard content part.
schema:
type: string
- name: companyId
in: query
schema:
type: string
requestBody:
content:
application/json;charset=UTF-8; qs=0.09:
schema:
type: string
required: 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
/metadata/standardcontent/d/{did}/v/{vid}/e/{eid}/p/{pid}:
get:
tags:
- Metadata
summary: Get the metadata for a standard content part.
description: "See [API Guide: Metadata](https://onshape-public.github.io/docs/api-adv/metadata/) for details. \n* Specify the part in the `pid` path parameter. \n* The `configuration` and `linkDocumentId` query parameters are required. \n* `includeComputedProperties` can be used to include or omit computed properties. Default value is `true`. \n* `includeComputedAssemblyProperties` can be used to query computed assembly properties which are generally expensive. Default value is `false`. \n* You can also choose to include a `thumbnail`. Default value is `false`."
operationId: getVEOPStandardContentMetadata
parameters:
- name: did
in: path
required: true
schema:
type: string
- name: vid
in: path
required: true
schema:
type: string
- name: eid
in: path
required: true
schema:
type: string
- name: pid
in: path
required: true
schema:
type: string
- name: configuration
in: query
schema:
type: string
- name: linkDocumentId
in: query
schema:
type: string
- name: companyId
in: query
schema:
type: string
- name: includeComputedProperties
in: query
schema:
type: boolean
default: true
- name: includeComputedAssemblyProperties
in: query
schema:
type: boolean
default: false
- name: thumbnail
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/BTMetadataObjectInfo'
deprecated: false
security:
- OAuth2:
- OAuth2Read
BasicAuth:
- OAuth2Read
x-BTVisibility: PRODUCTION
components:
schemas:
BTMetadataPropertyUiHintsInfo:
type: object
properties:
multiline:
type: boolean
BTThumbnailInfo:
type: object
properties:
href:
type: string
format: uri
id:
type: string
secondarySizes:
type: array
items:
type: array
items:
$ref: '#/components/schemas/BTThumbnailSizeInfo'
sizes:
type: array
items:
$ref: '#/components/schemas/BTThumbnailSizeInfo'
BTThumbnailSizeInfo:
type: object
properties:
href:
type: string
format: uri
mediaType:
type: string
renderMode:
type: string
sheetName:
type: string
size:
type: string
uniqueId:
type: string
viewOrientation:
type: string
BTMetadataElementInfo:
type: object
allOf:
- $ref: '#/components/schemas/BTMetadataObjectInfo'
- type: object
properties:
elementId:
type: string
elementType:
type: integer
format: int32
mimeType:
type: string
parts:
$ref: '#/components/schemas/BTMetadataObjectListInfoBTMetadataPartInfo'
BTMetadataObjectListInfoBTMetadataPartInfo:
type: object
properties:
href:
type: string
items:
type: array
items:
$ref: '#/components/schemas/BTMetadataPartInfo'
next:
type: string
prev:
type: string
BTMetadataPartInfo:
type: object
allOf:
- $ref: '#/components/schemas/BTMetadataObjectInfo'
- type: object
properties:
isFlattenedBody:
type: boolean
isPublicPartOverridable:
type: boolean
meshState:
type: integer
format: int32
partId:
type: string
partIdentity:
type: string
partType:
type: string
unflattenedPartId:
type: string
BTMetadataEnumValueInfo:
type: object
properties:
label:
type: string
state:
type: integer
for
# --- truncated at 32 KB (38 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/onshape/refs/heads/main/openapi/onshape-metadata-api-openapi.yml