Management APIs
Error Logs API
List
6 min
list error logs you can list all of the error logs currently set up on your account by making making a http get request to the /errorlogs endpoint error logs api rate limit there is no charge for requests to the error logs api however the it is subject to a rate limit of 60 requests per minute this limit includes requests made when accessing error logs via the bluecart api dashboard https //app bluecartapi com/errorlogs in the event of the rate limit being hit an http 429 response code https //www bluecartapi com/docs/response codes will be returned parameters the following querystring (http get) parameters allow you to refine the results returned by the error logs list api parameter required description api key required the api key for your account search term optional limits the error logs returned to just those containing the search term in their parameters property page optional set the page number of error logs to return, defaults to page=1 10 error logs are returned per page sort by optional the sort order to apply to the results valid values are date (to sort by error log date) or count (to sort by error log count) sort direction optional the sort direction to return results valid values are descending or ascending (the default) use in conjunction with the sort by parameter example get get /errorlogs in the example below we list error logs on your account http https //api bluecartapi com/errorlogs?api key=demo$ curl "https //api bluecartapi com/errorlogs?api key=demo"const axios = require('axios'); const params = { api key 'demo' } axios get('https //api bluecartapi com/errorlogs?api key=demo') then(response => { const apiresponse = response data; console log("total error logs ", apiresponse results count total); apiresponse logs map((log, number) => console log((number + 1) + ' ' + log id); }) catch(error => { console error(error); });import requests import json params = { 'api key' 'demo' } api result = requests get('https //api bluecartapi com/errorlogs', { params }) api response = api result json()\<?php $querystring = http build query(\[ 'api key' => 'demo', ]); $ch = curl init(sprintf('%s?%s', 'https //api bluecartapi com/errorlogs', $querystring)); curl setopt($ch, curlopt returntransfer, true); curl setopt($ch, curlopt followlocation, true); \# the following options are required if you're using an outdated openssl version \# more details https //www openssl org/blog/blog/2021/09/13/letsencryptrootcertexpire/ curl setopt($ch, curlopt ssl verifyhost, false); curl setopt($ch, curlopt ssl verifypeer, false); curl setopt($ch, curlopt timeout, 180); $json = curl exec($ch); curl close($ch); $api result = json decode($json, true); print r($api result); echo "total error logs ", $api result\['results count total'], php eol; ?> bluecart api responds with the following json showing error logs from your account { "request info" { "success" true }, "logs" \[ { "id" "a566b6c63aa5a6b0a932827d45c4ecf195c491bc", "engine url" "url opened by api", "api url" "api request url", "date" "2020 01 01t00 00 00 000z", "count" 15, "parameters" { "param name" "param value" }, "result" { "request info" { "success" false, "message" "unable to fulfil your request at this time, please retry you have not been charged for this request " } } } ], "page" 1, "page count total" 1, "results count" 1, "results count total" 1 } bluecart api returns the following properties in the list error logs response true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type next steps account api https //docs trajectdata com/bluecartapi/account api