Metadata authoring

The Content Services GraphQL API supports authoring new metadata in the Content Engine.

Authoring new metadata involves adding new properties and classes to the repository. The queries and mutations for these types of operations are usually named with an “adm” prefix, setting them apart as an “administration” type of operation.

The following queries deal with these types of objects:

  • choiceList(…)
  • admPropertyTemplate(…)
  • admClassDefinition(…)

The choiceList query is an existing query. Choice Lists straddle the fence between runtime metadata and the authoring of metadata. At runtime you want to discover the possible values that can be assigned to a property that is associated with a Choice List. When you are authoring metadata, you can create a choice list and assign it to a Property Template or Property Definition (when a property is added to a particular class definition).

At run time, you can discover metadata by using Class Descriptions and Property Descriptions, which are represented in the schema in previous versions. There is also support for obtaining Property Templates and Class Definitions, which are used when you are authoring new metadata.

The following mutations deal with these types of objects. You must have administrative privileges to the object store to successfully run these mutations.
  • admCreateChoiceList(...)
  • admUpdateChoiceList(…)
  • admDeleteChoiceList(…)
  • admCreatePropertyTemplate(…)
  • admUpdatePropertyTemplate(…)
  • admDeletePropertyTemplate(…)
  • admCreateClassDefinition(…)
  • admUpdateClassDefinition(…)
  • admDeleteClassDefinition(…)

    These queries, updates and delete mutations require an identifier argument to identify the existing choice list, property template or class definition. The following identifiers are supported:

    • The ID (GUID) of any of these objects.
    • A choice list identifier can also be the Display Name of the choice list.
    • A property template identifier can also be the Symbolic Name of the property. Symbolic names of property templates are usually unique but are not required to be so. By referencing a property template by its symbolic name the duplicate templates with that name can be identified with an error message.
    • A class definition identifier can also be the Symbolic Name of the class.
    • These types of identifiers can also be used when referenced from another object – for example, the superclass of a subclass definition or the property template that is associated with a property definition.
    • An exception to these identifiers is when an object is being created in a batch of mutations and the object is referenced from a mutation later in the batch. An ID (GUID) must always be used when you are referencing an object being created in the same batch. For example, when you are creating a property template and adding a property definition that is associated with that template later in the batch, the ID must be used to reference the property template.
    Examples of using these queries and mutations are located in later sections.