Check auto-package rules
POST
/api/content/management/packages/auto-package/check
const url = 'https://example.com/api/content/management/packages/auto-package/check';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"repositoryId":"example","type":"example","categoryIds":["example"],"operation":"create"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/content/management/packages/auto-package/check \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "repositoryId": "example", "type": "example", "categoryIds": [ "example" ], "operation": "create" }'Standalone pre-check for auto-package rules. Determines whether saving an item would require packaging.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Media typeapplication/json
object
repositoryId
required
Repository configuration ID
string
type
required
Content type being saved
string
categoryIds
Category IDs assigned to the item
Array<string>
operation
Operation being checked
string
Example
createResponses
Section titled “Responses”Auto-package check result
Media typeapplication/json
object
required
required
Whether an auto-package rule applies
boolean
message
Explanation when a rule applies
string
packageName
Suggested or target package name
string
ruleId
ID of the matched auto-package rule
string
ruleName
Name of the matched auto-package rule
string
Example
{ "required": false}RepositoryId and type are required
Media typeapplication/json
object
error
required
Indicates an error occurred
boolean
message
required
Error message describing what went wrong
string
Example
{ "error": true, "message": "Item not found"}Repository not found
Media typeapplication/json
object
error
required
Indicates an error occurred
boolean
message
required
Error message describing what went wrong
string
Example
{ "error": true, "message": "Item not found"}