Last errors
Information
This API allow you to retrieve last errors
This endpoint is
synchronous
The role
admin
is needed in order to use this endpointEndpoints
GET/v1/stats/{network}/lastErrors
Path parameters
networkstring - Required
Request
GET /v1/stats/{network}/lastErrors
- bash
- javascript
- .NET
curl -X 'GET' https://api.ppd.iopole.fr//v1/stats/9ca2d4fa-0708-4cf5-85ca-cb2cf2eced52/lastErrors'
-H 'accept: */*'
-H 'Authorization: ${token}'
const got = require('got');
const token = 'your_token_here';
const invoiceId = '9ca2d4fa-0708-4cf5-85ca-cb2cf2eced52';
(async () => {
try {
const response = await got.put(`https://api.ppd.iopole.fr//v1/stats/9ca2d4fa-0708-4cf5-85ca-cb2cf2eced52/lastErrors`, {
headers: {
'accept': '*/*',
'Authorization': Bearer `${token}`,
},
responseType: 'json',
});
console.log(response.body);
} catch (error) {
console.error(error.response.body);
}
})();
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
var token = "your_token_here";
var invoiceId = "9ca2d4fa-0708-4cf5-85ca-cb2cf2eced52";
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("accept", "*/*");
client.DefaultRequestHeaders.Add("Authorization", {token});
try
{
var response = await client.PutAsync("https://api.ppd.iopole.fr//v1/stats/9ca2d4fa-0708-4cf5-85ca-cb2cf2eced52/lastErrors", null);
response.EnsureSuccessStatusCode();
var responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseString);
}
catch (HttpRequestException ex)
{
Console.WriteLine("Request error: {ex.Message}");
}
}
}
Response
Status: 200 - application/json
Description: List of errors
Schema:
- id: string
- from_user: string
- to_user: string
- message_state: string
- create_date: string
Status: 401
Description: Unauthorized - Authentication is required and has failed or has not yet been provided.
Status: 403
Description: Forbidden - The server understood the request, but it refuses to authorize it. Note: This endpoint requires an admin account.