Billing

Billing

Retrieves historical usage data

GEThttps://api.w3ipfs.storage/api/billing/historyUsage

Query

offset (default: 0)
limit (default: 10)

Headers

pinning_api_key* PINNING-API-KEY
pinning_secret_key* PINNING-SECRET-KEY

Response

200: OK
{
    "data": {
        "total_days": number,
        "history_usages": [
            {
                "date": "2023-01-01T11:11:11.111111Z",
                "total_storage": number,
                "total_bandwidth": number,
                "total_amount": "string"
            }
        ]
    },
    "status": "success"
}
curl --location --request GET 'https://api.w3ipfs.storage/api/billing/historyUsage?offset=0&limit=10' \
--header 'pinning_api_key: KEY' \
--header 'pinning_secret_key: SECRET'

Retrieves top up data

GEThttps://api.w3ipfs.storage/api/billing/topUp

Query

offset (default: 0)
limit (default: 10)

Headers

pinning_api_key* PINNING-API-KEY
pinning_secret_key* PINNING-SECRET-KEY

Response

200: OK
{
    "data": {
        "totals": number,
        "top_up_usages": [
            {
                "cosmos_tx_hash": "string",
                "event_index": number,
                "evm_tx_hash": "string",
                "id": "string",
                "sender": "string",
                "recipient": "string",
                "block_number": number,
                "status": true,
                "amount": {
                    "denom": "string",
                    "amount": "string"
                },
                "total_amount": "string",
                "created_at": "2023-01-01T11:11:11.111111Z",
                "updated_at": "2023-01-01T11:11:11.111111Z"
            }
        ]
    },
    "status": "success"
}
curl --location --request GET 'https://api.w3ipfs.storage/api/billing/topUp?offset=0&limit=10' \
--header 'pinning_api_key: KEY' \
--header 'pinning_secret_key: SECRET' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "test-api-key3",
    "scopes": {
        "data": {
            "pinList": true
        },
        "pinning": {
            "unpin": true
        }
    }
}'

Get this month usage data for a user

GEThttps://api.w3ipfs.storage/api/billing/thisMonthUsage

Query

offset (default: 0)
limit (default: 10)

Headers

pinning_api_key* PINNING-API-KEY
pinning_secret_key* PINNING-SECRET-KEY

Response

200: OK
{
    "data": {
        "total_storage": number,
        "storage_usage": number,
        "bandwidth_usage": number,
        "storage_cost": "string",
        "bandwidth_cost": "string"
    },
    "status": "success"
}
curl --location --request GET 'https://api.w3ipfs.storage/api/billing/thisMonthUsage?offset=0&limit=10' \
--header 'pinning_api_key: KEY' \
--header 'pinning_secret_key: SECRET'