Skip to main content

Create a grid

Use this example to create and assign a grid card with a raw Administration API request.

Authenticate first

This example assumes you already completed Authenticate an Admin API application and are sending the returned auth token in the Authorization header.

Submit a POST request to create a new Grid Card and assign it to a user. You must include the UUID of the user that you want to assign a Grid Card in the API request. The format of the URL is:

https://<domainname>.<region>.trustedauth.com/api/web/v2/users/{userid}/grids

For example:

https://example.us.trustedauth.com/api/web/v2/users/2c422a2f-e8ae-4af8-8b03-e1ce0ddde0b0/grids

An Authorization header field must be included in the header section of this request. The Authorization header stores the value received as "token" in the authentication request. The Authorization header can be sent with or without a type value of "Bearer". For example:

Authorization: Bearer <token>

or

Authorization: <token>

In this example, all the required input parameters have been provided. The request would succeed and generate a response that includes the desired Grid Card information. For example:

{
"id": "6c5ad3b4-888c-4d3b-88f2-8ab71ae4f917",
"serialNumber": 2,
"createDate": "2018-05-29T19:48:24.249+0000",
"assignDate": null,
"expiryDate": null,
"expired": false,
"lastUsedDate": null,
"state": "ACTIVE",
"gridContents": [
["TP", "0M", "P8", "KW", "3D", "KR", "M1", "W0", "TJ", "F4"],
["9M", "MV", "88", "DX", "H3", "DV", "44", "PW", "V1", "CX"],
["F2", "FE", "0Q", "XN", "CD", "36", "MQ", "PN", "WF", "DD"],
["WN", "9F", "J4", "TF", "7J", "W4", "7M", "9Q", "1H", "W5"],
["QM", "21", "VQ", "39", "1N", "EV", "PT", "P4", "28", "WY"]
],
"allowedActions": ["DELETE", "DISABLE"],
"userId": "2c422a2f-e8ae-4af8-8b03-e1ce0ddde0b0",
"userName": "john"
}