Content#

Get the data for a specific content given its path.

Get Content#

Query options function#

Use the getContentQuery function to get the query options object for fetching the content at a given path.

Hook#

Use the useGetContent hook to get the content at a given path.

Parameters#

  • path: string

    • Required: Yes

  • version: string

    • Required: No

  • page: number

    • Required: No

  • fullObjects: boolean

    • Required: No

  • expand: string[]

    • Required: No

Add Content#

Mutation options function#

Use the createContentMutation function to get the mutation for adding content at a given path.

Hook#

Use the useCreateContent hook to add content at a given path.

Parameters#

  • path: string

    • Required: Yes

  • data: object

    • Required: Yes

    • It can have the following fields:

      @id: string

      • Required: No

      @static_behaviors: unknown

      • Required: No

      @type: string

      • Required: Yes

      allow_discussion: boolean

      • Required: No

      blocks: unknown

      • Required: No

      blocks_layout: string[]

      • Required: No

      contributors: string[]

      • Required: No

      creators: string[]

      • Required: No

      description: string

      • Required: No

      effective: string

      • Required: No

      exclude_from_nav: boolean

      • Required: No

      expires: string

      • Required: No

      id: string

      • Required: No

      language: string

      • Required: No

      preview_caption: string

      • Required: No

      preview_image: object

      • Required: No

      • It has the following fields:

        • content-type: string

          • Required: Yes

        • data: string

          • Required: Yes

        • encoding: string

          • Required: Yes

        • filename: string

          • Required: Yes

      relatedItems: array (RelatedObject)

      • Required: No

      rights: string

      • Required: No

      title: string

      • Required: Yes

      versioning_enabled: boolean

      • Required: No

Update Content#

Mutation function#

Use the updateContentMutation function to get the mutation for updating content at a given path.

Hook#

Use the useUpdateContent hook to update content at a given path.

Parameters#

  • path: string

    • Required: Yes

  • data: object

    • Required: Yes

    • It can have the following fields:

      allow_discussion: boolean

      • Required: No

      blocks: unknown

      • Required: No

      blocks_layout: string[]

      • Required: No

      contributors: string[]

      • Required: No

      creators: string[]

      • Required: No

      description: string

      • Required: No

      effective: string

      • Required: No

      exclude_from_nav: boolean

      • Required: No

      expires: string

      • Required: No

      id: string

      • Required: No

      preview_caption: string

      • Required: No

      preview_image: object

      • Required: No

      • It has the following fields:

        • content-type: string

          • Required: Yes

        • data: string

          • Required: Yes

        • encoding: string

          • Required: Yes

        • filename: string

          • Required: Yes

      relatedItems: array (RelatedObject)

      • Required: No

      rights: string

      • Required: No

      table_of_contents: boolean

      • Required: No

      title: string

      • Required: No

      versioning_enabled: boolean

      • Required: No

Delete Content#

Mutation function#

Use the deleteContentMutation function to get the mutation for deleting content at a given path.

Hook#

Use the useDeleteContent hook to delete content at a given path.

Parameters#

  • path: string

    • Required: Yes


Detailed types reference#

RelatedObject#

@id: string

  • Required: Yes

@type: string

  • Required: Yes

CreationDate: string

  • Required: Yes

Creator: string

  • Required: Yes

Date: string

  • Required: Yes

Description: string

  • Required: Yes

EffectiveDate: string

  • Required: Yes

ExpirationDate: string

  • Required: Yes

ModificationDate: string

  • Required: Yes

Subject: unknown[]

  • Required: Yes

Title: string

  • Required: Yes

Type: string

  • Required: Yes

UID: string

  • Required: Yes

author_name: string

  • Required: Yes

cmf_uid: string

  • Required: Yes

commentators: unknown[]

  • Required: Yes

created: string

  • Required: Yes

description: string

  • Required: Yes

effective: string

  • Required: Yes

end: string

  • Required: Yes

exclude_from_nav: boolean

  • Required: Yes

expires: string

  • Required: Yes

getIcon: string

  • Required: Yes

getId: string

  • Required: Yes

getObjSize: string

  • Required: Yes

getPath: string

  • Required: Yes

getRemoteUrl: string

  • Required: Yes

getURL: string

  • Required: Yes

hasPreviewImage: string

  • Required: Yes

head_title: string

  • Required: Yes

id: string

  • Required: Yes

image_field: string

  • Required: Yes

image_scales: string

  • Required: Yes

in_response_to: string

  • Required: Yes

is_folderish: boolean

  • Required: Yes

last_comment_date: string

  • Required: Yes

listCreators: string[]

  • Required: Yes

location: string

  • Required: Yes

mime_type: string

  • Required: Yes

modified: string

  • Required: Yes

nav_title: string

  • Required: Yes

portal_type: string

  • Required: Yes

review_state: string

  • Required: Yes

start: string

  • Required: Yes

sync_uid: string

  • Required: Yes

title: string

  • Required: Yes

total_comments: number

  • Required: Yes