Arpio API Guide

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

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:

  • 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. These API calls are available to view on our Swagger API documentation.
  • View Audit Events for your Arpio Account
    You can view audit events, which allow you to track user and system actions within your Arpio account. 

🔍 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-scripts -> create-api-key) to generate API keys without manual console interaction

Usage: create-api-key.py [OPTIONS] ACCOUNT_ID EMAIL

  Authenticate to an Arpio account using an email address and password and

  create an API key that can be used non-interactively to work with that

  account's resources.

Options:

  --password TEXT

  --api-hostname TEXT

  --help      

Step-by-step

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 an apiKeyID and secret, and prints it to stdout.

Remember to save both or their combination securely! (e.g. .env, export, secret vault)

export ARPIO_API_KEY=<apiKeyID>:<secret>

📜 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. Find a list of all auditEvent types here. 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.io/api/accounts/$ARPIO_ACCOUNT_ID/auditEvents?timestampStart=2024-01-01T00:00:00Z&limit=50" \
-H "X-Api-Key: $API_KEY_ID:$API_SECRET" \
-H "Content-Type: application/json"

Response:

[
  {
    "accountId": "bRcYYAPuX3eODn3Gv5wTQT",
      "source": "api",
      "type": "getApplicationResourceStatusChanges",
      "access": "read",
      "principal": {
        "type": "accountSubject",
        "identity": {
          "type": "native",
          "authority": "native",
        "subjectId": "yQK9hueawcvfsNXFneWO1I",
          "certs": null,
          "expires": "2025-07-17T23:58:16.012140Z"
        },
        "context": null
      },
      "result": "success",
      "resources": [
        {
          "type": "application",
        "id": "daQ4123qEonMP77OgQ1yX4"
        },
        {
          "type": "account",
        "id": "bRcYYAPuX3eODn3Gv5wTQT"
        }
      ],
      "requestInfo": {
        "query": {
          "nextToken": [
            "InMzOi8vYXJwaW8tZGV2LWdsb2JhbC11cy1lYXN0LTEvYXBwLXJlc291cmNlLXN0YXR1cy1jaGFuZ2VzL2JSY1lRVVF1WDNlT0RuM0d2NXdUUVQvcmVzdG9yZS9kYVE0OHk1cUVvbk1QNzdPZ1ExeVg0LzIwMjUtMDctMTdUMTg6Mjk6MTdaLWJhdGNoMDAwMC5qc29uLmd6Ig==.aHlBBw.1LCYcaSf1jRGYFbjq5BS6napOPbCW-u1VowSz7ZMJ8Q"
          ]
        },
        "path": {
        "accountId": "bRcYYAPuX3eODn3Gv5wTQT",
        "appId": "daQ47y5qEonMP77OgQ1yX4",
          "scope": "restore"
        }
      },
      "responseInfo": null,
      "context": {
        "apiRequest": {
        "url": "https://api.arpio-dev.io/api/accounts/bRcYYAPuX3eODn3Gv5wTQT/applications/daQ47y5qEonMP77OgQ1yX4/resourceStatusChanges/restore",
          "remoteAddresses": [
            "4.34.18.218"
          ],
          "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36",
        "httpRequestId": "77e22ae2-ee6e-433f-8049-13e45c93865e",
        "executionRequestId": "abfg71e6-8c55-4991-b45c-6fe99156b78e"
        },
        "apiResponse": {
          "statusCode": 200,
          "status": "200 OK"
        }
      },
      "timestamp": "2025-07-17T18:29:33.217018Z",
    "eventId": "YmCnVBcxk8C5GIJVpHrQI5"
    },
]

Filtering Tips

  • To list failover test results from the last 7 days, with 20 results on the page:

    curl -X GET "https://api.arpio.io/api/accounts/$ARPIO_ACCOUNT_ID/auditEvents?timestampStart=$(date -u -v-7d +%Y-%m-%dT%H:%M:%SZ)&pageSize=20" \
    -H "X-Api-Key: $ARPIO_API_KEY" \
    -H "Content-Type: application/json"
  • 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 <Arpio Account ID> <Arpio account email address>

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

export ARPIO_API_KEY=<apiKeyID from step 1>:<secret from step 1>

export ARPIO_ACCOUNT_ID=<Your Account ID>

Step 3: Check Audit Events

Using BSD Date (Mac) & jq :
curl -X GET "https://api.arpio.io/api/accounts/$ARPIO_ACCOUNT_ID/auditEvents?timestampStart=$(date -u -v-7d +%Y-%m-%dT%H:%M:%SZ)" \
-H "X-Api-Key: $ARPIO_API_KEY" \
-H "Content-Type: application/json" \
| jq . > 7daysofarpioauditlogs.txt
Using GNU Date & jq :
curl -X GET "https://api.arpio.io/api/accounts/$ARPIO_ACCOUNT_ID/auditEvents?timestampStart=$(date -u -v-7d +%Y-%m-%dT%H:%M:%SZ)" \
-H "X-Api-Key: $ARPIO_API_KEY" \
-H "Content-Type: application/json" \
| jq . > 7daysofarpioauditlogs.txt