Create Project and Table
Hydrolix has a RESTful JSON API that uses JWT authentication. You can login, create a project or table, and other actions. The full API is described here. It's recommended that you use a standard HTTP client like Postman or Insomnia , which makes working with APIs much easier, especially for capturing and using environment variables.
Your API endpoints are specific to your deployment base URI: https://my-domain.hydrolix.live/config/v1. You'll need to call three API endpoints:
- POST /login with username & password. The response contains the bearer token and org uuid.
- POST /{{org uuid}}/projects with a name to create a project. The response contains the project uuid.
- POST /{{org uuid}}/project/{{project uuid}}/tables with a name to create a table. The response contains the table uuid.
Security
Hydrolix will check your IP has permission to access API: Enabling Access to your platform. If your IP has not been enabled, your request will timeout. Hydrolix API users will receive an email asking them to set a password. If you don't have an email, ask your admin to invite you to the project. The API uses a bearer token based on your permissions.
Login⚓︎
The first step is to login on the API
```curl Request curl -X POST 'https://my-domain.hydrolix.live/config/v1/login' \ -H 'Content-Type: application/json' \ -d '{ "username": "myusername", "password": "mypassword" }'
You will need the orgs.uuid and the auth_token.access_token from the response for subsequent steps. These are typically defined as environment variables in standard HTTP client API tools.
Create a Project⚓︎
A project is a container for one or more tables. Every table must be within a project. To create a project, use the following API endpoint.
```curl Request curl -X POST 'https://my-domain.hydrolix.live/config/v1/orgs/{{org_uuid}}/projects/' \ -H 'Authorization: Bearer thebearertoken1234567890abcdefghijklmnopqrstuvwxyz' \ -H 'Content-Type: application/json' \ -d '{ "name": "website", "description": "A description of my project" }'
You will need the uuid for the next step.
Create a Table⚓︎
A table is where the data is stored. A single table can store one or more data sets. Data sets that are searched together should be stored together because they have strong context. To create a table, use the following endpoint.
```curl Request curl -X POST 'https://my-domain.hydrolix.live/config/v1/orgs/{{org_uuid}}/projects/{{project_uuid}}/tables/' \ -H 'Authorization: Bearer thebearertoken1234567890abcdefghijklmnopqrstuvwxyz' \ -H 'Content-Type: application/json' \ -d '{ "name": "events", "description": "My new table" }'
Make sure to keep the table uuid along with the other uuids you have used previously. Your next job is to create the write schema or transform.
👍 Configuring Settings
This tutorial includes settings that should cover the majority of cases. You can learn more about these settings in the following docs: