storj/satellite/console/consoleweb/consoleapi/gen
Ivan Fraixedes 956109a097
private/apigen: Rename Endpoint fields
Rename the Endpoint fields MethodName and RequestName because they were
confusing for what they are used.

This commit also adds some validations for these fields values and other
validations for Endpoint and EndpointGroup to avoid generating invalid
code.

It also include some tests for these new validations.

Closes https://github.com/storj/storj/issues/6333

Change-Id: Iaabfc33935517889e3729c8b37be51a55eea366c
2023-10-04 13:46:54 +02:00
..
main.go private/apigen: Rename Endpoint fields 2023-10-04 13:46:54 +02:00
README.md satellite/.../consoleapi/gen: Update README 2023-08-23 19:49:35 +00:00

Generated Console REST API

The API defined in this package allows users to make requests related to their accounts, projects, and buckets, which would normally be performed within the Satellite UI.

This API is not enabled in all production environments, and it is not generally available to Storj customers.

Available Endpoints

Generated detailed documentation for each endpoint implemented can be found here.

Usage

Requires setting 'Authorization' header for requests. Users cannot currently generate their own REST API keys.

Example of request

curl  -i -L \
    -H "Accept: application/json" \
    -H 'Authorization: Bearer <key>' \
    -X GET \
    "https://satellite.qa.storj.io/api/v0/projects/"

Successful responses

All the requests (except DELETE) have a non-empty response body for the resource that you're interacting with.

Example:

{
  "project": {
    "name": "My Awesome Project",
    "description": "it is perfect"
  }
}

Error responses

When an API endpoint returns an error (status code 4XX) it contains a JSON error response with 1 error field:

Example:

{
  "error": "authorization key format is incorrect. Should be 'Bearer <key>'"
}