Skip to main content

ExyData API

The ExyData API is a RESTful API that allows you to manage your ExyData services. Interact with the API using any HTTP client, such as curl, Postman or Insomnia.

In this guide, we will cover the following topics:

Register to the platform

To register to the platform, you need to provide your email address and a password. The password must be at least 8 characters long and contain at least one uppercase letter, one lowercase letter, one number and one special character.

curl -X POST \
    -H "Content-Type: application/json" \
    -d '{"first_name": "your-name", "last_name": "your-last-name", "email": "<your-email>", "password": "<your-password>"}' \
    https://api.exydata.com/v1/accounts/register

If everything goes well, you will see among other things your org_id. This is the identifier of your organization in the platform. You will need it to deploy new services.

Confirm your email address

After registering to the platform, you will receive an email with a confirmation link. Click on the link to confirm your email address. If you receive a code instead of a link, you can use the following command to confirm your email address:

curl -X POST \
    -H "Content-Type: application/json" \
    -d '{"email": "<your-email>", "code": "<your-code>"}' \
    https://api.exydata.com/v1/accounts/confirm

Login to the platform

To login to the platform, you need to provide your email address and password.

curl -X POST \
    -H "Content-Type: application/json" \
    -d '{"email": "<your-email>", "password": "<your-password>"}' \
    https://api.exydata.com/v1/accounts/login

If the login is successful, you will receive an access token that will be used to authenticate your requests to the platform.

Deploy a new database or add-on

To deploy a new workload in the platform, you need to provide the following parameters:

  • org_id: the identifier of your organization in the platform.
  • token: the access token you received after logging in to the platform.
  • cloud: the cloud provider where you want to deploy your workload. The available clouds are: aws and digitalocean.
  • region: the region where you want to deploy your workload. You can find the list of available regions in the Cloud Regions page.
  • database: The name of the database to deploy. See Databases Availability for a list of databases and add-ons available in the platform.
  • plan: The plan of the database. See our pricing plans for a list of available sizes.
curl -X POST \
    -H "Content-Type: application/json" \
    -d '{"cloud": "string", "database": "string", "org_id": "string", "token": "string", "size": "string", "region": "string"}' \
    https://api.exydata.com/v1/services/deploy

If the deployment is successful, you will receive a resource_id. This is the identifier of your service in the platform. You will need it to manage your service.

List your instances

To list your services, you need to provide the following parameters:

  • org_id: the identifier of your organization in the platform.
  • token: the access token you received after logging in to the platform.
curl -X POST \
    -H "Content-Type: application/json" \
    -d '{"org_id": "string", "token": "string"}' \
    https://api.exydata.com/v1/services/list/

If the request is successful, you will receive a list of services.

Resize a instance

To resize a service, you need to provide the following parameters:

  • org_id: the identifier of your organization in the platform.
  • token: the access token you received after logging in to the platform.
  • resource_id: the identifier of your service in the platform.
  • plan: The plan of the database. See our pricing plans for a list of available sizes.
  • cloud: the cloud provider where you want to deploy your workload. The available clouds are: aws and digitalocean.
  • region: the region where you resource is. You can find the list of available regions in the Cloud Regions page.
curl -X POST \
    -H "Content-Type: application/json" \
    -d '{"cloud": "string", "org_id": "string", "region": "string", "resource_id": "string", "size": "string", "token": "string"}' \
    https://api.exydata.com/v1/services/resize

If the request is successful, the code will be 200. Expect a downtime of a few minutes during the resize.

Terminate a instance

Terminating a service will delete all the data in the service. This action is irreversible.

To terminate a service, you need to provide the following parameters:

  • org_id: the identifier of your organization in the platform.
  • token: the access token you received after logging in to the platform.
  • resource_id: the identifier of your service in the platform.
  • cloud: the cloud provider where you want the resource exists. The available clouds are: aws and digitalocean.
  • region: the region where you resource is. You can find the list of available regions in the Cloud Regions page.
curl -X POST \
    -H "Content-Type: application/json" \
    -d '{"cloud": "string", "org_id": "string", "region": "string", "resource_id": "string", "token": "string"}' \
    https://api.exydata.com/v1/services/terminate

If the request is successful, the code will be 200 with a message that the resource is terminated.

Add balance to your account

To add balance to your account, you need to provide the following parameters:

  • org_id: the identifier of your organization in the platform.
  • token: the access token you received after logging in to the platform.
curl -X POST \
    -H "Content-Type: application/json" \
    -d '{"org_id": "string", "token": "string"}' \
    https://api.exydata.com/v1/balance/add

You will receive a payment_url that you can use to add balance to your account.

Use the email address you used to login to the platform to add balance to your account. If you use a different email address, the balance will not be added to your account automatically, in that case, reach out to support@exy.com to add the balance to your account.

Get the balance for your account

To get the balance for your account, you need to provide the following parameters:

  • org_id: the identifier of your organization in the platform.
  • token: the access token you received after logging in to the platform.
curl -X POST \
    -H "Content-Type: application/json" \
    -d '{"org_id": "string", "token": "string"}' \
    https://api.exydata.com/v1/balance/get

If the request is successful, you will receive the balance for your account.

Support

We continue to add more features to the CLI. If you have any questions or feedback, please contact us at support@exy.com.