Authentication
Account session. Session/administrative writes are not executed in the public Playground.
Endpoint
curl --request GET 'https://api.oneaster.ai/core/v1/requests/export' \ --header 'Authorization: Bearer '"$ONEASTER_SESSION_TOKEN"
Parameters
- from (query, Optional): {"type":"string","format":"date-time"} 包含起点;RFC3339 UTC,最多微秒精度。
- to (query, Optional): {"type":"string","format":"date-time"} 不包含终点;RFC3339 UTC,最多微秒精度。
- model (query, Optional): {"type":"string","minLength":1,"maxLength":200}
- key_id (query, Optional): {"type":"string","pattern":"^[0-9]+$"}
- state (query, Optional): {"enum":["reserved","forwarding","completed","unknown","rejected"]}
- billing_state (query, Optional): {"enum":["reserved","settled","released"]}
- stream (query, Optional): {"type":"boolean"}
Responses
200
完整 UTF-8 BOM CSV;金额列为整数账务单位。超过限制返回 JSON 错误,不返回部分 CSV。
{
"text/csv": {
"schema": {
"type": "string"
}
}
}
413
错误代码见 core-api.md;供应商/数据库错误已隐藏。
{
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"success": {
"const": false
},
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"type": {
"const": "oneaster_error"
}
},
"required": [
"code",
"message",
"type"
]
},
"data": {
"type": "null"
}
},
"required": [
"success",
"error",
"data"
]
}
}
}
429
错误代码见 core-api.md;供应商/数据库错误已隐藏。
{
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"success": {
"const": false
},
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"type": {
"const": "oneaster_error"
}
},
"required": [
"code",
"message",
"type"
]
},
"data": {
"type": "null"
}
},
"required": [
"success",
"error",
"data"
]
}
}
}
default
错误代码见 core-api.md;供应商/数据库错误已隐藏。
{
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"success": {
"const": false
},
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"type": {
"const": "oneaster_error"
}
},
"required": [
"code",
"message",
"type"
]
},
"data": {
"type": "null"
}
},
"required": [
"success",
"error",
"data"
]
}
}
}