# Management API

> The HTTP API behind a trial: signup, limits, usage, buckets and credentials.

Source: https://docs.ramo.io/api
Facts as of 2026-11-25. Every page of these docs, as Markdown: https://docs.ramo.io/llms.txt

A trial comes with a portal token. With it, a program reads usage and manages the trial's buckets and credentials over HTTP. Two calls need no token at all: the one that creates a trial, and the one that reads the limits.

- **Base**: https://api.ramo.io
- **Format**: JSON in, JSON out
- **Token**: The portal_token of the signup response, sent as `authorization: Bearer`
- **Errors**: An HTTP status and `{"errors":{"detail":"..."}}`
- **Description**: [api.ramo.io/api/openapi](https://api.ramo.io/api/openapi), as OpenAPI. Checked against it on 2026-11-25

## Calling it

Without a token:

*no token needed:*

```sh
# quota, bucket cap, ttl, signup cap: no auth needed
curl -s https://api.ramo.io/api/portal/trials/limits
```

With the token. It is one of the two secrets in the signup response, so the call below takes it from the saved file without showing it:

*a call with the token:*

```sh
# the token goes from the saved response to curl without being shown
jq -r '"authorization: Bearer " + .portal_token' "$HOME/.config/ramo/trial.json" \
    | curl -sS -H @- https://api.ramo.io/api/portal/usage
```

*with the helper script:*

```sh
sh ramo.sh usage
```

> **Keep it out of the transcript:** The secret key and the portal token are each returned once. Never print them, and never type them into a command: read them from the file the signup call saved.

## Every call

| Call | What it does | Token |
| --- | --- | --- |
| [POST /api/portal/trials](https://docs.ramo.io/api.md#create-trial) | Create a trial | No |
| [GET /api/portal/trials/limits](https://docs.ramo.io/api.md#trial-limits) | Read the trial's limits | No |
| [GET /api/portal/usage](https://docs.ramo.io/api.md#usage) | Read usage | Yes |
| [GET /api/portal/usage/buckets](https://docs.ramo.io/api.md#usage-buckets) | Read usage by bucket | Yes |
| [GET /api/portal/buckets](https://docs.ramo.io/api.md#list-buckets) | List buckets | Yes |
| [POST /api/portal/buckets](https://docs.ramo.io/api.md#create-bucket) | Create a bucket | Yes |
| [DELETE /api/portal/buckets/{name}](https://docs.ramo.io/api.md#delete-bucket) | Delete a bucket | Yes |
| [GET /api/portal/credentials](https://docs.ramo.io/api.md#list-credentials) | List credentials | Yes |
| [POST /api/portal/credentials](https://docs.ramo.io/api.md#create-credential) | Create a credential | Yes |
| [POST /api/portal/credentials/{access_key}/rotate](https://docs.ramo.io/api.md#rotate-credential) | Rotate a credential's secret | Yes |
| [DELETE /api/portal/credentials/{access_key}](https://docs.ramo.io/api.md#revoke-credential) | Revoke a credential | Yes |
| [GET /api/portal/me](https://docs.ramo.io/api.md#profile) | Read the profile | Yes |

## Trials

### Create a trial

`POST /api/portal/trials` (no authentication)

One call provisions a trial: a bucket with a quota, a read and write credential for it, and a portal token for the calls below. No authentication. The limit per address a day is what stands against abuse.

Body, as JSON

- **name** (string, optional): A label, made into part of the bucket's name.

Returns 201

- **endpoint** (string): The S3 endpoint for this trial. Use this value, not one from an example.
- **bucket** (string): The bucket's name.
- **access_key** (string): The S3 access key.
- **secret_key** (string): The S3 secret key. Returned once, here, and not retrievable again.
- **portal_token** (string): The Bearer token for the calls below. Returned once.
- **quota_bytes** (integer): The trial's storage quota.
- **expires_at** (string): When the trial ends.
- **docs** (string): The address of the trial's documentation.
- **limits** (object): The same object the limits call returns.

Errors

- **400**: The body is not valid: name has to be a string.
- **429**: The address has reached its trials for the day. Every request counts, not only the ones that succeed.
- **503**: Trials are switched off, or this one could not be created. One retry is safe for the second case.

### Read the trial's limits

`GET /api/portal/trials/limits` (no authentication)

The quota, the bucket limit, the lifetime and the signup limit, from the configuration that signup enforces. No authentication, and it creates nothing: read it before signing up, or instead of trusting a page.

Returns 200

- **quota_bytes** (integer): Storage for the whole trial, across its buckets.
- **max_buckets** (integer): How many buckets a trial may hold.
- **ttl_days** (integer): How long a trial lasts.
- **signup_limit** (object): max_per_ip and window_hours: trials an address may create in that window.
- **s3_endpoint** (string): The S3 endpoint trials use.
- **docs** (string): The address of the trial's documentation.

Errors

- **503**: Trials are switched off.

## Usage

### Read usage

`GET /api/portal/usage` (bearer token)

What is stored now, and requests and bytes read out by day across a range of dates.

Query

- **from** (date, optional): First day, inclusive. The first of the current month when left out.
- **to** (date, optional): Last day, inclusive. Today when left out.

Returns 200

- **data.current_storage_bytes** (integer): Bytes stored at this moment. The range does not bound it.
- **data.effective_quota_bytes** (integer): The storage quota: the trial's, an override, or null for a customer without one.
- **data.operation_counts** (array): Requests by day and operation: date, operation, count.
- **data.retrieval_bytes** (array): Bytes read out by day: date, bytes.
- **data.from, data.to** (string): The range the counts cover.
- **data.customer_id** (string): Whose usage this is.

Errors

- **401**: No token, or a token the service does not know.
- **403**: The token lacks the scope this call needs.
- **404**: The token's customer is not known.
- **422**: A date is malformed, or the range runs backwards.

### Read usage by bucket

`GET /api/portal/usage/buckets` (bearer token)

Bytes stored now in each bucket, sorted by name. A bucket with nothing in it is listed with 0.

Returns 200

- **data[].bucket_name** (string): The bucket.
- **data[].current_storage_bytes** (integer): Bytes stored in it at this moment.

Errors

- **401**: No token, or a token the service does not know.
- **403**: The token lacks the scope this call needs.
- **404**: The token's customer is not known.

## Buckets

### List buckets

`GET /api/portal/buckets` (bearer token)

Every bucket the token's customer owns.

Returns 200

- **data[].id** (string): The bucket's id.
- **data[].bucket_name** (string): Its name, as S3 calls use it.
- **data[].versioning** (boolean): Whether object versioning was asked for.
- **data[].acl** (string): private, public_read or public_read_write.
- **data[].status** (string): desired, provisioning, active, deleting or deleted.
- **data[].inserted_at** (string): When it was created.

Errors

- **401**: No token, or a token the service does not know.
- **403**: The token lacks the scope this call needs.

### Create a bucket

`POST /api/portal/buckets` (bearer token)

A further bucket in the trial. It counts against the same quota and the same expiry, and a trial holds at most 3.

Body, as JSON

- **bucket_name** (string): The name of the new bucket.
- **versioning** (boolean, optional): Asks for object versioning. The S3 gateway does not serve earlier versions today.

Returns 201

- **data.id** (string): The bucket's id.
- **data.bucket_name** (string): Its name, as S3 calls use it.
- **data.versioning** (boolean): Whether object versioning was asked for.
- **data.acl** (string): private, public_read or public_read_write.
- **data.status** (string): desired, provisioning, active, deleting or deleted.
- **data.inserted_at** (string): When it was created.
- **node_results** (array): One entry for each storage node the change was applied to: node_id, status, and reason when it failed.

Errors

- **401**: No token, or a token the service does not know.
- **403**: The token lacks the scope, the trial is over its quota, or it already holds its limit of buckets.
- **409**: The name is taken.
- **422**: The name is not a valid bucket name.

### Delete a bucket

`DELETE /api/portal/buckets/{name}` (bearer token)

Removes an empty bucket. Delete its objects first, through S3.

Returns 200

- **node_results** (array): One entry for each storage node the change was applied to: node_id, status, and reason when it failed.

Errors

- **401**: No token, or a token the service does not know.
- **403**: The token lacks the scope this call needs.
- **404**: No such bucket, or it is not this customer's.
- **409**: The bucket is not empty, or a storage node could not be reached.

## Credentials

### List credentials

`GET /api/portal/credentials` (bearer token)

The S3 credentials the customer holds, without their secrets.

Returns 200

- **data[].id** (string): The credential's id.
- **data[].access_key** (string): The access key. The secret is never listed.
- **data[].principal_name** (string): The name the storage layer knows it by.
- **data[].policy** (string): readwrite, readonly or writeonly.
- **data[].bucket_names** (array of string): The buckets it may reach.
- **data[].status** (string): desired, provisioning, active, rotating or revoked.
- **data[].inserted_at** (string): When it was created.
- **data[].description** (string, optional): The note given when it was created.

Errors

- **401**: No token, or a token the service does not know.
- **403**: The token lacks the scope this call needs.

### Create a credential

`POST /api/portal/credentials` (bearer token)

A new S3 key pair, limited to the buckets named. The secret key is in this response and nowhere afterwards.

Body, as JSON

- **policy** (string): readwrite, readonly or writeonly.
- **bucket_names** (array of string, optional): The buckets it may reach. Each has to be the caller's.
- **description** (string, optional): A note to recognise it by.

Returns 201

- **data** (object): The credential, with its access_key and, this once, its secret_key.
- **node_results** (array): One entry for each storage node the change was applied to: node_id, status, and reason when it failed.

Errors

- **401**: No token, or a token the service does not know.
- **403**: The token lacks the scope this call needs.
- **422**: A parameter is not valid, or a bucket named is not the caller's.

### Rotate a credential's secret

`POST /api/portal/credentials/{access_key}/rotate` (bearer token)

A new secret key for an access key. The new secret is in this response and nowhere afterwards.

Returns 200

- **data** (object): The credential with its new secret_key.
- **node_results** (array): One entry for each storage node the change was applied to: node_id, status, and reason when it failed.

Errors

- **401**: No token, or a token the service does not know.
- **403**: The token lacks the scope this call needs.
- **404**: No such credential, or it is not this customer's.

### Revoke a credential

`DELETE /api/portal/credentials/{access_key}` (bearer token)

Revokes a key pair on every storage node.

Returns 200

- **node_results** (array): One entry for each storage node the change was applied to: node_id, status, and reason when it failed.

Errors

- **401**: No token, or a token the service does not know.
- **403**: The token lacks the scope this call needs.
- **404**: No such credential, or it is not this customer's.

## Profile

### Read the profile

`GET /api/portal/me` (bearer token)

What kind of customer the token belongs to, the state of its trial and when it ends, its quota, and the S3 endpoint for it.

Returns 200

- **data** (object): The profile.

Errors

- **401**: No token, or a token the service does not know.
- **403**: A dashboard session that is not yet bound to a customer.
- **404**: The token's customer is not known.

## Beyond a trial

The service's own description has more operations, for accounts that sign in to the dashboard. The [OpenAPI document](https://api.ramo.io/api/openapi) is their reference, and the authority wherever it and this page differ.
