Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Excerpt
hiddentrue

test

  1. (Optional) You can click Authentication, and then click Get / me to find the account number for your other accounts. 
  2. Step 2: Locate your authorization code

    There are two ways to authenticate into the tool: 

    • Via the API tool and AMP
    • Via the command line


    Via Swagger and AMP



Via the command line how to handle a user with multiple accounts

  1. Enter the login information for the Armor Management Portal (AMP). Review the following example.   

    Code Block
    POST /auth/authorize
     
    {
      "username": "user@domain.com",
      "password": "password123%^&"
    }
  2. If the authentication is successful, you will receive the authorization code (code). Review the following example. 

    Code Block
    {
     "redirect_uri": null,
     "code": "<<base64-hash>>"
     "success": true
    }
  3. Redeem the authorization code (code) to retrieve the access token. Review the following example.   

    Code Block
    POST /auth/token
     
    {
      "code":"<<base64-hash>>"
      "grant_type":"authorization_code"
    }
  4. If the request is successful, you will receive the access token (access_token). You must redeem this token within two minutes of the previous request. Review the following example. 

    Code Block
    {
     "access_token": "<<32-bit-uuid>>",
     "id_token": "<<base64-hash>>",
     "expires_in": 1800,
     "token_type": "Bearer"
    }
  5. Go to apidoc.tde.armorlabs.co.
  6. In Authorization, enter the access token (access_token). 
  7. In X-Account-Context, enter the ID for the account. 
    • You can use the GET https://api.armor.com/me API to find the account ID (id)
  8. Click Authorize. You can now use the form to locate and test API calls before you enter the command line. 

...

Add input parameters to Put, Post, Delete, and Get calls 

Note

This section only applies to API call that require input parameters.

...