storj/satellite/admin
2020-05-12 15:01:15 +02:00
..
common.go satellite/admin: administrative endpoint 2020-02-12 12:12:50 +02:00
project_test.go satellite/accounting: separate usage and bandwidth limit (#3878) 2020-05-12 15:01:15 +02:00
project.go satellite/accounting: separate usage and bandwidth limit (#3878) 2020-05-12 15:01:15 +02:00
README.md satellite/admin: add a readme about endpoints 2020-04-28 19:13:45 +00:00
server_test.go satellite/admin: add project limit modification and authorization token 2020-02-17 07:56:16 +00:00
server.go satellite/admin: add a readme about endpoints 2020-04-28 19:13:45 +00:00

satellite/admin

Satellite Admin package provides API endpoints for administrative tasks.

Requires setting Authorization header for requests.

GET /api/user/{user-email}

This endpoint returns information about user and their projects.

A successful response:

{
    "user":{
        "id": "12345678-1234-1234-1234-123456789abc",
        "fullName": "Alice Bob",
        "email":"alice@example.test"
    },
    "projects":[
        {
            "id": "abcabcab-1234-abcd-abcd-abecdefedcab",
            "name": "Project",
            "description": "Project to store data.",
            "ownerId": "12345678-1234-1234-1234-123456789abc"
        }
    ]
}

GET /api/project/{project-id}/limit

This endpoint returns information about project limits.

A successful response:

{
    "usage": {
        "amount":"0 B",
        "bytes":0
    },
    "rate":{
        "rps":0
    }
}

POST /api/project/{project-id}/limit?usage={value}

Updates usage limit for a project.

POST /api/project/{project-id}/limit?rate={value}

Updates rate limit for a project.