This document describes the REST and GraphQL APIs for the Arweave Data Repository.
All API endpoints require authentication unless explicitly marked as public.
Authorization: Bearer <jwt_token>
POST /api/v1/data
Content-Type: application/json
{
"data": any,
"type": DataType,
"permissions": PermissionLevel,
"metadata": {
"tags": [
{ "name": string, "value": string }
]
}
}
GET /api/v1/data/:id
GET /api/v1/data?type=&creator=&limit=&cursor=
GET /api/v1/tokens/balance
POST /api/v1/tokens/transfer
Content-Type: application/json
{
"recipient": string,
"amount": number
}
query GetData($id: ID!) {
getData(id: $id) {
id
type
metadata {
size
hash
}
}
}
query QueryData($type: DataType, $limit: Int) {
queryData(type: $type, limit: $limit) {
edges {
node {
id
type
}
cursor
}
pageInfo {
hasNextPage
endCursor
}
}
}
mutation StoreData($input: DataInput!) {
storeData(input: $input) {
id
type
}
}
mutation UpdatePermissions($id: ID!, $level: PermissionLevel!) {
updatePermissions(id: $id, level: $level) {
id
permissionLevel
}
}
subscription OnDataUpdated($type: DataType) {
dataUpdated(type: $type) {
id
type
metadata {
size
hash
}
}
}
All endpoints return standard error responses:
{
"error": {
"code": string,
"message": string,
"details": object
}
}