Rest API
Deny several content library tasks
POST
/api/v1/wiki/tasks/bulk-deny
const url = 'https://api.unless.com/api/v1/wiki/tasks/bulk-deny';const options = { method: 'POST', headers: { 'x-api-key': 'example', 'x-user-email': 'example', 'x-account-id': 'example', 'x-website-id': 'example', 'Content-Type': 'application/json' }, body: '{"taskIds":["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"]}'};
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://api.unless.com/api/v1/wiki/tasks/bulk-deny \ --header 'Content-Type: application/json' \ --header 'x-account-id: example' \ --header 'x-api-key: example' \ --header 'x-user-email: example' \ --header 'x-website-id: example' \ --data '{ "taskIds": [ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ] }'Discard every unresolved change across a list of content library suggestion tasks.
Notes
- Runs synchronously and reports how many tasks it processed
- A task id that is not a content library suggestion is skipped rather than rejected, so
tasksDeniedcan be lower than the number of ids you sent
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”x-api-key
required
string
Your API key from account settings.
x-user-email
required
string
The email address of your user.
x-account-id
required
string
The ID of your account. You can find this in the account settings.
x-website-id
required
string
The ID of the workspace you want to use.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
taskIds
required
Array<string>
Example
{ "taskIds": [ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ]}Responses
Section titled “Responses”The tasks were processed.
Media typeapplication/json
object
tasksDenied
number
Example generated
{ "tasksDenied": 1}Unauthorized - invalid API key.
Bad request - taskIds was missing or empty.