Create A 3rd Party API Key
Title |
Create fixed date API key for 3rd party applications |
URL Path |
vault_rest/token |
Method |
POST |
Http return |
200, 400, 401, 403, 500 |
Table of Contents |
|
Last Updated |
08 Oct 2019 |
Summary
This API allows you to create API keys to be used by 3rd party applications.
HTTP header parameters
Name |
Value |
Required |
Description |
Example |
Authorization |
The API key of the caller |
REQUIRED |
This header should have the following format: |
POST /vault_rest/authenticate HTTP/1.1 Host: localhost:8010 Authorization: Bearer f3I8Vss3cWAuh3EscB06QRDcQfMzHY Content-Type: application/json { "expires" : "2018-07-15T04:14:50.0000000Z", "description" : "MetaDefender Access API Key" } |
Method: POST
HTTP body |
json |
REQUIRED |
{
"expires"
:
"2015-07-15T04:14:50.0000000Z"
,
"description"
:
"Metadefender access token"
}
Descriptions of body:
expires |
API key expiration date |
REQUIRED |
Specify a date+time (in UTC ISO-8601 format) when the API key should expire. |
description |
API key description |
OPTIONAL |
Specify a description for the API key. |
Request Error
400 |
Bad Request |
Invalid HTTP request |
401 |
Invalid parameter |
One or more parameters are invalid |
403 |
Forbidden |
API key is incorrect |
500 |
Internal Server Error |
Server is temporarily unavailable |
Response
Example of a successful scan request:
{
"expires"
:
"2018-07-15T04:14:50.0000000Z"
,
"token"
:
"OrRnBd9J0AzTiUe4Xrevj6IUoHbdMs"
,
"user_id"
:
1
}
Descriptions of response:
token |
The API key that was created |
expires |
Date and time of API key expiration |
user_id |
The ID of the user associated with the API key |