Fuselage
Download Pending Avatars
Requires the Run Import permission.
URL
Requires Auth
HTTP Method
/api/v1/downloadPendingAvatars
yes
POST

Example Call

Curl
Node.js
Python
PHP
Java
1
curl -L -X POST 'http://localhost:3000/api/v1/downloadPendingAvatars' \
2
-H 'X-User-Id: d26x6zSkaPSe5gCyy' \
3
-H 'X-Auth-Token: Zu-Z6eKzIIz7MCCRGeHi29bYkXZCJ4SxFC0JAasqm92'
Copied!
1
var request = require('request');
2
var options = {
3
'method': 'POST',
4
'url': 'http://localhost:3000/api/v1/downloadPendingAvatars',
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/downloadPendingAvatars"
4
5
payload={}
6
headers = {
7
'X-User-Id': 'd26x6zSkaPSe5gCyy',
8
'X-Auth-Token': 'Zu-Z6eKzIIz7MCCRGeHi29bYkXZCJ4SxFC0JAasqm92'
9
}
10
11
response = requests.request("POST", url, headers=headers, data=payload)
12
13
print(response.text)
14
Copied!
1
<?php
2
require_once 'HTTP/Request2.php';
3
$request = new HTTP_Request2();
4
$request->setUrl('http://localhost:3000/api/v1/downloadPendingAvatars');
5
$request->setMethod(HTTP_Request2::METHOD_POST);
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.post("http://localhost:3000/api/v1/downloadPendingAvatars")
3
.header("X-User-Id", "d26x6zSkaPSe5gCyy")
4
.header("X-Auth-Token", "Zu-Z6eKzIIz7MCCRGeHi29bYkXZCJ4SxFC0JAasqm92")
5
.asString();
6
Copied!

Example Result

Success

1
{
2
"success": true,
3
"count": 0
4
}
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
3.0.0
Added
Export as PDF
Copy link
Edit on GitHub