List the review queues of the project. The default queue comes first. The list is paginated. To get the item counts of a queue, use GET /queue/{id}.
declare(strict_types=1);
require 'vendor/autoload.php';
use ModerationApi;
$sdk = ModerationApi\ModerationApi::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$responses = $sdk->queue->list(
page: 1,
pageSize: 20
);
foreach ($responses as $response) {
if ($response->statusCode === 200) {
// handle response
}
}
| Parameter |
Type |
Required |
Description |
page |
?int |
➖ |
N/A |
pageSize |
?int |
➖ |
N/A |
projectId |
?string |
➖ |
The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. |
?Operations\ListQueuesResponse
| Error Type |
Status Code |
Content Type |
| Errors\BadRequestError |
400 |
application/json |
| Errors\AuthenticationError |
401 |
application/json |
| Errors\PermissionDeniedError |
403 |
application/json |
| Errors\NotFoundError |
404 |
application/json |
| Errors\RateLimitError |
429 |
application/json |
| Errors\InternalServerError |
500 |
application/json |
| Errors\APIException |
4XX, 5XX |
*/* |
Get a review queue with its item counts. The counts use the filters and the date window of the queue, the same as the dashboard.
declare(strict_types=1);
require 'vendor/autoload.php';
use ModerationApi;
$sdk = ModerationApi\ModerationApi::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$response = $sdk->queue->retrieve(
id: '<id>'
);
if ($response->object !== null) {
// handle response
}
| Parameter |
Type |
Required |
Description |
id |
string |
✔️ |
The queue ID. |
projectId |
?string |
➖ |
The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. |
?Operations\GetQueueResponse
| Error Type |
Status Code |
Content Type |
| Errors\BadRequestError |
400 |
application/json |
| Errors\AuthenticationError |
401 |
application/json |
| Errors\PermissionDeniedError |
403 |
application/json |
| Errors\NotFoundError |
404 |
application/json |
| Errors\RateLimitError |
429 |
application/json |
| Errors\InternalServerError |
500 |
application/json |
| Errors\APIException |
4XX, 5XX |
*/* |
Get review statistics of a queue for a period: resolved and pending items, the top reviewers and the resolved items per day.
declare(strict_types=1);
require 'vendor/autoload.php';
use ModerationApi;
$sdk = ModerationApi\ModerationApi::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$response = $sdk->queue->getStats(
id: '<id>',
withinDays: 30
);
if ($response->object !== null) {
// handle response
}
| Parameter |
Type |
Required |
Description |
id |
string |
✔️ |
The queue ID. |
withinDays |
?int |
➖ |
N/A |
projectId |
?string |
➖ |
The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. |
?Operations\GetQueueStatsResponse
| Error Type |
Status Code |
Content Type |
| Errors\BadRequestError |
400 |
application/json |
| Errors\AuthenticationError |
401 |
application/json |
| Errors\PermissionDeniedError |
403 |
application/json |
| Errors\NotFoundError |
404 |
application/json |
| Errors\RateLimitError |
429 |
application/json |
| Errors\InternalServerError |
500 |
application/json |
| Errors\APIException |
4XX, 5XX |
*/* |