Create A Guest Account

Title

This API allows creation of guest accounts

URL Path

/guest

Method

POST

HTTP header parameters

Authorization

The authentication token of the caller

REQUIRED

This header should have the following format: Bearer [token obtained from authenticate API]
Example: Bearer Cp01BwnXAIOLZXxn7yogjKqIZnZpQD

Method: POST

HTTP body

json

REQUIRED

{  
"pin_code" : "123-123-123",
"expires" : "2015-07-15T04:14:50.0000000Z",
"display_name" : "Steve Jobs"
}

Descriptions of body:

pin_code

Guest PIN code

REQUIRED

This ID must be guaranteed to be unique since no return result can be provided via the Diode.

display_name

Guest nickname (friendly name)

OPTIONAL

Give guest user a friendly name for easier management

expires

Account expiration date

REQUIRED*

Specify a date+time (in UTC ISO-8601 format) when the guest account should expire. Cannot be combined with 'expires_after' property.

Note: The expiry date must be in the future or the call will fail with 400/Invalid expiry date.

expires_after

Account expiration date

REQUIRED*

Specify in DD:HH:MM:SS. Cannot be combined with 'expires' property.

- Days, ranging from 0 to 10675199;
- Hours, ranging from 0 to 23;
- Minutes, ranging from 0 to 59;
- Optional seconds, ranging from 0 to 59.

* expires OR expires_after must be specified. Both cannot be specified in the same request (403 Forbidden is returned if both are specified, alongside a message).

Request Code

200

OK

successful request

400

Bad Request

Invalid HTTP request

401

Unauthorized

Invalid/expired token (API key).

409

Conflict

Username already exists (however, this code will not be returned as an error, instead Metadefender will handle this by using the already existing guest account)

500

Internal Server Error

Server is temporarily unavailable