1.2 Apikey limits

Request

Value

Method

GET

URL

https://api.metadefender.com/v3/apikey/limits

Summary

Retrieve information about the consumed limits for an apikey. Every time a request is made to an endpoint that consumes a specific limit, it will be reflected in this endpoint. It is the equivalent of the X-RateLimit-Used from the response headers:

images/download/attachments/27814641/image2018-12-13_17-41-32.png

Request

Header Parameters

 

Description

Allowed Values

Required

Authorization

Give rights to use the endpoint (API Authentication Mechanisms)

apikey

YES

Response

HTTP Status Codes

Please refer to Status Codes for more information.

Body

Example of successful scan request:

{
    "success": true,
    "data": {
        "prevention_api": "2",
        "reputation_api": "9"
    }
}

Descriptions of response:

data.prevention_api

Limit used for prevention api

data.reputation_api

Limit used for reputation api

Errors

Please refer to Errors for more information.

Sample code (Node.js)

var http = require("https");
 
var options = {
"method": "GET",
"hostname": "api.metadefender.com",
"path": "/v3/apikey/limit",
"headers": {
"Authorization": "apikey " + process.env.APIKEY
}
};
 
var req = http.request(options, function (res) {
var chunks = [];
 
res.on("data", function (chunk) {
chunks.push(chunk);
});
 
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
 
req.end();

Sample code (cURL)

curl -X GET \
https://api.metadefender.com/v3/apikey/limit \
-H 'Authorization: apikey ${APIKEY}'