http://localhost:8080
- Endpoint:
/login - Method: POST
- Description: Authenticate user and get access token
- Request Body:
{ "username": "string", "password": "string" } - Response:
{ "success": "boolean", "message": "string", "data": { "username": "string" } }
-
Endpoint:
/signup -
Method: POST
-
Description: Register a new user
-
Request Body:
{ "email": "string", "username": "string", "password": "string" } -
Response:
{ "success": "boolean", "message": "string", "data": { "email": "string", "username": "string" } }
- Endpoint:
/auth - Method: GET
- Description: Verify if user is authenticated
- Headers:
Authorization: Bearer <token>// we are using cookie currently so frontend take care accordingly - Response:
{ "success": "boolean", "message": "string", "data": { "username": "string" // can be user id let us discuss, else let us store username in session } }
-
Endpoint:
/api/v1/project/:projectid/sources/spec -
Method: GET
-
Description: Give spec based on source type
-
Headers:
Authorization: Bearer <token> -
Request Body:
{ "type": "string", "version": "string" } -
Response:
{ "success": "boolean", "message": "string", "data": { "type": "string", "version": "string", "spec": "json" } }
-
Endpoint:
/api/v1/project/:projectid/sources/test -
Method: POST
-
Description: Test configured source configuration
-
Headers:
Authorization: Bearer <token> -
Request Body:
{ "type": "string", "version": "string", "config": "json" } -
Response:
{ "success": "boolean", "message": "string", "data": { "type": "string", "version": "string", "config": "json" } }
- Endpoint:
/api/v1/project/:projectid/sources - Method: POST
- Description: Create a new source
- Headers:
Authorization: Bearer <token> - Request Body:
{ "name": "string", // we have to make sure in database that it must also unique according to project id (for doubt let us discuss) "type": "string", "version": "string", // this field need to be shown on frontend as well, we discussed at time of design as well "config": "json" } - Response:
{ "success": "boolean", "message": "string", "data": { // whatever received send back "name": "string", "type": "string", "version": "string", "config": "json" } }
- Endpoint:
/api/v1/project/:projectid/sources - Method: GET
- Description: Retrieve all sources
- Headers:
Authorization: Bearer <token> - Response:
{ "success": "boolean", "message": "string", "data": [ { "id": "integer", "name": "string", "type": "string", "version": "string", "config": "json", "created_at": "timestamp", "updated_at": "timestamp", "created_by": "string", // only username of user "updated_by": "string", // only username of user, "jobs": [ { "name": "string", "id": "integer", "activate": "boolean", "last_run_time": "timestamp", "last_run_state": "string", "dest_name": "string" } ] } ] }
- Endpoint:
/api/v1/project/:projectid/sources/:id - Method: PUT
- Description: Update an existing source
- Headers:
Authorization: Bearer <token> - Request Body:
{ "name": "string", "type": "string", "version": "string", "config": "json" } - Response:
{ "success": "boolean", "message": "string", "data": { // send same back "name": "string", "type": "string", "version": "string", "config": "json" } }
- Endpoint:
/api/v1/project/:projectid/sources/:id - Method: DELETE
- Description: Delete a source
- Headers:
Authorization: Bearer <token> - Response:
{
// Note: it is soft delete not hard delete
"success": "boolean",
"message": "string",
"data": {
"name": "string" // name of source deleted
}
}- Endpoint:
/api/v1/project/:projectid/destinations/spec - Method: GET
- Description: Give spec based on destination type
- Headers:
Authorization: Bearer <token> - Request Body:
{ "type": "string", "version": "string", "catalog": "string" } - Response:
{ "success": "boolean", "message": "string", "data": { "type": "string", "version": "string", "catalog": "string", "spec": "json" } }
// currently this is not avaialable in olake will build this
-
Endpoint:
/api/v1/project/:projectid/destinations/test -
Method: POST
-
Description: Test configured destination configuration
-
Headers:
Authorization: Bearer <token> -
Request Body:
{ "type": "string", "version": "string", "config": "json" } -
Response:
{ "success": "boolean", "message": "string", "data": { "type": "string", "version": "string", "config": "json" } }
-
Endpoint:
/api/v1/project/:projectid/destinations -
Method: POST
-
Description: Create a new destination
-
Headers:
Authorization: Bearer <token> -
Request Body:
{ "name": "string", "type": "string", "config": "json", "version": "string" } -
Response:
{ "success": "boolean", "message": "string", "data": { "name": "string", "type": "string", "config": "json", "version": "string" // to create a job same version of destination and same version of source required } }
- Endpoint:
/api/v1/project/:projectid/destinations - Method: GET
- Description: Retrieve all destinations
- Headers:
Authorization: Bearer <token> - Response:
{ "success": "boolean", "message": "string", "data": [ { "id": "integer", "name": "string", "type": "string", "config": "json", "version": "string", "created_at": "timestamp", "updated_at": "timestamp", "created_by": "string", // username only "updated_by": "string", // username only "jobs": [ { "name": "string", "id": "integer", "activate": "boolean", "last_run_time": "timestamp", "last_run_state": "string", "source_name": "string" } ] } ] }
- Endpoint:
/api/v1/project/:projectid/destinations/:id - Method: PUT
- Description: Update an existing destination
- Headers:
Authorization: Bearer <token> - Request Body:
{ "name": "string", "type": "string", "config": "json", "version": "string" } - Response:
{ "success": "boolean", "message": "string", "data": { "name": "string", "type": "string", "version": "string", "config": "json" } }
- Endpoint:
/api/v1/project/:projectid/destinations/:id - Method: DELETE
- Description: Delete a destination
- Headers:
Authorization: Bearer <token> - Response:
{
// NOTE: this is only soft delete not hard
"success": "boolean",
"message": "string",
"data": {
"name": "string"
}
}-
Endpoint:
/api/v1/project/:projectid/jobs -
Method: POST
-
Description: Create a new job
-
Headers:
Authorization: Bearer <token> -
Request Body:
{ "name": "string", "source": { "name": "string", "type": "string", "config": "json", "version": "string" }, "destination": { "name": "string", "type": "string", "config": "string", "version": "string" }, "frequency": "string", "streams_config": "json" } -
Response:
{ "success": "boolean", "message": "string", "data": { // request body as it is } }
- Endpoint:
/api/v1/project/:projectid/jobs// also use endpoint for filter such as /jobs/dest_id="some_id" or /jobs/source_id="some_id" - Method: GET
- Description: Retrieve all jobs
- Headers:
Authorization: Bearer <token> - Response:
{ "success": "boolean", "message": "string", "data": [ { "id": "int", "name": "string", "source": { "name": "string", "type": "string", "config": "json", "version": "string" }, "destination": { "name": "string", "type": "string", "config": "json", "version": "string" }, "streams_config": "json", "frequency": "string", "last_run_time": "timestamp", "last_run_state": "string", "created_at": "timestamp", "updated_at": "timestamp", "created_by": "string", // username "updated_by": "string" // username // can also send state but if it is required } ] }
-
Endpoint:
/api/v1/project/:projectid/jobs/:id -
Method: PUT
-
Description: Update an existing job
-
Headers:
Authorization: Bearer <token> -
Request Body:
{ "name": "string", "source": { "name": "string", "type": "string", "config": "json", "version": "string" }, "destination": { "name": "string", "type": "string", "config": "json", "version": "string" }, "frequency": "string", "streams_config": "json", "activate": "boolean" // send this to activate or deactivate job } -
Response:
{ "success": "boolean", "message": "string", "data": { "name": "string", "source": { "name": "string", "type": "string", "config": "json", "version": "string" }, "destination": { "name": "string", "type": "string", "config": "json", "version": "string" }, "frequency": "string", "streams_config": "json", "activate": "boolean" } }
- Endpoint:
/api/v1/project/:projectid/jobs/:id - Method: DELETE
- Description: Delete a job
- Headers:
Authorization: Bearer <token> - Response:
{
"success": "boolean",
"message": "string",
"data": {
"name": "boolean"
}
}-
Endpoint:
/api/v1/project/:projectid/source/streams -
Method: GET
-
Description: Give the streams details
-
Headers:
Authorization: Bearer <token> -
Request Body:
{ "type": "string", "version": "string", "config": "json" } -
Response:
{ "success": "boolean", "message": "string", "data": { "streams_config": "json" } }
-
Endpoint:
/api/v1/project/:projectid/jobs/:id/sync -
Method: POST
-
Description: Sync the job
-
Headers:
Authorization: Bearer <token> -
Response:
{ "success": "boolean", "message": "string" }
-
Endpoint:
/api/v1/project/:projectid/jobs/:id/activate -
Method: POST
-
Description: Update the activate status of job
-
Headers:
Authorization: Bearer <token> -
Request Body:
{ "activate":boolean } -
Response:
{ "success": "boolean", "message": "string", "data": { // request body as it is } }
-
Endpoint:
/api/v1/project/:projectid/jobs/:jobid/tasks -
Method: GET
-
Description: Give the History of jobs
-
Headers:
Authorization: Bearer <token> -
Response:
{ "success": "boolean", "message": "string", "data": [ { "id": "string", "start_time": "timestamp", "runtime": "integer", "status": "string" } ] } -
Endpoint:
/api/v1/project/:projectid/jobs/:id/sync -
Method: POST
-
Description: Sync the job
-
Headers:
Authorization: Bearer <token> -
Response:
{ "success": "boolean", "message": "string", "data": null }###Activate/Inactivate Job
-
Endpoint:
/api/v1/project/:projectid/jobs/:id/activate -
Method: POST
-
Description: Update the activate status of job
-
Headers:
Authorization: Bearer <token> -
Request Body:
{ "activate":boolean }- Response:
{ "success": "boolean", "message": "string", "data": { "activate": "boolean" } } -
Endpoint:
/api/v1/project/:projectid/jobs/:jobid/task/:id/logs -
Method: GET
-
Description: Give the Logs of that particular Job
-
Headers:
Authorization: Bearer <token> -
Response:
{ "success": "boolean", "message": "string", "data": { "task_logs": "json" } }
All endpoints may return the following error responses:
{
"success": false,
"message": "Bad request"
}{
"success": false,
"message": "Authentication required"
}{
"success": false,
"message": "Insufficient permissions"
}{
"success": false,
"message": "Resource not found"
}{
"success": false,
"message": "Internal server error"
}The API allows requests from:
- Origin:
http://localhost:8000 - Methods: GET, POST, PUT, DELETE, OPTIONS
- Headers: Origin, Content-Type, Accept, Authorization
- Credentials: true