AR.IO LogoAR.IO Documentation

Gateway

Operations related to the AR.IO Gateway server itself, including health checks, metrics, and gateway-specific information

Gateway Info or Apex Content

Returns either gateway information or serves content based on configuration:

  • If neither APEX_TX_ID nor APEX_ARNS_NAME is set, returns gateway information
  • If APEX_TX_ID is set, serves that transaction's content
  • If APEX_ARNS_NAME is set, resolves and serves that ArNS name's content

The Content-Type of the response will match the content type of the transaction or ArNS-resolved data (e.g., text/html for HTML documents, application/json for JSON documents, application/octet-stream for binary data, etc.).

GET
/

Response Body

curl -X GET "https://ardrive.net"
{
  "wallet": "string",
  "processId": "string",
  "ans104UnbundleFilter": {},
  "ans104IndexFilter": {},
  "supportedManifestVersions": [
    "0.1.0"
  ],
  "release": "string"
}

Health check endpoint

Get the current health status of the AR.IO Gateway.

GET
/ar-io/healthcheck

Response Body

curl -X GET "https://ardrive.net/ar-io/healthcheck"
{
  "status": "ok",
  "uptime": 0,
  "date": "2019-08-24T14:15:22Z",
  "reasons": [
    "string"
  ]
}

Get AR.IO Gateway information

Returns information about the AR.IO Gateway, including:

  • Gateway wallet address
  • Process ID
  • ANS-104 filter configurations
  • Supported manifest versions
  • Gateway software release version
GET
/ar-io/info

Response Body

curl -X GET "https://ardrive.net/ar-io/info"
{
  "wallet": "string",
  "processId": "string",
  "ans104UnbundleFilter": {},
  "ans104IndexFilter": {},
  "supportedManifestVersions": [
    "0.1.0"
  ],
  "release": "string"
}

Get AR.IO Gateway peer information

Returns information about AR.IO Gateway peers and Arweave node peers. For gateways, includes both data and chunk weights used for peer selection. Peer keys are formatted as host:port.

GET
/ar-io/peers

Response Body

curl -X GET "https://ardrive.net/ar-io/peers"
{
  "gateways": {
    "gateway.example.com:443": {
      "url": "https://gateway.example.com",
      "dataWeight": 50,
      "chunkWeight": 50
    }
  },
  "arweaveNodes": {
    "arweave.example.com:1984": {
      "url": "http://arweave.example.com:1984",
      "blocks": 165967,
      "height": 1732652,
      "lastSeen": 1755190447700
    }
  }
}

Get Prometheus metrics

Returns metrics in Prometheus format for monitoring the Gateway's performance and status. These metrics include various counters, gauges, and histograms tracking:

  • HTTP request statistics
  • Transaction processing metrics
  • System resource usage
  • Cache performance
  • Bundle processing statistics
GET
/ar-io/__gateway_metrics

Response Body

curl -X GET "https://ardrive.net/ar-io/__gateway_metrics"
"# HELP errors_total Total error count\n# TYPE errors_total counter\nerrors_total 0\n\n# HELP uncaught_exceptions_total Count of uncaught exceptions\n# TYPE uncaught_exceptions_total counter\nuncaught_exceptions_total 0\n"

How is this guide?