Start an extraction run for a file
POSThttps://api.cloudsquid.io/api/datasources/:source_id/run
Start an extraction run for a file. The runs are asynchronous and the status can be checked with the run_id.
Request​
Path Parameters
source_id uuidrequired
the ID of the datasource
- application/json
Body
pipeline stringrequired
Possible values: [cloudsquid-pro
, cloudsquid-flash
]
file_id uuidrequired
File to start extraction
Responses​
- 202
- 400
- 401
- 500
Extraction started successfully
- application/json
- Schema
- Example (from schema)
Schema
run_id uuidrequired
The id of the run
{
"run_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Bad or malformed request
- application/json
- Schema
- Example (from schema)
Schema
errorMessage stringrequired
{
"errorMessage": "string"
}
Unauthorized
- application/json
- Schema
- Example (from schema)
Schema
errorMessage stringrequired
{
"errorMessage": "string"
}
Something unexpectedly went wrong internally
Authorization: X-API-Key
name: X-API-Keytype: apiKeyin: header
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.cloudsquid.io/api/datasources/:source_id/run");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("X-API-Key", "<API_KEY_VALUE>");
var content = new StringContent("{\n \"pipeline\": \"cloudsquid-pro\",\n \"file_id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear