Get upload stream
Gets the status and progress of a single upload stream identified by token.
Required Permissions
Requires the Master role.
HTTP Request
GET /api/sonar/upload-streams/:token
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
https://HOSTNAME/api/sonar/upload-streams/a1b2c3d4-e5f6-7890-abcd-ef1234567890
Request Parameters
Path Parameters
| Key | Type | Description | Notes |
|---|---|---|---|
| token | String | Upload stream identifier in GUID format. | 36 characters |
Success Response
{
"stream": {
"token": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"remote_addr": "192.0.2.10",
"login_name": "admin",
"file_name": "users.csv",
"file_size": 1048576,
"uploaded_size": 524288,
"created": "2026-01-15 10:30:25+0900",
"last_upload": "2026-01-15 10:30:40+0900",
"metadata": {
"lookup_name": "users"
}
}
}
- stream (Object): Upload stream details
- token (String): Upload stream identifier in GUID format
- remote_addr (String): IP address of the client that opened the upload stream
- login_name (String): Login name of the account that opened the upload stream
- file_name (String): Name of the file being uploaded
- file_size (64-bit integer): Total size of the target file in bytes
- uploaded_size (64-bit integer): Number of bytes uploaded so far
- created (String): Time the upload stream was opened (
yyyy-MM-dd HH:mm:ssZformat) - last_upload (String): Time the last chunk was received.
nullif no chunk has arrived yet - metadata (Object): Metadata key-value pairs supplied when the upload stream was opened
Error Responses
Token format is invalid
HTTP status code 400
{
"error_code": "invalid-argument",
"error_msg": "'token' parameter should be GUID type"
}
Upload stream does not exist
HTTP status code 200
{
"stream": null
}
Permission denied
HTTP status code 500
{
"error_code": "illegal-state",
"error_msg": "no-permission"
}