createHubScopedPropertyDefinitions
Creates multiple hub-scoped property definitions in a property definition collection.
Template for Mutation:
mutation CreateHubScopedPropertyDefinitions($input: createHubScopedPropertyDefinitionsInput!){
createHubScopedPropertyDefinitions(input: $input) {
# CreateHubScopedPropertyDefinitionsPayload Fields
}
}
Arguments
| input* | The inputs needed to create hub |
Possible Returns
| Value Type | Description |
|---|---|
| CreateHubScopedPropertyDefinitionsPayload | Response of create hub-scoped property definitions operation. |
Examples
Example 1
Creates a hub-scoped property definition of type STRING scoped to COMPONENT entities.
Query:
mutation CreateHubScopedPropertyDefinitions($input: CreateHubScopedPropertyDefinitionsInput!) {
createHubScopedPropertyDefinitions(input: $input) {
propertyDefinitions {
results {
id
name
specification
propertyBehavior
isHidden
isReadOnly
isArchived
shouldCopy
description
applicableEntityTypes
}
}
}
}
Query Variables:
{
"input": {
"hubId": "urn:adsk.ace:beta.scope:02dd340f-3e84-4db8-b6a1-56a964a202c7",
"propertyDefinitionsInput": [
{
"name": "Hub Scoped Prop 1793373406423",
"specification": "STRING",
"propertyBehavior": "STANDARD",
"description": "Hub-scoped string property",
"isHidden": false,
"shouldCopy": true,
"applicableEntityTypes": ["COMPONENT"]
}
]
}
}
Response:
{
"data": {
"createHubScopedPropertyDefinitions": {
"propertyDefinitions": {
"results": [
{
"id": "cHJvcGRlZn4yMTU5NTk2Nn4yMTU5NTk2Nl9IU0NQfjIxNTk1OTY2X0hTQ1B-cGFyYW1ldGVycy4yMTU5NTk2Njo1NGQ4OWNkOGE4MDk0N2JmYWM0M2ExYmFmZDg0Mzk0OS0xLjAuMA",
"name": "Hub Scoped Prop 1793373406423",
"specification": "STRING",
"propertyBehavior": "STANDARD",
"isHidden": false,
"isReadOnly": false,
"isArchived": false,
"shouldCopy": true,
"description": "Hub-scoped string property",
"applicableEntityTypes": [
"COMPONENT"
]
}
]
}
}
}
}
Example 2
Creates a hub-scoped property definition of type CURRENCY. The currencyCode field is required for CURRENCY specification — supported values include USD, EUR, GBP, JPY, etc. Scoped to COMPONENT entities.
Query:
mutation CreateHubScopedPropertyDefinitions($input: CreateHubScopedPropertyDefinitionsInput!) {
createHubScopedPropertyDefinitions(input: $input) {
propertyDefinitions {
results {
id
name
specification
propertyBehavior
isHidden
isReadOnly
isArchived
shouldCopy
description
applicableEntityTypes
specificationConfig {
... on CurrencySpecificationConfig {
currencyCode
currencySymbol
}
}
}
}
}
}
Query Variables:
{
"input": {
"hubId": "urn:adsk.ace:beta.scope:02dd340f-3e84-4db8-b6a1-56a964a202c7",
"propertyDefinitionsInput": [
{
"name": "Hub Currency Prop 1793373408769",
"specification": "CURRENCY",
"propertyBehavior": "STANDARD",
"description": "Hub-scoped currency property in USD",
"isHidden": false,
"shouldCopy": false,
"applicableEntityTypes": ["COMPONENT"],
"specificationConfig": {
"currencyCode": "USD"
}
}
]
}
}
Response:
{
"data": {
"createHubScopedPropertyDefinitions": {
"propertyDefinitions": {
"results": [
{
"id": "cHJvcGRlZn4yMTU5NTk2Nn4yMTU5NTk2Nl9IU0NQfjIxNTk1OTY2X0hTQ1B-cGFyYW1ldGVycy4yMTU5NTk2NjpjNzIwNmViOTUxOGE0ZGI1OGY2YThhZGI2NjcyY2U2Yi0xLjAuMA",
"name": "Hub Currency Prop 1793373408769",
"specification": "CURRENCY",
"propertyBehavior": "STANDARD",
"isHidden": false,
"isReadOnly": false,
"isArchived": false,
"shouldCopy": false,
"description": "Hub-scoped currency property in USD",
"applicableEntityTypes": [
"COMPONENT"
],
"specificationConfig": {
"currencyCode": "USD",
"currencySymbol": "$"
}
}
]
}
}
}
}
Example 3
Creates a hub-scoped property definition of type PICKLIST. The picklistOptions field is required for PICKLIST specification — provide between 1 and 100 named options. Scoped to COMPONENT entities.
Query:
mutation CreateHubScopedPropertyDefinitions($input: CreateHubScopedPropertyDefinitionsInput!) {
createHubScopedPropertyDefinitions(input: $input) {
propertyDefinitions {
results {
id
isHidden
name
shouldCopy
description
specification
propertyBehavior
applicableEntityTypes
picklistOptions {
id
name
}
}
}
}
}
Query Variables:
{
"input": {
"hubId": "urn:adsk.ace:beta.scope:02dd340f-3e84-4db8-b6a1-56a964a202c7",
"propertyDefinitionsInput": [
{
"name": "Hub Picklist Prop 1793373411410",
"specification": "PICKLIST",
"propertyBehavior": "STANDARD",
"description": "Hub-scoped picklist property with predefined options",
"isHidden": false,
"shouldCopy": true,
"applicableEntityTypes": ["COMPONENT"],
"specificationConfig": {
"picklistOptions": [
{ "name": "Option A" },
{ "name": "Option B" },
{ "name": "Option C" }
]
}
}
]
}
}
Response:
{
"data": {
"createHubScopedPropertyDefinitions": {
"propertyDefinitions": {
"results": [
{
"id": "cHJvcGRlZn4yMTU5NTk2Nn4yMTU5NTk2Nl9IU0NQfjIxNTk1OTY2X0hTQ1B-cGFyYW1ldGVycy4yMTU5NTk2NjoyY2NmNDMxNjBkZDM0MjZkYjQxMmQ0ZmU3YTNkNWM1MC0xLjAuMA",
"isHidden": false,
"name": "Hub Picklist Prop 1793373411410",
"shouldCopy": true,
"description": "Hub-scoped picklist property with predefined options",
"specification": "PICKLIST",
"propertyBehavior": "STANDARD",
"applicableEntityTypes": [
"COMPONENT"
],
"picklistOptions": [
{
"id": "0",
"name": "Option A"
},
{
"id": "1",
"name": "Option B"
},
{
"id": "2",
"name": "Option C"
}
]
}
]
}
}
}
}
Example 4
Creates a hub-scoped property definition of type DATE scoped to COMPONENT entities.
Query:
mutation CreateHubScopedPropertyDefinitions($input: CreateHubScopedPropertyDefinitionsInput!) {
createHubScopedPropertyDefinitions(input: $input) {
propertyDefinitions {
results {
id
name
specification
propertyBehavior
isHidden
isReadOnly
isArchived
shouldCopy
description
applicableEntityTypes
}
}
}
}
Query Variables:
{
"input": {
"hubId": "urn:adsk.ace:beta.scope:02dd340f-3e84-4db8-b6a1-56a964a202c7",
"propertyDefinitionsInput": [
{
"name": "Hub Scoped Prop 1793373415586",
"specification": "DATE",
"propertyBehavior": "STANDARD",
"description": "Hub-scoped date property",
"isHidden": false,
"shouldCopy": true,
"applicableEntityTypes": ["COMPONENT"]
}
]
}
}
Response:
{
"data": {
"createHubScopedPropertyDefinitions": {
"propertyDefinitions": {
"results": [
{
"id": "cHJvcGRlZn4yMTU5NTk2Nn4yMTU5NTk2Nl9IU0NQfjIxNTk1OTY2X0hTQ1B-cGFyYW1ldGVycy4yMTU5NTk2Njo3ODUxZWI4MDYxOTU0NTEzYjNhODI2YWJkMTRlNzE0NC0xLjAuMA",
"name": "Hub Scoped Prop 1793373415586",
"specification": "DATE",
"propertyBehavior": "STANDARD",
"isHidden": false,
"isReadOnly": false,
"isArchived": false,
"shouldCopy": true,
"description": "Hub-scoped date property",
"applicableEntityTypes": [
"COMPONENT"
]
}
]
}
}
}
}