Get Completion Token
Try it
GET
/v0/pipelines/{pipeline_name}/tables/{table_name}/connectors/{connector_name}/completion_tokenGenerate a completion token for an input connector.
Returns a token that can be passed to the /completion_status endpoint
to check whether the pipeline has finished processing all inputs received from the
connector before the token was generated.
Authentication
JSON web token (JWT) or API keyBearer token
Parameters
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
pipeline_name | string | Yes | Unique pipeline name |
table_name | string | Yes | SQL table name. Unquoted SQL names have to be capitalized. Quoted SQL names have to exactly match the case from the SQL program. |
connector_name | string | Yes | Unique input connector name |
Response
200Completion token that can be passed to the '/completion_status' endpoint.
application/json- objectResponse to a completion token creation request.
tokenstringrequiredCompletion token. An opaque string associated with the current position in the input stream generated by an input connector. Pass this string to the `/completion_status` endpoint to check whether all inputs associated with the token have been fully processed by the pipeline.
404Specified pipeline, table, or connector does not exist
application/json- objectInformation returned by REST API endpoints on error.
detailsobjectrequiredDetailed error metadata. The contents of this field is determined by `error_code`.error_codestringrequiredError code is a string that specifies this error type.messagestringrequiredHuman-readable error message.
500
application/json- objectInformation returned by REST API endpoints on error.
detailsobjectrequiredDetailed error metadata. The contents of this field is determined by `error_code`.error_codestringrequiredError code is a string that specifies this error type.messagestringrequiredHuman-readable error message.
503
application/json- objectInformation returned by REST API endpoints on error.
detailsobjectrequiredDetailed error metadata. The contents of this field is determined by `error_code`.error_codestringrequiredError code is a string that specifies this error type.messagestringrequiredHuman-readable error message.
curl -X GET 'https://api.example.com/v0/pipelines/{pipeline_name}/tables/{table_name}/connectors/{connector_name}/completion_token' \
-H 'Authorization: Bearer YOUR_TOKEN'const response = await fetch('https://api.example.com/v0/pipelines/{pipeline_name}/tables/{table_name}/connectors/{connector_name}/completion_token', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
});
const data = await response.json();
console.log(data);interface ApiResponse {
// shape your response here
}
const response: Response = await fetch('https://api.example.com/v0/pipelines/{pipeline_name}/tables/{table_name}/connectors/{connector_name}/completion_token', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
});
const data = (await response.json()) as ApiResponse;
console.log(data);import requests
url = "https://api.example.com/v0/pipelines/{pipeline_name}/tables/{table_name}/connectors/{connector_name}/completion_token"
headers = {
"Authorization": "Bearer YOUR_TOKEN"
}
response = requests.request("get", url, headers=headers)
print(response.json())package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.example.com/v0/pipelines/{pipeline_name}/tables/{table_name}/connectors/{connector_name}/completion_token", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_TOKEN")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
out, _ := io.ReadAll(resp.Body)
fmt.Println(string(out))
}{
"message": "Unknown pipeline name 'non-existent-pipeline'",
"error_code": "UnknownPipelineName",
"details": {
"pipeline_name": "non-existent-pipeline"
}
}