GET service ostor-users
Description
Lists information about all users and their space usage, or the user specified by either email or ID.
Requests
Syntax
GET /?ostor-users HTTP/1.1 Host: <host> Date: <date> Authorization: <authorization_string>
GET /?ostor-users&emailAddress=<value> HTTP/1.1 Host: <host> Date: <date> Authorization: <authorization_string>
GET /?ostor-users&id=<value> HTTP/1.1 Host: <host> Date: <date> Authorization: <authorization_string>
GET /?ostor-users&space HTTP/1.1 Host: <host> Date: <date> Authorization: <authorization_string>
Parameters
| Parameter | Description | Required |
|---|---|---|
emailAddress
|
User email address. Type: string. Default value: none. |
No* |
id
|
User ID. Type: string. Default value: none. |
No* |
space
|
Show space usage. Type: flag. Default value: none. |
No |
* Only one of the required parameters can be set in a single request.
If neither emailAddress nor id are set, the response is information about all users, otherwise the response is information about the user with the specified email or ID.
Headers
This implementation uses only common request headers.
Responses
Headers
This implementation uses only common response headers.
Body
A JSON dictionary with user information in the following format:
{
"UserEmail" : "<email>"
"UserId" : "<id>",
"AWSAccessKeys : [
{
"AWSAccessKeyId" : "<access_key>",
"AWSSecretAccessKey" : "<secret_key>"
}]
}
{
"UserEmail": "<email>",
"UserId": "<id>",
"State": "<state>",
"OwnerId": "<id>",
"Flags": ["<flag>"],
"AWSAccessKeys": [
{
"AWSAccessKeyId": "<access_key>",
"AWSSecretAccessKey": "<secret_key>"
}],
"AccountCount": "<count>",
"Accounts": [
{
"Name": "<name>",
"AWSAccessKeys": [
{
"AWSAccessKeyId": "<access_key>",
"AWSSecretAccessKey": "<secret_key>"}]
}]
}
Errors
Returns Error Code 400 if more than one parameter is set.
Examples
Sample request #1
Returns information about all users.
GET /?ostor-users HTTP/1.1 Host: s3.example.com Date: Wed, 24 Mar 2021 17:01:11 +0200 Authorization: <authorization_string>
Sample response #1
HTTP/1.1 200 OK
Transfer-encoding : chunked
Server : nginx/1.8.1
Connection : keep-alive
x-amz-req-time-micros: 921
x-amz-request-id: 8000000000000016000060d778c73410
Date: Wed, 24 Mar 2021 15:01:11 GMT
Connection:keep-alive
Content-type : application/json{
"Users": [
{
"UserEmail": "user1@email.com",
"UserId": "b09693b73b3c7686",
"State": "disabled",
"OwnerId": "0000000000000000",
"Flags": [
"disabled"
]
},
{
"UserEmail": "user2@email.com",
"UserId": "bc6265392b818465",
"State": "enabled",
"OwnerId": "0000000000000000",
"Flags": []
},
{
"UserEmail": "user@example.com",
"UserId": "f373d5175d1f3b63",
"State": "enabled",
"OwnerId": "0000000000000000",
"Flags": [
"system"
]
}
]
}
Sample request #2
Returns information about the user with the ID b09693b73b3c7686.
GET /?ostor-users&id=b09693b73b3c7686 HTTP/1.1 Host: s3.example.com Date: Wed, 24 Mar 2021 17:02:25 +0200 Authorization: <authorization_string>
Sample response #2
HTTP/1.1 200 OK
Server: nginx
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
Date: Wed, 24 Mar 2021 15:01:11 GMT
x-amz-req-time-micros: 983
x-amz-request-id: 8000000000000016000060d77d2db664
{
"UserEmail": "user@email.com",
"UserId": "b09693b73b3c7686",
"State": "disabled",
"OwnerId": "0000000000000000",
"Flags": [
"disabled"
],
"AWSAccessKeys": [
{
"AWSAccessKeyId": "b09693b73b3c7686FIGH",
"AWSSecretAccessKey": "jO2p4JBN1tWc4FEGxwZ8qW2jPCJBYp8RJ4KgBcZP"
}
],
"AccountCount": "3",
"Accounts": [
{
"Name": "account1",
"AWSAccessKeys": [
{
"AWSAccessKeyId": "b09693b73b3c768613NV",
"AWSSecretAccessKey": "CBUpFmnpUGlXskTivgDQu4qjYksWpceGZeH6Qyct"
}
]
},
{
"Name": "account2",
"AWSAccessKeys": [
{
"AWSAccessKeyId": "b09693b73b3c7686LCZ5",
"AWSSecretAccessKey": "xLpUDFJMFMO5rR9acAbUDplrPqIO6fneKNFjEB5c"
},
{
"AWSAccessKeyId": "b09693b73b3c76866NI2",
"AWSSecretAccessKey": "ajowU8pWSGW5ZJhA7AR9OjTrt11HmHPCJsMd247W"
}
]
},
{
"Name": "account3",
"AWSAccessKeys": [
{
"AWSAccessKeyId": "b09693b73b3c7686OVV1",
"AWSSecretAccessKey": "EOT652BDvByLwy2qPt0VsQ6s3I0pTrfPXKDw9i75"
},
{
"AWSAccessKeyId": "b09693b73b3c7686Z8BU",
"AWSSecretAccessKey": "m8PgWFLXPeJVSWojCE3DxWDoRk80g7CMyB7xK3Hd"
}
]
}
]
}
Sample request #3
Returns information about space usage.
GET /?ostor-users&space HTTP/1.1 Host: s3.example.com Date: Wed, 23 Oct 2023 13:11:45 +0200 Authorization: <authorization_string>
Sample response #3
HTTP/1.1 200 OK
Transfer-encoding : chunked
Server : nginx/1.8.1
Connection : keep-alive
x-amz-req-time-micros: 921
x-amz-request-id: 8000000000000016000060d778c73410
Date: Wed, 23 Oct 2023 13:15:04 GMT
Connection:keep-alive
Content-type : application/json{
"Users": [
{
"UserEmail": "user2@email.com",
"UserId": "bc6265392b818465",
"State": "enabled",
"OwnerId": "0000000000000000",
"SpaceStat":
{
"LastTs": 471425,
"SizeCurr": 9323413504,
"SizeHMax": 9323413504,
"SizeHInt": 2414764097536
},
"Flags": []
},
{
"UserEmail": "user@example.com",
"UserId": "f373d5175d1f3b63",
"State": "enabled",
"OwnerId": "0000000000000000",
"SpaceStat":
{
"LastTs": 0,
"SizeCurr": 0,
"SizeHMax": 0,
"SizeHInt": 0
},
"Flags": [
"system"
]
}
]
}