Python
from engini import Engini
client = Engini() # reads ENGINI_API_KEY
status = client.connections.refresh_status(42)
print(status.status)import { Engini } from "@engini/sdk";
const client = new Engini(); // reads ENGINI_API_KEY
const status = await client.connections.refreshStatus(42);
console.log(status.status);# starts a refresh and polls its status until it settles
engini connections refresh 42 --timeout 300const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.engini.io/v1/connections/{connectionId}/refresh-status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.engini.io/v1/connections/{connectionId}/refresh-status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.engini.io/v1/connections/{connectionId}/refresh-status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.engini.io/v1/connections/{connectionId}/refresh-status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engini.io/v1/connections/{connectionId}/refresh-status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": 0,
"statusDescription": "<string>",
"error": "<string>",
"errorDate": "2023-11-07T05:31:56Z",
"lastRefreshDate": "2023-11-07T05:31:56Z"
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}Connections
Get refresh status
Returns the status of the most recent object refresh triggered by POST /connections//refresh-objects for the given connection, including whether it is still running, when it last completed, and any error.
GET
/
v1
/
connections
/
{connectionId}
/
refresh-status
Python
from engini import Engini
client = Engini() # reads ENGINI_API_KEY
status = client.connections.refresh_status(42)
print(status.status)import { Engini } from "@engini/sdk";
const client = new Engini(); // reads ENGINI_API_KEY
const status = await client.connections.refreshStatus(42);
console.log(status.status);# starts a refresh and polls its status until it settles
engini connections refresh 42 --timeout 300const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.engini.io/v1/connections/{connectionId}/refresh-status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.engini.io/v1/connections/{connectionId}/refresh-status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.engini.io/v1/connections/{connectionId}/refresh-status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.engini.io/v1/connections/{connectionId}/refresh-status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engini.io/v1/connections/{connectionId}/refresh-status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": 0,
"statusDescription": "<string>",
"error": "<string>",
"errorDate": "2023-11-07T05:31:56Z",
"lastRefreshDate": "2023-11-07T05:31:56Z"
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}Authorizations
BearerApiKey
Enter your JWT token
Path Parameters
The identifier of the connection whose refresh status is requested.
Response
The current refresh status for the connection.
Status of a connection's most recent metadata/object refresh.
Current refresh status.
Available options:
0, 1, 2 Human-readable description of the current status.
Error message from the last failed refresh, if any.
When the last error occurred, if any.
When the connection was last refreshed successfully.