Directus / @directus/sdk / rest / promoteContentVersion
Function: promoteContentVersion() ​
promoteContentVersion<
Schema
,Collection
,Item
>(id
,mainHash
,fields
?):RestCommand
<string
|number
,Schema
>
Defined in: rest/commands/utils/versions.ts:69
Promote an existing Content Version to become the new main version of the item.
Type Parameters ​
• Schema
• Collection extends string
| number
| symbol
• Item = UnpackList
<Schema
[Collection
]>
Parameters ​
id ​
DirectusVersion
<Schema
>["id"
]
Primary key of the version.
mainHash ​
string
The current hash of the main version of the item (obtained from the compare
endpoint).
fields? ​
keyof UnpackList
<Item
>[]
Optional array of field names of which the values are to be promoted. By default, all fields are selected.
Returns ​
RestCommand
<string
| number
, Schema
>
The primary key of the promoted item.