Skip to content
Niu DocsNiu 牛元文档
Dashboard控制台

Export filtered customer-safe request metadata as CSV

Generated from the checked-in source. Do not edit this reference by hand.

GET /api/v1/organizations/{organization}/projects/{project}/requests/export

Requires workspace read access. Uses one database statement for the filtered range, newest first by default, with the requested sort applied to the whole range. Excludes internal identifiers, payloads, credentials and Provider costs. Unknown values remain empty, exact quantities remain decimal text, and formula-like text is neutralized. Pagination parameters are rejected; more than 10000 matched requests fails without a partial download.

Operation: exportWorkspaceRequests.

Use the credential and permission scope described above. Each object below is an alternative; schemes within one object are required together.

JSON
[
{
"adminBearerAuth": []
}
]

Set NIU_ORIGIN to your installation origin (without /v1). Replace path, query and header placeholders with the required values. Query examples use curl 7.87 or newer to encode values with --url-query. Use the credential scope described above; a bearer token must have the authority required by this operation.

Shell
curl --fail-with-body -X GET "$NIU_ORIGIN/api/v1/organizations/{organization}/projects/{project}/requests/export" \
-H "Authorization: Bearer $NIU_ADMIN_TOKEN"

Location: query. Optional. Recorded delivery HTTP status, or unknown when absent; independent of Provider execution.

JSON
{
"type": "string",
"pattern": "^(unknown|[1-5][0-9]{2})$"
}

Location: query. Optional. Full-range order. Known latency/token values precede unknown values; time and ID break ties. Live traversal is not a cross-page snapshot.

JSON
{
"type": "string",
"enum": [
"time_desc",
"time_asc",
"latency_desc",
"input_desc",
"output_desc"
],
"default": "time_desc"
}

Location: path. Required.

JSON
{
"type": "string",
"format": "uuid"
}

Location: path. Required.

JSON
{
"type": "string",
"format": "uuid"
}

Location: query. Optional.

JSON
{
"type": "integer",
"format": "int64"
}

Location: query. Optional.

JSON
{
"type": "integer",
"format": "int64"
}

Location: query. Optional.

JSON
{
"type": "string",
"minLength": 1,
"maxLength": 200
}

Location: query. Optional. Restrict to one operation within the authorized workspace.

JSON
{
"type": "string",
"format": "uuid"
}

Location: query. Optional.

JSON
{
"type": "string",
"format": "uuid"
}

Location: query. Optional. recorded_failure selects persisted failure observations, including SSE errors under HTTP 200; delivery_failed retains HTTP-error semantics.

JSON
{
"type": "string",
"enum": [
"not_sent",
"may_have_executed",
"confirmed_completed",
"confirmed_not_executed",
"output_withheld",
"delivery_failed",
"recorded_failure"
]
}

No request body is declared.

CSV attachment with no-store caching and meaningful customer fields only. Appended Cached input tokens and Reasoning output tokens columns contain exact reported subset counts; unknown counts are blank and explicit zero remains zero. Category counts do not establish billing rates or savings.

Response headers:

JSON
{
"Cache-Control": {
"schema": {
"type": "string",
"const": "no-store"
}
},
"Content-Disposition": {
"schema": {
"type": "string"
}
}
}

Content type: text/csv.

JSON
{
"type": "string"
}

Invalid filters or pagination parameters.

Missing, invalid or inference-only credentials.

Administration credential cannot read this workspace.

More than 10000 requests match; narrow the filters.

Requires workspace read access. Uses one database statement for the filtered range, newest first by default, with the requested sort applied to the whole range. Excludes internal identifiers, payloads, credentials and Provider costs. Unknown values remain empty, exact quantities remain decimal text, and formula-like text is neutralized. Pagination parameters are rejected; more than 10000 matched requests fails without a partial download.