1.2 Apikey limits

Request

Value

Method

GET

URL

https://api.metadefender.com/v4/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/33426484/image2018-12-13_17-41-32.png

Request

Header Parameters

 

Description

Allowed Values

Required

apikey

Gives 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 a successful request:

{
"reputation_api": 0,
"prevention_api": "4",
"feed_api": 0,
"download_file": 0,
"sandbox_api": "1"
}

Example of a failed request:

{
"success": false,
"error": {
"code": 404008,
"messages": [
"The apikey was not found"
]
}
}

Descriptions of response:

reputation_api

The limit used for Reputation API

prevention_api

The limit used for Prevention API

feed_api

The limit corresponding to Feed API

sandbox_api

The limit corresponding to Sandbox API

For understanding what these limits are, please see https://metadefender.opswat.com/licensing

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": [
"v4",
"apikey",
"limits"
],
"headers": {
"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/v4/apikey/limits \
-H "apikey: ${APIKEY}"