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