Skip to content

Rest API

Get quality control reports

GET
/api/v1/ai/quality/control/report

Without reportId, list every quality control report for the website, newest first. With reportId, return that report’s per-question results.

Use cases

  • Progress polling: After starting a report, poll the list until processed equals totalQuestionsInReport
  • Account investigation: Read grade over time to see whether answer quality is improving

Notes

  • A report only appears in the list once its first question has been scored, so a run you just started is briefly absent
  • Questions that fail to score are dropped rather than retried, so processed can stop short of totalQuestionsInReport permanently. Treat a report whose timestamp has not moved for a few minutes as finished
  • grade is out of 10, and a question counts towards passed at 6 or above
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.

reportId
string

Return the per-question results for this report instead of the report list.

The report list, or the per-question results when reportId is given.

object
data
Array
One of:

One quality control run, aggregated over its per-question records.

object
accountId
string
websiteId
string
reportId

Unique identifier for this run, as returned when it was started.

string
timestamp

Unix timestamp (ms) of the most recently scored question in this run.

number
grade

Average grade out of 10 across the questions scored so far.

number
totalQuestionsInReport

How many control questions the run was started with.

number
passed

How many scored questions graded 6 or above.

number
processed

How many questions have been scored. Can stop below totalQuestionsInReport, since failed questions are dropped rather than retried.

number
Example
{
"data": [
{
"accountId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"websiteId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"reportId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"timestamp": 1641081900000,
"grade": 8,
"totalQuestionsInReport": 12,
"passed": 10,
"processed": 12
}
]
}

Bad request - missing websiteId.

Unauthorized - invalid API key.