---
title: Arpio API Guide - Getting Started
description: Utilize the Arpio API to programmatically access information about your Arpio applications
---

[Skip to content](https://docs.arpio.io/arpio-api-guide#main-content)

English

Show submenu for translations

[Customer ticket portal](https://docs.arpio.io/tickets-view?hsLang=en)

- Home
- Products
- Pricing
- Blog
- Company

Open main navigation

Close main navigation

- Home
- Products
- Pricing
- Blog
- Company
- English
  
  Show submenu for translations
- [Customer ticket portal](https://docs.arpio.io/tickets-view)

 Welcome to Arpio Technical Docs

- There are no suggestions because the search field is empty.

1. [Arpio Documentation](https://docs.arpio.io/?hsLang=en)
2. [Arpio Reference Guides](https://docs.arpio.io/arpio-reference-guides?hsLang=en)
3. [Arpio API](https://docs.arpio.io/arpio-reference-guides?hsLang=en#arpio-api)

# Arpio API Guide - Getting Started

## 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](https://app.swaggerhub.com/apis/ARPIO/arpio-api/0.0.0) or as a JSON on our API endpoint: [https://api.arpio.io/api/openapi.json](https://api.arpio.io/api/openapi.json)

#### Table of Contents

- [Use Cases](https://docs.arpio.io/arpio-api-guide#use-cases)
- [Finding your Arpio ID](https://docs.arpio.io/arpio-api-guide#Account-ID)
- [Generating an API Key](https://docs.arpio.io/arpio-api-guide#Creating-API-Key)
- [RBAC Provisioning](https://docs.arpio.io/arpio-api-guide#rbac)
- [Audit Events](https://docs.arpio.io/arpio-api-guide#audit-events) 
    - [Usage Examples with Audit Events](https://docs.arpio.io/arpio-api-guide#Example)

 

#### 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](https://app.swaggerhub.com/apis/ARPIO/arpio-api/0.0.0).
- **View Audit Events for your Arpio Account**  
  You can view [audit events](https://docs.arpio.io/arpio-api-guide#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](https://docs.arpio.io/hs-fs/hubfs/Screenshot%202025-07-09%20at%206.45.23%20PM.png?width=670&height=102&name=Screenshot%202025-07-09%20at%206.45.23%20PM.png)

---

### 🔑 Creating an API key 🔑

#### Via the Arpio console:

An account administrator can generate an API key on the console from Settings \> Account Settings \> API Keys.

#### Using the GitHub script:

Arpio provides a Python script in our GitHub repo ([arpio-scripts](https://github.com/arpio/arpio-scripts/tree/main/create-api-key) -\> [create-api-key](https://github.com/arpio/arpio-scripts/blob/main/create-api-key/create-api-key.py)) 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-keypython -m venv venv. ./venv/bin/activatepip install -r requirements.txt
```

**Run the script**:

```

```

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>
```

---

### RBAC Provisioning

Refer to the RBAC Provisioning Guide [here](https://docs.arpio.io/arpio-api-guide-rbac-provisioning?hsLang=en). 

---

 

### 📜 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](https://api.arpio.io/api/info/auditEventTypes.json). 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:
  
  ```
  
  ```
- 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

```

```

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
```

 

- [Getting Started](https://docs.arpio.io/getting-started?hsLang=en#main-content)

    - [New Account Setup](https://docs.arpio.io/getting-started?hsLang=en#new-account-setup)
    - [New Application Setup](https://docs.arpio.io/getting-started?hsLang=en#new-application-setup)
- [Arpio Fundamentals](https://docs.arpio.io/arpio-fundamentals?hsLang=en#main-content)

    - [Platform Fundamentals](https://docs.arpio.io/arpio-fundamentals?hsLang=en#platform-fundamentals)
    - [Platform Features](https://docs.arpio.io/arpio-fundamentals?hsLang=en#platform-features)
- [Arpio Reference Guides](https://docs.arpio.io/arpio-reference-guides?hsLang=en#main-content)

    - [Arpio API](https://docs.arpio.io/arpio-reference-guides?hsLang=en#arpio-api)
    - [Lifecycle Events](https://docs.arpio.io/arpio-reference-guides?hsLang=en#lifecycle-events)
    - [Role-Based Access Controls (RBAC)](https://docs.arpio.io/arpio-reference-guides?hsLang=en#role-based-access-controls-rbac)
    - [Single Sign-On (SSO) Integration](https://docs.arpio.io/arpio-reference-guides?hsLang=en#single-sign-on-sso-integration)
    - [Test Planning](https://docs.arpio.io/arpio-reference-guides?hsLang=en#test-planning)
    - [Test & Recovery How-To](https://docs.arpio.io/arpio-reference-guides?hsLang=en#test-recovery-how-to)
- [AWS Reference Guides](https://docs.arpio.io/aws-reference-guides?hsLang=en#main-content)

    - [AWS Resource Reference](https://docs.arpio.io/aws-reference-guides?hsLang=en#aws-resource-reference)
    - [AWS Configuration Tags](https://docs.arpio.io/aws-reference-guides?hsLang=en#aws-configuration-tags)
    - [AWS Access](https://docs.arpio.io/aws-reference-guides?hsLang=en#aws-access)
    - [AWS Testing](https://docs.arpio.io/aws-reference-guides?hsLang=en#aws-testing)
    - [AWS Solutions](https://docs.arpio.io/aws-reference-guides?hsLang=en#aws-solutions)
- [Azure Reference Guides](https://docs.arpio.io/azure-reference-guides?hsLang=en#main-content)

    - [Azure Resource Reference](https://docs.arpio.io/azure-reference-guides?hsLang=en#azure-resource-reference)
    - [Azure Configuration Tags](https://docs.arpio.io/azure-reference-guides?hsLang=en#azure-configuration-tags)
    - [Azure Scenarios](https://docs.arpio.io/azure-reference-guides?hsLang=en#azure-scenarios)
- [FAQ](https://docs.arpio.io/faq?hsLang=en#main-content)

    - [AWS FAQ](https://docs.arpio.io/faq?hsLang=en#aws-faq)
    - [Contact Support](https://docs.arpio.io/faq?hsLang=en#contact-support)
    - [License & Billing](https://docs.arpio.io/faq?hsLang=en#license-billing)
    - [Tests and Recoveries](https://docs.arpio.io/faq?hsLang=en#tests-and-recoveries)

- Home
- Products
- Pricing
- Blog
- Company

[![bubble-wand-tight.64](https://docs.arpio.io/hs-fs/hubfs/bubble-wand-tight.64.png?width=64&height=64&name=bubble-wand-tight.64.png "bubble-wand-tight.64")](https://arpio.io)

Copyright © 2026, Arpio