Export corrections
const url = 'https://example.com/v1/corrections/export?format=csv&agentId=example&from=experts&madeBy=me&scopeKind=tenant';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/v1/corrections/export?format=csv&agentId=example&from=experts&madeBy=me&scopeKind=tenant' \ --header 'Authorization: Bearer <token>'Every correction of an agent the list’s filters match, streamed as CSV (format=csv, the default: RFC 4180, UTF-8, a header row) or JSON lines (format=jsonl: one correction per line, as the list sends it). Each comes only when the caller may read its project, and a project scope the caller can’t read is a 403 before anything is sent. The run’s own text isn’t exported, only its id. A CSV field that starts with =, +, -, @, a tab or a carriage return gets a leading ', so a spreadsheet doesn’t run it. Recorded in the audit log: corrections-export-started before the first row (when it can’t be written, a 500 and nothing is sent), and corrections-exported when the stream ends, with the rows sent and succeeded or failed.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”The corrections, as CSV or JSON lines (by format).
Examplegenerated
exampleMalformed query parameter, no agentId, or a limit or cursor.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Missing / malformed / expired / revoked bearer token.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}permission-denied: a project scope the caller can’t read.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}rate-limit-exceeded with details.limit: "api-requests", on a runtime that sets workspace limits (Kindgi Cloud): this workspace’s limit on API requests a minute is reached, so the request wasn’t run; Retry-After says when to send it again.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”persistence-error: the export couldn’t be recorded, so nothing was sent.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}The database was too busy to answer in time (database-busy), or the authorization store couldn’t be reached (authz-backend-unavailable); Retry-After (whole seconds) says when to try again.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}