Management SDK field examples
Please note that a lot of the examples shown here rely on a previously created schema and cannot be used as standalone information. This document merely aims at offering users easy access to examples on how to create different field types using the Management SDK.
All the examples shown here use example values, which you need to replace with your own. For instance, <your_model>
could be replaced with any model name of your choice, like Author
.
All Create
, Update
, and Delete
actions require Update and Delete Existing Fields permissions set in the auth token.
#Models
#Create models
client.createModel({apiId: '<your_api_id>',apiIdPlural: '<your_api_id_plural>',description: `<your_model_description>`,displayName: '<Your model name>',});
apiId
: String. The modelapiId
.apiIdPlural
: String. The models pluralapiId
. This is used for lists.description
: Optional - String. Description of the model.displayName
: String. Display name that is used to render the model in the webapp.
#Update models
client.updateModel({apiId: '<your_api_id>',apiIdPlural: '<your_api_id_plural>',description: `<your_model_description>`,displayName: '<Your model name>',newApiId: `<your_new_api_id>`,});
apiId
: String. The modelapiId
.apiIdPlural
: Optional - String. The model's pluralapiId
. This is used for lists.description
: Optional - String. Description of the model.displayName
: Optional - String. Display name that is used to render the model in the webapp.newApiId
: Optional - String. The model's newapiId
.
#Delete models
client.deleteModel({apiId: '<your_api_id>',});
apiId
: String. TheapiId
of the model you wish to delete.
#Simple fields
#Create simple fields
client.createSimpleField({apiId: `<your_api_id>`,description: `<your_description>`,displayName: `<your_display_name>`,embeddableModels: `<embeddable_models>`,embedsEnabled: `<boolean>`,formConfig: `<form_config_json>`,formExtension: `<form_extension>`,formRenderer: `<form_renderer>`,isHidden: `<boolean>`,isList: `<boolean>`,isLocalized: `<boolean>`,isRequired: `<boolean>`,isTitle: `<boolean>`,isUnique: `<boolean>`,migrationValue: `<migration_value>`,modelApiId: `<model_api_id>`,parentApiId: `<parent_api_id>`,position: `<int>`,tableConfig: `<table_config_json>`,tableExtension: `<table_extension>`,tableRenderer: `<table_renderer>`,type: SimpleFieldType,validations: `<SimpleFieldValidationsInput>`,visibility: `<VisibilityTypes>`,});
apiId
: String Your simple fieldapiId
.description
: Optional - String. Simple field description.displayName
: String. Display name that is used to render the field in the webapp.embeddableModels
: Optional - String.embedsEnabled
: Optional - Boolean.formConfig
: Optional - JSON.formExtension
: Optional - String.formRenderer
: Optional - String.isHidden
: Optional - Boolean. Makes the field hidden if true.isList
: Optional - Boolean.isLocalized
: Optional - Boolean.isRequired
: Optional - Boolean. Makes the field required if true.isTitle
: Optional - Boolean. Makes the field a title if true.isUnique
: Optional - Boolean. Makes the field unique if true.migrationValue
: Optional - String. Value which will go in place ofnull
if the field is later maderequired
.modelApiId
: Optional - String. ModelapiId
.parentApiId
: Optional - String. ParentapiId
.position
: Optional - Integer.tableConfig
: Optional - JSON.tableExtension
: Optional - String.tableRenderer
: Optional - String.type
: SimpleFieldType,validations
: Field validations.visibility
: Field visibility, for exampleVisibilityTypes.ReadWrite
.
#Update simple field
client.updateSimpleField({apiId: `<your_api_id>`,description: `<your_description>`,displayName: `<your_display_name>`,embeddableModels: `<embeddable_models>`,embedsEnabled: `<boolean>`,formConfig: `<form_config_json>`,formExtension: `<form_extension>`,formRenderer: `<form_renderer>`,initialValue: `<initial_value>`,isHidden: `<boolean>`,isList: `<boolean>`,isLocalized: `<boolean>`,isRequired: `<boolean>`,isTitle: `<boolean>`,isUnique: `<boolean>`,migrationValue: `<migration_value>`,modelApiId: `<model_api_id>`,newApiId: `<new_api_id>`,parentApiId: `<parent_api_id>`,position: `<int>`,tableConfig: `<table_config_json>`,tableExtension: `<table_extension>`,tableRenderer: `<table_renderer>`,validations: `<SimpleFieldValidationsInput>`,visibility: `<VisibilityTypes>`,});
apiId
: String Your simple fieldapiId
.description
: Optional - String. Simple field description.displayName
: String. Display name that is used to render the field in the webapp.embeddableModels
: Optional - String.embedsEnabled
: Optional - Boolean.formConfig
: Optional - JSON.formExtension
: Optional - String.formRenderer
: Optional - String.initialValue
: Optional - String.isHidden
: Optional - Boolean. Makes the field hidden if true.isList
: Optional - Boolean.isLocalized
: Optional - Boolean.isRequired
: Optional - Boolean. Makes the field required if true.isTitle
: Optional - Boolean. Makes the field a title if true.isUnique
: Optional - Boolean. Makes the field unique if true.migrationValue
: Optional - String. Value which will go in place ofnull
if the field is later maderequired
.modelApiId
: Optional - String. ModelapiId
.newApiId
: Optional - String. NewapiId
.parentApiId
: Optional - String. ParentapiId
.position
: Optional - Integer.tableConfig
: Optional - JSON.tableExtension
: Optional - String.tableRenderer
: Optional - String.validations
: Field validations.visibility
: Field visibility, for exampleVisibilityTypes.ReadWrite
.
#Delete field
client.deleteField({apiId: `<your_api_id>`,modelApiId: `<model_api_id>`,parentApiId: `<parent_api_id>`,});
apiId
: String. ThrapiId
of the field you wish to delete.modelApiId
: Optional - String. ThemodelApiId
of the field you wish to delete.parentApiId
: Optional - String. TheparentApiId
of the field you wish to delete.
#Specific examples
#Title field of type string
client.createSimpleField({parentApiId: '<parent_api_id>',type: SimpleFieldType.String,apiId: '<your_title>',displayName: '<Your Title>',isTitle: true,isRequired: true,visibility: VisibilityTypes.ReadWrite,});
#Simple field of type string
client.createSimpleField({parentApiId: '<parent_api_id>',type: SimpleFieldType.String,apiId: '<your_api_id>',displayName: '<Your Display Name>',isRequired: true,visibility: VisibilityTypes.ReadWrite,});
#Slug field
client.createSimpleField({parentApiId: '<parent_api_id>',type: SimpleFieldType.String,apiId: '<your_api_id>',displayName: '<Your Display Name>',description:'<Enter the slug for this page, such as about, blog, or contact>',isRequired: true,isUnique: true,tableRenderer: 'GCMS_SLUG',formRenderer: 'GCMS_SLUG',});
#Hidden integer field with custom field validation
client.createSimpleField({parentApiId: '<parent_api_id>',type: SimpleFieldType.Int,apiId: '<api_id>',displayName: '<Your Display Name>',visibility: VisibilityTypes.Hidden,validations: {Int: {range: {max: 1000,min: 0,errorMessage: '<Counter has to be between 0 and 1000>',},},},});
#Required & unique string field with custom regex validation for emails
client.createSimpleField({parentApiId: '<parent_api_id>',type: SimpleFieldType.String,apiId: '<email>',displayName: '<Email>',isRequired: true,isUnique: true,validations: {String: {matches: {regex: '^([a-z0-9_\\.\\+-]+)@([\\da-z\\.-]+)\\.([a-z\\.]{2,6})$',},},},});
#Richtext field
client.createSimpleField({parentApiId: '<parent_api_id>',type: SimpleFieldType.Richtext,apiId: '<api_id>',displayName: '<Your Display Name>',description:'<Enter the content for this page. The content uses the rich-text editor, giving you a better visual representation.>',isRequired: true,});
#Richtext with embeds and single allowed embeddable model
client.createSimpleField({parentApiId: '<parent_api_id>',type: SimpleFieldType.Richtext,apiId: '<api_id>',displayName: '<Your Display Name>',embedsEnabled: true,embeddableModels: ['<model>'],});
#List of date times
client.createSimpleField({parentApiId: '<parent_api_id>',type: SimpleFieldType.Datetime,apiId: '<api_id>',displayName: '<Your Display Name>',isRequired: true,isList: true,});
#Relational fields
#Create relational field
client.createRelationalField({apiId: '<api_id>',description: `<your_description>`,displayName: '<Your Display Name>',formExtension: `<form_extension>`,formRenderer: `<form_renderer>`,isHidden: `<boolean>`,isList: `<boolean>`,isRequired: `<boolean>`,modelApiId: `<model_api_id>`,parentApiId: '<parent_api_id>',reverseField: {apiId: '<api_id>',description: `<description>`,displayName: '<Your Display Name>',isHidden: `<boolean>`,isList: `<boolean>`,isUnidirectional: `<boolean>`,modelApiId: '<model_api_id>',visibility: `<visibility_types>`,},tableExtension: `<table_extension>`,tableRenderer: `<table_renderer>`,type: `<relational_field_type>`,visibility: `<visibility_types>`,});
apiId
: String. Your relational fieldapiId
.description
: Optional - String. Relational field description.displayName
: String. Display name that is used to render the relational field in the webapp.formExtension
: Optional - String.formRenderer
: Optional - String.isHidden
: Optional - Boolean. The relational field is hidden if true.isList
: Optional - Boolean.isRequired
: Optional - Boolean. The relational field is required if true. Only supported forRelationalFieldType.Asset
.modelApiId
: Optional - String. ModelapiId
.parentApiId
: Optional - String. ParentapiId
.reverseField
: Reverse relational field input.apiId
: String. Your reverse relational fieldapiId
.description
: Optional - String. Description.displayName
: String. Reverse field display name.isHidden
: Optional - Boolean. The field is hidden if true.isList
: Optional - Boolean.isUnidirectional
: Optional - Boolean. The field is unidirectional if true.modelApiId
: String. Reverse field modelapiId
.visibility
: Visibility types.
tableExtension
: Optional - String.tableRenderer
: Optional - String.type
: Relational field type. For exampleRelationalFieldType.Asset
.visibility
: Optional. Visibility types.
#Update relational field
client.updateRelationalField({apiId: '<api_id>',description: `<your_description>`,displayName: '<Your Display Name>',formExtension: `<form_extension>`,formRenderer: `<form_renderer>`,isHidden: `<boolean>`,isList: `<boolean>`,isRequired: `<boolean>`,modelApiId: `<model_api_id>`,parentApiId: '<parent_api_id>',reverseField: {apiId: '<api_id>',description: `<description>`,displayName: '<Your Display Name>',isHidden: `<boolean>`,isList: `<boolean>`,isUnidirectional: `<boolean>`,modelApiId: '<model_api_id>',visibility: `<visibility_types>`,},tableExtension: `<table_extension>`,tableRenderer: `<table_renderer>`,type: `<relational_field_type>`,visibility: `<visibility_types>`,});
apiId
: String. Your relational fieldapiId
.description
: Optional - String. Relational field description.displayName
: String. Display name that is used to render the relational field in the webapp.formExtension
: Optional - String.formRenderer
: Optional - String.isHidden
: Optional - Boolean. The relational field is hidden if true.isList
: Optional - Boolean.isRequired
: Optional - Boolean. The relational field is required if true. Only supported forRelationalFieldType.Asset
.modelApiId
: Optional - String. ModelapiId
.parentApiId
: Optional - String. ParentapiId
.reverseField
: Reverse relational field input.apiId
: String. Your reverse relational fieldapiId
.description
: Optional - String. Description.displayName
: String. Reverse field display name.isHidden
: Optional - Boolean. The field is hidden if true.isList
: Optional - Boolean.isUnidirectional
: Optional - Boolean. The field is unidirectional if true.modelApiId
: String. Reverse field modelapiId
.visibility
: Visibility types.
tableExtension
: Optional - String.tableRenderer
: Optional - String.type
: Relational field type. For exampleRelationalFieldType.Asset
.visibility
: Optional. Visibility types.
#Delete relational field
Use deleteField method.
#Specific examples
#Required uni-directional asset field
client.createRelationalField({parentApiId: '<parent_api_id>',apiId: '<api_id>',displayName: '<Your Display Name>',type: RelationalFieldType.Asset,isRequired: true,reverseField: {isUnidirectional: true,apiId: '<api_id>',displayName: '<Your Display Name>',modelApiId: '<model_api_id>',},});
#M-n relation
client.createRelationalField({parentApiId: '<parent_api_id>',apiId: '<api_id>',displayName: '<Your Display Name>',type: RelationalFieldType.Relation,isList: true,reverseField: {modelApiId: '<model_api_id>',apiId: '<api_id>',displayName: '<Your Display Name>',isList: true,},});
#Union fields
#Create union field
client.createUnionField({apiId: '<api_id>',description: `<description>`,displayName: '<Your Display Name>',formExtension: `<form_extension>`,formRenderer: `<form_renderer>`,isHidden: `<boolean>`,isList: `<boolean>`,modelApiId: `<model_api_id>`,parentApiId: '<parent_api_id>',reverseField: {apiId: '<api_id>',description: `<description>`,displayName: '<Your Display Name>',isHidden: `<boolean>`,isList: `<boolean>`,modelApiIds: ['<model_api_id_1>', '<model_api_id_2>'],visibility: `<visibility_types>`,},tableExtension: `<table_extension>`,tableRenderer: `<table_renderer>`,visibility: `<visibility_types>`,});
apiId
: String. Union fieldapiId
.description
: Optional - String. Union field description.displayName
: String. Display name that is used to render the union field in the webapp.formExtension
: Optional - String.formRenderer
: Optional - String.isHidden
: Optional - Boolean. The relational field is hidden if true.isList
: Optional - Boolean.modelApiId
: Optional - String. ModelapiId
.parentApiId
: Optional - String. ParentapiId
.reverseField
: Reverse union field input.apiId
: Optional - String.description
: Optional - String.displayName
: Optional - String.isHidden
: Optional - Boolean. The reverse relational field is hidden if true.isList
: Optional - Boolean.modelApiIds
: String. ModelapiIds
.visibility
: Visibility types.
tableExtension
: Optional - String.tableRenderer
: Optional - String.visibility
: Visibility types.
#Update union field
client.updateUnionField({apiId: '<api_id>',description: `<description>`,displayName: '<Your Display Name>',modelApiId: `<model_api_id>`,parentApiId: '<parent_api_id>',reverseField: {modelApiIds: ['<model_api_id_1>', '<model_api_id_2>'],},visibility: `<visibility_types>`,});
apiId
: String. Union fieldapiId
.description
: Optional - String. Union field description.displayName
: String. Display name that is used to render the union field in the webapp.modelApiId
: Optional - String. ModelapiId
.parentApiId
: Optional - String. ParentapiId
.reverseField
:updateReverseUnionField
. Update reverse union field input.modelApiIds
: String. ModelapiIds
.
visibility
: Visibility types.
#Delete union field
Use deleteField method.
#Components
#Create component
client.createComponent({apiId: '<api_id>',apiIdPlural: '<api_id_plural>',description: `<your_description>`,displayName: '<Your Display Name>',});
apiId
: String. Your componentapiId
.apiIdPlural
: String. The component's pluralapiId
. This is used for lists.description
: Optional - String. Your component description.displayName
: String. Display name that is used to render the component in the webapp.
#Update component
client.updateComponent({apiId: '<api_id>',apiIdPlural: '<api_id_plural>',description: `<your_description>`,displayName: '<Your Display Name>',newApiId: `<new_api_id>`,});
apiId
: String. Your componentapiId
.apiIdPlural
: Optional - String. The component's pluralapiId
. This is used for lists.description
: Optional - String. Your component description.displayName
: Optional - String. Display name that is used to render the component in the webapp.newApiId
: Optional - String. NewapiId
.
#Delete component
client.deleteComponent({apiId: '<api_id>',});
apiId
: String. TheapiId
of the component you wish to delete.
#Create component field
client.createComponentField({apiId: '<api_id>',componentApiId: `<component_api_id>`,description: `<your_component_field_description>`,displayName: '<Your Display Name>',formExtension: `<form_extension>`,formRenderer: `<form_renderer>`,isList: `<boolean>`,isRequired: `<boolean>`,parentApiId: `<parent_api_id>`,position: `<int>`,tableExtension: `<table_extension>`,tableRenderer: `<table_renderer>`,visibility: `<visibility_types>`,});
apiId
: String. Your component fieldapiId
.componentApiId
: String. Your componentapiId
.description
: Optional - String. Your component field description.displayName
: String. Display name that is used to render the component field in the webapp.formExtension
: Optional - String.formRenderer
: Optional - String.isList
: Optional - Boolean.isRequired
: Optional - Boolean. If true, the component field is required.parentApiId
: String. ParentapiId
.position
: Optional - Integer.tableExtension
: Optional - String.tableRenderer
: Optional - String.visibility
: Optional. Visibility types.
#Update component field
client.updateComponentField({apiId: '<api_id>',description: `<your_component_field_description>`,displayName: '<Your Display Name>',isList: `<boolean>`,isRequired: `<boolean>`,newApiId: `<new_api_id>`,parentApiId: `<parent_api_id>`,visibility: `<visibility_types>`,});
apiId
: String. Your component fieldapiId
.description
: Optional - String. Your component field description.displayName
: Optional - String. Display name that is used to render the component field in the webapp.isList
: Optional - Boolean.isRequired
: Optional - Boolean. If true, the component field is required.newApiId
: Optional - String. NewapiId
.parentApiId
: String. ParentapiId
.visibility
: Optional. Visibility types.
#Delete component field
Use deleteField method.
#Specific examples
#Add a field to a component
client.createSimpleField({parentApiId: '<parent_api_id>',type: SimpleFieldType.String,apiId: '<api_id>',displayName: '<Your Display Name>',});
#Create basic component field
client.createComponentField({parentApiId: '<parent_api_id>',apiId: '<api_id>',displayName: '<Your Display Name>',description: '<Your description>',componentApiId: '<component_api_id>',});
#Create a component union field
client.createComponentUnionField({parentApiId: '<parent_api_id>',apiId: '<api_id>',displayName: '<Your Display Name>',componentApiIds: ['<component_api_id_1>', '<component_api_id_2>'],});
#Remove VideoBlock from a component union field
client.createComponentUnionField({parentApiId: '<parent_api_id>',apiId: '<api_id>',displayName: '<Your Display Name>',componentApiIds: ['<contributor_component_api_id>','<videoblock_component_api_id>',],});
#Remote sources
#Create GraphQL remote sources
client.createGraphQlRemoteSource({debugEnabled: `<boolean>`,description: `<your_description>`,displayName: `<Your Display Name>`,headers: `<json>`,introspectionHeaders: `<json>`,introspectionMethod: `<get_or_post>`,introspectionUrl: `<introspection_url>`,prefix: `<prefix>`,remoteTypeDefinitions: {sdl: `<CreateRemoteTypeDefinition>`,},url: `<url>`,});
debugEnabled
: Optional - Boolean.description
: Optional - String. GraphQL remote source description.displayName
: String. Display name that is used to render the GraphQL remote source in the webapp.headers
: Optional - JSON.introspectionHeaders
: Optional - JSON. HTTP headers that will be used for introspection.introspectionMethod
:GraphQlRemoteSourceIntrospectionMethod
. HTTP method that will be used for introspection.introspectionUrl
: Optional - String. Specific URL that will be used for introspection if the introspection is available on a URL other than the regular URL. Can be ignored if the introspection URL is the same as the URL of the remote source.prefix
: String.remoteTypeDefinitions
: Optional.CreateRemoteTypeDefinition
. Custom GraphQL input types that can be used as arguments in remote fields that belong to thisremoteSource
.sdl
: String
url
: String
#Update GraphQL remote sources
client.createGraphQlRemoteSource({debugEnabled: `<boolean>`,description: `<your_description>`,displayName: `<Your Display Name>`,headers: `<json>`,introspectionHeaders: `<json>`,introspectionMethod: `<get_or_post>`,introspectionUrl: `<introspection_url>`,prefix: `<prefix>`,remoteTypeDefinitionsToUpsert: {remoteTypeDefinitionsToCreate: `<remote_type_definitions_to_create>`,remoteTypeDefinitionsToDelete: `<remote_type_definitions_to_delete>`,remoteTypeDefinitionsToUpdate: `<remote_type_definitions_to_update>`,},url: `<url>`,});
debugEnabled
: Optional - Boolean.description
: Optional - String. GraphQL remote source description.displayName
: Optional - String. Display name that is used to render the GraphQL remote source in the webapp.headers
: Optional - JSON.introspectionHeaders
: Optional - JSON. HTTP headers that will be used for introspection.introspectionMethod
:GraphQlRemoteSourceIntrospectionMethod
. HTTP method that will be used for introspection.introspectionUrl
: Optional - String. Specific URL that will be used for introspection if the introspection is available on a URL other than the regular URL. Can be ignored if the introspection URL is the same as the URL of the remote source.prefix
: String. Unique prefix that will be prepended to all of the remote types. This value cannot be changed.remoteTypeDefinitionsToUpsert
: Optional.CreateRemoteTypeDefinition
. Custom GraphQL input types that can be used as arguments in remote fields that belong to thisremoteSource
.remoteTypeDefinitionsToCreate
: Optional Remote type definitions to create.remoteTypeDefinitionsToDelete
: Optional Remote type definitions to delete.remoteTypeDefinitionsToUpdate
: Optional Remote type definitions to update.
url
: Optional - String
#Create REST remote sources
client.createRestRemoteSource({debugEnabled: `<boolean>`,description: `<your_description>`,displayName: `<Your Display Name>`,headers: `<json>`,prefix: `<prefix>`,remoteTypeDefinitions: {sdl: `<CreateRemoteTypeDefinition>`,},url: `<url>`,});
debugEnabled
: Optional - Boolean.description
: Optional - String. REST remote source description.displayName
: String. Display name that is used to render the REST remote source in the webapp.headers
: Optional - JSON.prefix
: String. Unique prefix that will be prepended to all of the remote types. This value cannot be changed.remoteTypeDefinitions
: Optional.CreateRemoteTypeDefinition
. Remote type definitions that the remote source supports, or input types that can be used by any remote field of this remote source.sdl
: String
url
: String
#Update REST remote sources
client.updateRestRemoteSource({debugEnabled: `<boolean>`,description: `<your_description>`,displayName: `<Your Display Name>`,headers: `<json>`,prefix: `<prefix>`,remoteTypeDefinitionsToUpsert: {remoteTypeDefinitionsToCreate: `<remote_type_definitions_to_create>`,remoteTypeDefinitionsToDelete: `<remote_type_definitions_to_delete>`,remoteTypeDefinitionsToUpdate: `<remote_type_definitions_to_update>`,},url: `<url>`,});
debugEnabled
: Optional - Boolean.description
: Optional - String. REST remote source description.displayName
: String. Display name that is used to render the REST remote source in the webapp.headers
: Optional - JSON.prefix
: String. Unique prefix that will be prepended to all of the remote types. This value cannot be changed.remoteTypeDefinitionsToUpsert
: Optional.CreateRemoteTypeDefinition
. Remote type definitions that the remote source supports, or input types that can be used by any remote field of this remote source.remoteTypeDefinitionsToCreate
: Optional Remote type definitions to create.remoteTypeDefinitionsToDelete
: Optional Remote type definitions to delete.remoteTypeDefinitionsToUpdate
: Optional Remote type definitions to update.
url
: String
#Delete remote source
client.deleteRemoteSource({prefix: `<prefix>`,});
prefix
: String. The prefix of the remote source you wish to delete.
#Custom sidebar element
#Create custom sidebar element
client.createCustomSidebarElement({appApiId: `<your_app_id>`,appElementApiId: `<your_app_element_id>`,config: `<JSON>`,description: `<your_description>`,displayName: `<Your Display Name>`,modelApiId: `<model_api_id>`,});
appApiId
: String. Your App'sapiId
.appElementApiId
: String.apiId
of the App element to create custom sidebar element with.config
: Optional - JSON. JSON metadata associated with the sidebar element.description
: Optional - String. Description for the sidebar element.displayName
: String. Display name that is used to render the sidebar element in the webapp.modelApiId
: String.apiId
of the model associated with the custom sidebar element.
#Delete custom sidebar element
client.deleteCustomSidebarElement({appApiId: `<your_app_id>`,appElementApiId: `<your_app_element_id>`,modelApiId: `<model_api_id>`,});
appApiId
: String. Your App'sapiId
.appElementApiId
: String.apiId
of the App element associated with the custom sidebar element.modelApiId
: String.apiId
of the model associated with the custom sidebar element.
#Enumerations
#Create enumeration
client.createEnumeration({apiId: `<your_app_id>`,description: `<description>`,displayName: `<display_name>`,values: {apiId: `<api_id>`,displayName: `<display_name>`,},});
apiId
: String. EnumerationapiId
.description
: Optional - String. Enumeration description.displayName
: String. Display name that is used to render the enumeration in the webapp.values
:CreateEnumerationValue
. Enumeration values.apiId
: String. Enumeration valueapiId
.displayName
: String. Display name that is used to render the enumeration value in the webapp.
#Update enumeration
client.updateEnumeration({apiId: `<your_app_id>`,description: `<description>`,displayName: `<display_name>`,newApiId: `<new_api_id>`,valuesToCreate: {apiId: `<api_id>`,displayName: `<display_name>`,},valuesToDelete: [`<value_1>`, `<value_2>`],valuesToUpdate: {apiId: `<api_id>`,displayName: `<display_name>`,newApiId: `<new_api_id>`,},});
-
apiId
: String. EnumerationapiId
. -
description
: Optional - String. Enumeration description. -
displayName
: String. Display name that is used to render the enumeration in the webapp. -
newApiId
: Optional - String. NewapiId
. -
valuesToCreate
: Optional - String.createEnumerationValue
. Enumeration values to be created.apiId
: String. Enumeration valueapiId
.displayName
: String. Display name that is used to render the enumeration value in the webapp.
-
valuesToDelete
: Optional - String. Values to delete. -
valuesToUpdate
: Optional - String.updateEnumerationValue
. Enumeration values to be updated..apiId
: String. Enumeration valueapiId
.displayName
: Optional - String. Display name that is used to render the enumeration value in the webapp.newApiId
: Optional - String. NewapiId
.
#Delete enumeration
client.deleteEnumeration({apiId: `<your_app_id>`,});
apiId
: String.apiId
of the enumeration you wish to delete.
#Create enumerable field
client.createEnumerableField({apiId: 'enumField',description: 'Description',displayName: 'Enum Field',parentApiId: 'Post',enumerationApiId: 'Variation',});
apiId
: String. Enumerable fieldapiId
.description
: Optional - String. Enumerable field description.displayName
: String. Display name that is used to render the enumerable field in the webapp.parentApiId
: String. ParentapiId
.enumerationApiId
: String. EnumerationapiId
.
#Update enumerable field
client.updateEnumerableField({apiId: 'enumField', // requiredparentApiId: 'Test', // requireddescription: 'Description',displayName: 'Enum Field Update',initialValue: 'Value 1',isHidden: false,isList: false,isLocalized: false,isRequired: false,isTitle: false,isUnique: false,migrationValue: 'Value 1',position: 0,visibility: 'READ_WRITE',});
apiId
: Required - String. Enumerable fieldapiId
.parentApiId
: Required - String. ParentapiId
.description
: Optional - String. Enumerable field description.displayName
: String. Display name that is used to render the enumerable field in the webapp.initialValue
: String. Initial value of the field.isHidden
: Optional - Boolean. Makes the field hidden if true.isList
: Optional - Boolean.isLocalized
: Optional - Boolean.isRequired
: Optional - Boolean. Makes the field required if true.isTitle
: Optional - Boolean.isUnique
: Optional - Boolean.migrationValue
: String. Migration value of the enumerable field.position
: Optional - Integer.visibility
: Field visibility, for exampleVisibilityTypes.ReadWrite
.
#Delete enumerable field
Use deleteField method.
#Locales
#Create locale
client.createLocale({apiId: `<your_app_id>`,description: `<description>`,displayName: `<Display Name>`,});
apiId
: String. LocaleapiId
.description
: Optional - String. Locale description.displayName
: String. Display name associated with the locale.
#Update locale
client.updateLocale({apiId: `<your_app_id>`,description: `<description>`,displayName: `<Display Name>`,isDefault: `<boolean>`,newApiId: `<new_api_id>`,});
apiId
: String. LocaleapiId
.description
: Optional - String. Locale description.displayName
: Optional - String. Display name associated with the locale.isDefault
: Optional - Boolean. If true, this is the default locale.newApiId
: Optional - String. NewapiId
.
#Delete locale
client.deleteLocale({apiId: `<your_app_id>`,force: `<boolean>`,});
apiId
: String. LocaleapiId
.force
: Optional - Boolean. If true, deletion is forced.
#Stages
#Create stage
client.createStage({apiId: `<your_app_id>`,color: `<color>`,description: `<description>`,displayName: `<Display Name>`,position: `<int>`,});
apiId
: String. Your stageapiId
.color
: Select fromColorPalette
.description
: Optional - String. Your stage description.displayName
: String. Display name associated with the stage.position
: Optional - Integer.
#Update stage
client.updateStage({apiId: `<your_app_id>`,color: `<color>`,description: `<description>`,displayName: `<Display Name>`,newApiId: `<new_api_id>`,position: `<int>`,});
apiId
: String. Your stageapiId
.color
: Optional. Select fromColorPalette
.description
: Optional - String. Your stage description.display
: Optional - String. Display name associated with the stage.newApiId
: Optional - String. NewapiId
.position
: Optional - Integer.
#Delete stage
client.deleteStage({apiId: `<your_app_id>`,});
apiId
: String.apiId
of the stage you wish to delete.