Arpio API Guide

Utilize the Arpio API to programmatically access information about your Arpio application

Arpio’s REST API provides programmatic access to key disaster recovery operations

A full API Documentation is available at our Swagger API webpage or as a JSON on our API endpoint: https://api.arpio.io/api/openapi.json

Table of Contents

Use Cases:

  • List supported AWS resource types
    You can query /api/info/resourceTypes.json or .csv (public endpoints; no auth needed) to retrieve a list of resources Arpio can protect—ideal for planning or automating tagging workflows docs.arpio.io+5docs.arpio.io+5docs.arpio.io+5docs.arpio.io+1arpio.io+1.

  • View Audit Events for your Arpio Account
  • Fetch replication and application metadata
    Including replication timestamps, status states, and resource listings—all of which can be consumed via standard HTTP clients or scripting tools.


 🔍 Finding your Account ID in the URL

Your Account ID is the first randomized string in the Arpio console URL.

For example, in this URL:

https://app.arpio.io/bRcYQUQuX3eODn3Gv5wTQT/applications/PuRz6CWGQhqKv3TjfRIOgb
  • Account ID = bRcYQUQuX3eODn3Gv5wTQT

You’ll need this when calling authenticated endpoints (e.g. /api/accounts/{accountID}/...) or when scoping your API key.

Screenshot 2025-07-09 at 6.45.23 PM


 🔑 Creating an API key using the GitHub script

Arpio provides a Python script in our GitHub repo (arpio-scriptscreate-api-key) to generate API keys without manual console interaction.

Step-by-step

Clone the repo: 

git clone https://github.com/arpio/arpio-scripts.git
Setup your virtual environment:
cd arpio-scripts/create-api-key
python -m venv venv
. ./venv/bin/activate

pip install -r requirements.txt

Run the script:

python create-api-key.py bRcJWQDuX3rOGn3Gv5wTQT example@example.com

This logs into Arpio, generates a key, and prints it to stdout.

Remember to save it securely! (e.g. .env, export, secret vault)



📜 Viewing Audit Logs: /api/accounts/{account_id}/auditEvents

Arpio’s audit logging endpoint lets you retrieve audit events—which track user and system actions within your Arpio account. This is useful for:

  • Security auditing
    Know who triggered a failover or changed an application.

  • Automation tracing
    Verify what was initiated by API scripts vs. humans.

  • Compliance
    Export logs for review or archiving.

🔐 Endpoint

GET /api/accounts/{account_id}/auditEvents
  • Authentication: Required (use X-Api-Key: <apiKeyId>:<secret>)

  • Parameters (as query string):

    • Name Description
      timestampStart
      string

      The earliest timestamp to constrain results by, in ISO 8601 format. This timestamp is inclusive.

      Example : 2021-11-24T12:21:16.123Z

      timestampEnd
      string

      The latest timestamp to constrain results by, in ISO 8601 format. This timestamp is inclusive.

      Example : 2021-11-25T12:21:16.123Z

      pageSize
      integer

      The maximum number of events to get in a single response. If more are available, the response contains a nextToken that can be presented to retrieve additional pages of results.

      nextToken
      string

      A token returned from this endpoint, which identifies an offset that more events can be fetched from.

      account_id - Required
      string

      An Arpio account ID

Sample expected curl GET and JSON response:

$ curl -X GET "https://api.arpio-dev.io/api/accounts/$ARPIO_ACCOUNT_ID/auditEvents?startDate=2024-01-01T00:00:00Z&limit=50

Response:

[
  {
    "id": "evt_01H9YZ...",
  "timestamp": "2024-01-01T18:22:31.932Z",
  "action": "updateApplication",
    "user": {
      "id": "usr_abc123",
      "email": "admin@example.com"
    },
    "details": {
    "applicationId": "PuRz8CWGQhqKv3TjfRIOgb",
      "region": "us-east-1"
    }
  }, ...
]

Filtering Tips

  • To list failover test results from the last 7 days:

    curl "https://api.arpio.io/api/accounts/$ACCOUNT_ID/auditEvents?timestampStart=$(date -u -d '-7 days' +%Y-%m-%dT%H:%M:%SZ)&pageSize=1000" \
    -H "X-Api-Key: $API_KEY" \
    | jq '.[] | select(.action=="listFailoverTestResults")'
  • For daily log exports, paginate using pageSize ,  and utilize timestampStart to avoid overlap.

  • You can use the token returned when using the pageSize option as the nextToken option to continue through the paginated returned response

 


📘 Example Workflow

Here's a quick end-to-end scenario using the API to find audit events for your application:

Step 1: Create the API key

python ./create-api-key.py bRcJWQDuX3rOGn3Gv5wTQT example@example.com

Step 2: Save the API Key and Account ID to an environmental variable

export ARPIO_API_KEY=<api key from step 1>

export ARPIO_ACCOUNT_ID=<Your Account ID>

Step 3: Check Audit Events

curl -X GET "https://api.arpio.io/api/accounts/$ARPIO_ACCOUNT_ID/auditEvents?startDate=2024-01-01T00:00:00Z&limit=50" \
  -H "Authorization: Bearer $ARPIO_API_KEY" \
  -H "Content-Type: application/json"