Update a Type

put

/content/management/api/v1.1/types/{name}

Updates a type with the given payload.
If any fields of type are deleted or flagged as inherit from master in type update, all the items of the type will be updated and the deleted field and items data for the deleted fields will be archived.
Also, publish, copy, import of items of the type will not be allowed during type update while deleting fields or flagging the inherit from master field. If publish or import or copy of items of the type is underway then type update with fields delete or flagging the inherit from master will be blocked.
The property: 'caas-translations.file.inheritFromMaster' of DigitalAsset type cannot be changed if the type has assets.

Request

Supported Media Types
Path Parameters
  • Type name identifier is case-sensitive and any special characters must be encoded
Query Parameters
Header Parameters
Body ()
Updates a type with the given information in the payload. The fields createdBy, createdDate, updatedBy, updatedDate and links will be ignored even if given in the payload.
Root Schema : Type
Type: object
AggregatedType
Show Source
Nested Schema : allowedActions
Type: array
allowedActions on Type.
Show Source
  • Allowed Values: [ "preview", "read", "write", "update", "delete" ]
Nested Schema : allowedFileTypes
Type: array
Allowed list of file extensions supported by the type. It is a required property in the get response. It is optional in post/put request and defaults to [ContentItem] if the typeCategory is ContentType and defaults to empty if the typeCategory is DigitalAssetType .
Show Source
Nested Schema : ItemSubResourceListTypeField
Type: object
Item SubResource.
Show Source
Nested Schema : connectorInfos
Type: array
connectorInfos on Type.
Show Source
Nested Schema : date
Type: object
date
Show Source
Nested Schema : fields
Type: array
Fields used in the type.
Show Source
Nested Schema : ItemSubResourceListInplacePreview
Type: object
Item SubResource.
Show Source
Nested Schema : ItemSubResourceListLayoutMapping
Type: object
Item SubResource.
Show Source
Nested Schema : properties
Type: object
Additional Properties Allowed
Show Source
Type specific properties.
Nested Schema : ItemSubResourceTypeRelationships
Type: object
Item SubResource.
Show Source
Nested Schema : ItemSubResourceListRequiredTaxonomy
Type: object
Item SubResource.
Show Source
Nested Schema : data
Type: array
Show Source
Nested Schema : TypeField
Type: object
FieldInAggrType.
Show Source
Nested Schema : defaultValue
Type: object
defaultValue for field.
Nested Schema : properties
Type: object
Additional Properties Allowed
Show Source
Field specific properties. The field publishingDependency is specific for media and reference.
Example:
{caas-translation: {inheritFromMaster: false}, publishingDependency: optional}
Nested Schema : settings
Type: object
Additional Properties Allowed
Show Source
Field specific settings.
Nested Schema : additionalProperties
Type: object
Nested Schema : additionalProperties
Type: object
Nested Schema : ConnectorInfo
Type: object
ConnectorInfo
Show Source
Nested Schema : data
Type: array
Show Source
Nested Schema : InplacePreview
Type: object
InplacePreview
Show Source
Nested Schema : data
Type: array
Show Source
Nested Schema : LayoutMapping
Type: object
LayoutMapping
Show Source
Nested Schema : formats
Type: object
Additional Properties Allowed
Show Source
layout formats.
Nested Schema : additionalProperties
Type: object
Nested Schema : TypeRelationships
Type: object
Type Relationships
Show Source
Nested Schema : references
Type: array
Unique Items Required: true
Reference type names/ids
Show Source
Nested Schema : TypeReferences
Type: object
Type References bean
Show Source
Nested Schema : data
Type: array
Show Source
Nested Schema : RequiredTaxonomy
Type: object
Show Source
Nested Schema : defaultCategories
Type: array
Show Source
Nested Schema : Category
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : Type
Type: object
AggregatedType
Show Source
Nested Schema : allowedActions
Type: array
allowedActions on Type.
Show Source
  • Allowed Values: [ "preview", "read", "write", "update", "delete" ]
Nested Schema : allowedFileTypes
Type: array
Allowed list of file extensions supported by the type. It is a required property in the get response. It is optional in post/put request and defaults to [ContentItem] if the typeCategory is ContentType and defaults to empty if the typeCategory is DigitalAssetType .
Show Source
Nested Schema : ItemSubResourceListTypeField
Type: object
Item SubResource.
Show Source
Nested Schema : connectorInfos
Type: array
connectorInfos on Type.
Show Source
Nested Schema : date
Type: object
date
Show Source
Nested Schema : fields
Type: array
Fields used in the type.
Show Source
Nested Schema : ItemSubResourceListInplacePreview
Type: object
Item SubResource.
Show Source
Nested Schema : ItemSubResourceListLayoutMapping
Type: object
Item SubResource.
Show Source
Nested Schema : properties
Type: object
Additional Properties Allowed
Show Source
Type specific properties.
Nested Schema : ItemSubResourceTypeRelationships
Type: object
Item SubResource.
Show Source
Nested Schema : ItemSubResourceListRequiredTaxonomy
Type: object
Item SubResource.
Show Source
Nested Schema : data
Type: array
Show Source
Nested Schema : TypeField
Type: object
FieldInAggrType.
Show Source
Nested Schema : defaultValue
Type: object
defaultValue for field.
Nested Schema : properties
Type: object
Additional Properties Allowed
Show Source
Field specific properties. The field publishingDependency is specific for media and reference.
Example:
{caas-translation: {inheritFromMaster: false}, publishingDependency: optional}
Nested Schema : settings
Type: object
Additional Properties Allowed
Show Source
Field specific settings.
Nested Schema : additionalProperties
Type: object
Nested Schema : additionalProperties
Type: object
Nested Schema : ConnectorInfo
Type: object
ConnectorInfo
Show Source
Nested Schema : data
Type: array
Show Source
Nested Schema : InplacePreview
Type: object
InplacePreview
Show Source
Nested Schema : data
Type: array
Show Source
Nested Schema : LayoutMapping
Type: object
LayoutMapping
Show Source
Nested Schema : formats
Type: object
Additional Properties Allowed
Show Source
layout formats.
Nested Schema : additionalProperties
Type: object
Nested Schema : TypeRelationships
Type: object
Type Relationships
Show Source
Nested Schema : references
Type: array
Unique Items Required: true
Reference type names/ids
Show Source
Nested Schema : TypeReferences
Type: object
Type References bean
Show Source
Nested Schema : data
Type: array
Show Source
Nested Schema : RequiredTaxonomy
Type: object
Show Source
Nested Schema : defaultCategories
Type: array
Show Source
Nested Schema : Category
Type: object
Show Source

202 Response

Accepted.

400 Response

Bad request.

403 Response

Forbidden.

404 Response

Not found.

409 Response

Conflict.

500 Response

Internal server error.
Back to Top

Examples

The following example shows how to update a field by submitting a PUT request on a REST resource using cURL.

curl -X PUT -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' 'https://host:port/content/management/api/v1.1/types/{name}'

Example 1:

This updates existing type Book with a required field to an optional field. Replace payload with your own data.

/content/management/api/v1.1/types/Book

Request Body

{
    "name": "Book",
    "description": "Description of the book",
    "fields": [
    {
      "name": "volume",
      "description": "Number Field",
      "datatype": "number",
      "required": false,
      "valuecount": "single"
    }
    ]
    }

Example 2:

This updates an existing type typeName by adding a new optional field. Replace payload with your own data.

/content/management/api/v1.1/types/typeName

Request Body

{
        "name": "Book",
        "description": "some decription for Book",
        "typeCategory": "ContentType",
        "fields": [
          {
            "name": "volume",
            "description": "Text field",
            "datatype": "largetext",
            "required": false,
            "valuecount": "single"
          },
          {
            "name": "abstract",
            "description": "Text field",
            "datatype": "largetext",
            "required": false,
            "valuecount": "single"
          }
        ]
      }

Example 3:

This updates the publishingDependency from optional to required for an existing type with a reference. Replace payload with your own data.

/content/management/api/v1.1/types/referenceType-pubDep-required

Request Body

{
        "name": "referenceType-pubDep-required",
        "description": "referenceType-pubDep-required description",
        "fields": [
          {
            "name": "media",
            "apiName": "media",
            "datatype": "reference",
            "required": true,
            "valuecount": "single",
            "properties": {
              "publishingDependency": "optional"
            }
          }
        ]
      }

Example 4:

This updates an existing type typeName having content items by deleting fields. Replace payload with your own data. There will be no response body and response headers will contain status link of the async type update job.

/content/management/api/v1.1/types/typeName

Request Body

{
        "name": "typeName",
        "description": "some decription for typeName",
        "fields": [
          {
            "name": "volume",
            "description": "Text field",
            "datatype": "largetext",
            "required": false,
            "valuecount": "single"
          }
        ]
      }

Example 5:

This updates an existing Digital Asset type Book which doesn't have any assets by flipping the property 'properties.caas-translations.file.inheritFromMaster' from true to false thus converting type file shared to non-file shared type. Replace payload with your own data.

/content/management/api/v1.1/types/typeName

Request Payload

{
        "name": "Book",
        "description": "some decription for Book",
        "displayName": "BookDisplayName",
        "typeCategory": "DigitalAssetType",
        "fields": [
          {
            "name": "volume",
            "description": "Text field",
            "datatype": "largetext",
            "required": false,
            "valuecount": "single"
          }
        ],
        "caas-translations": {
          "description": {
            "inheritFromMaster": false,
            "note": "",
            "translate": true
          },
          "file": {
            "inheritFromMaster": false,
            "note": "",
            "translate": true
          },
          "name": {
            "inheritFromMaster": false,
            "note": "",
            "translate": true
          },
          "slug": {
            "inheritFromMaster": false,
            "note": "",
            "translate": true
          }
        }
      }

Request Headers

{
        "Content-Type": "application/json",
        "X-Requested-With": "XMLHttpRequest"
 }
Back to Top