Apikey info

Request

Value

Method

GET

URL

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

Summary

Retrieve information about an apikey.

Request

URL Parameters

 

Description

Example

:apikey

The apikey to query

1981b1387c84f2f1465ae14994b96c5c

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": {
"max_upload_file_size": 140,
"max_archive_file_size": 140,
"max_archive_file_number": 50,
"limit_prevention": 40,
"limit_reputation": 4000,
"limit_feed": 1000,
"qos_scan": "normal",
"updated_at": "2018-05-21T15:10:39.213Z",
"created_at": "2018-02-14T08:59:19.913Z",
"note": "",
"portal_api_key": "1981b1387c84f2f1465ae14994b96c5c",
"expiration_date": "1970-01-01T00:00:00.000Z",
"time_interval": "daily",
"source": "salesforce"
}
}

Descriptions of response:

data

The information from database

data.max_upload_file_size

The maximum upload size for files (expressed in MB)

data.max_archive_file_size

The maximum upload size for archives (expressed in MB)

data.max_archive_file_number

The maximum number of files contained in an archive

data.limit_prevention

The limit corresponding to Prevention API

data.limit_reputation

The limit corresponding to Reputation API

data.limit_feed

The limit corresponding to Feed API

data.qos_scan

The selected scan queue, based on apikey type

data.updated_at

The last date when the apikey information was updated

data.created_at

The date when the apikey was created

data.portal_api_key

The queried apikey

data.expiration_date

The expiration date of the apikey (If this is in the future, it means that this is a paid apikey)

data.time_interval

The reset interval for the apikey limits

data.source

The source of the apikey

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/1981b1387c84f2f1465ae14994b96c5c",
"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/1981b1387c84f2f1465ae14994b96c5c\
-H 'Authorization: apikey ${APIKEY}'