Fuselage
Get Latest Import Operations
URL
Requires Auth
HTTP Method
/api/v1/getLatestImportOperations
yes
GET

Example Call

Curl
Node.js
Python
PHP
Java
1
curl -L -X GET 'http://localhost:3000/api/v1/getLatestImportOperations' \
2
-H 'X-User-Id: d26x6zSkaPSe5gCyy' \
3
-H 'X-Auth-Token: Zu-Z6eKzIIz7MCCRGeHi29bYkXZCJ4SxFC0JAasqm92'
Copied!
1
var request = require('request');
2
var options = {
3
'method': 'GET',
4
'url': 'http://localhost:3000/api/v1/getLatestImportOperations',
5
'headers': {
6
'X-User-Id': 'd26x6zSkaPSe5gCyy',
7
'X-Auth-Token': 'Zu-Z6eKzIIz7MCCRGeHi29bYkXZCJ4SxFC0JAasqm92'
8
}
9
};
10
request(options, function (error, response) {
11
if (error) throw new Error(error);
12
console.log(response.body);
13
});
Copied!
1
import requests
2
3
url = "http://localhost:3000/api/v1/getLatestImportOperations"
4
5
payload={}
6
headers = {
7
'X-User-Id': 'd26x6zSkaPSe5gCyy',
8
'X-Auth-Token': 'Zu-Z6eKzIIz7MCCRGeHi29bYkXZCJ4SxFC0JAasqm92'
9
}
10
11
response = requests.request("GET", url, headers=headers, data=payload)
12
13
print(response.text)
Copied!
1
<?php
2
require_once 'HTTP/Request2.php';
3
$request = new HTTP_Request2();
4
$request->setUrl('http://localhost:3000/api/v1/getLatestImportOperations');
5
$request->setMethod(HTTP_Request2::METHOD_GET);
6
$request->setConfig(array(
7
'follow_redirects' => TRUE
8
));
9
$request->setHeader(array(
10
'X-User-Id' => 'd26x6zSkaPSe5gCyy',
11
'X-Auth-Token' => 'Zu-Z6eKzIIz7MCCRGeHi29bYkXZCJ4SxFC0JAasqm92'
12
));
13
try {
14
$response = $request->send();
15
if ($response->getStatus() == 200) {
16
echo $response->getBody();
17
}
18
else {
19
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
20
$response->getReasonPhrase();
21
}
22
}
23
catch(HTTP_Request2_Exception $e) {
24
echo 'Error: ' . $e->getMessage();
25
}
Copied!
1
Unirest.setTimeouts(0, 0);
2
HttpResponse<String> response = Unirest.get("http://localhost:3000/api/v1/getLatestImportOperations")
3
.header("X-User-Id", "d26x6zSkaPSe5gCyy")
4
.header("X-Auth-Token", "Zu-Z6eKzIIz7MCCRGeHi29bYkXZCJ4SxFC0JAasqm92")
5
.asString();
6
Copied!

Example Result

Success

1
[
2
{
3
"_id": "MJxTRZsYdho8Ww2qq",
4
"type": "Pending Avatars",
5
"importerKey": "pending-avatars",
6
"ts": 1635280600083,
7
"status": "importer_user_selection",
8
"valid": false,
9
"user": "d26x6zSkaPSe5gCyy",
10
"_updatedAt": "2021-10-27T11:26:24.430Z"
11
},
12
{
13
"_id": "YzSCu9WgqJ3wutF4T",
14
"type": "Pending Files",
15
"importerKey": "pending-files",
16
"ts": 1635280596592,
17
"status": "importer_done",
18
"valid": false,
19
"user": "d26x6zSkaPSe5gCyy",
20
"_updatedAt": "2021-10-27T08:32:42.609Z"
21
},
22
{
23
"_id": "96WJDaxXpwXC3fTD5",
24
"type": "Pending Files",
25
"importerKey": "pending-files",
26
"ts": 1635277590992,
27
"status": "importer_user_selection",
28
"valid": false,
29
"user": "d26x6zSkaPSe5gCyy",
30
"_updatedAt": "2021-10-27T08:32:42.609Z"
31
},
32
{
33
"_id": "zYc5kuFRaszfqCegB",
34
"type": "Pending Avatars",
35
"importerKey": "pending-avatars",
36
"ts": 1635277492185,
37
"status": "importer_done",
38
"valid": false,
39
"user": "d26x6zSkaPSe5gCyy",
40
"_updatedAt": "2021-10-27T08:32:42.609Z"
41
},
42
{
43
"_id": "XckCNn9ZsdywHso4f",
44
"type": "Pending Avatars",
45
"importerKey": "pending-avatars",
46
"ts": 1635277452755,
47
"status": "importer_done",
48
"valid": false,
49
"user": "d26x6zSkaPSe5gCyy",
50
"_updatedAt": "2021-10-27T08:32:42.609Z"
51
},
52
{
53
"_id": "NRqiLZ4bADfGwMRMz",
54
"type": "CSV",
55
"importerKey": "csv",
56
"ts": 1635247067385,
57
"status": "importer_file_loaded",
58
"valid": false,
59
"user": "d26x6zSkaPSe5gCyy",
60
"_updatedAt": "2021-10-27T08:32:42.609Z",
61
"contentType": "image/svg+xml",
62
"file": "2021926111747_d26x6zSkaPSe5gCyy_pp.svg"
63
},
64
{
65
"_id": "9mCbRPTbF9QHQ3RM6",
66
"type": "Pending Avatars",
67
"importerKey": "pending-avatars",
68
"ts": 1635247489080,
69
"status": "importer_done",
70
"valid": false,
71
"user": "d26x6zSkaPSe5gCyy",
72
"_updatedAt": "2021-10-27T08:32:42.609Z"
73
}
74
]
Copied!

Error

Any of the following errors can occur on the endpoint.
  • Authorization: Requires an authentication token for the request to be made.
Authorization
1
{
2
"success": false,
3
"error": "unauthorized"
4
}
Copied!

Change Log

Version
Description
1.0.0
Added
Export as PDF
Copy link
Edit on GitHub