Getting started with the Secure Edge Portal REST API

Prev Next

Before getting started using the Secure Edge Portal REST API, make sure that you:

This section tells how to get started with the REST APIs, including:

  • Creating and saving keys for authentication
  • Accessing Secure Edge Portal APIs
  • Making your first API call
API access is enabled if you’re in the Developer Program. If you aren’t in the Developer Program, contact your Account Manager.

Creating and Saving API Keys for Authentication

API keys are credentials linked to your Secure Edge Portal account. They authenticate and authorize access to the APIs with the same permissions as your Secure Edge Portal account.

Getting an API key for use in authenticating REST API usage requires:

  • Using the Secure Edge Portal to create the key
  • Saving the key for use by copying or downloading it

You can add up to three keys per account. Note that:

  • API keys have the same permissions as your user account
  • Expiration of your password doesn’t affect your API keys
  • If the role of the user changes or the permissions associated with the user’s role change, it doesn’t affect API keys that have already been created. Any new API keys the user creates have the new permissions associated with the role.
  • When a user is deleted, any API keys that he or she created are also deleted and the API key can’t be used to make API calls

Follow these steps to create and securely save an API key:

  1. On the bottom of the Secure Edge Portal left menu, select My Account > API Keys to display the API Keys page.
  2. On the API Keys page select Add API Key.
  3. In the Add API Key dialog box, enter a key name, which is used only to identify the key.
  4. By default, the API key expires in 90 days. You can specify a different expiry period in minutes, hours, or days. The maximum is 365 days. Although it’s possible to toggle the Expires in field to Never, we recommend that you never create an API key that doesn’t expire.
  5. Select Create API Key to create the key.
  6. Next, save the access key into a secure location. Copy or download the key to save it. After you leave this screen, you’ll no longer be able to view, copy, download, or recover the key.
    • To copy the key, select the copy icon next to the key.
    • To download the key as a file, select Download.
Keep your API keys secure and private. Be careful that you don’t share them, store them in a code repository, or include them in client-side code. If a key is lost or compromised, delete it immediately.

The API key you created shows on the API Keys page.

Accessing Secure Edge Portal APIs

All API access is over HTTPS. HTTP requests are redirected to HTTPS. You need to access the APIs using your account-specific domain: <yourcompany>.secureedge.view.com 

API keys are used to authenticate API requests from your account. You’ll need to provide a key in each API request you make to the Secure Edge Portal.

Making Your First API Call

Log into your Secure Edge Portal account to use the REST API documentation, available at https://<your_company>.secureedge.view.com/apidoc. In the API documentation you can explore the API calls, including endpoints paths, HTTP method, parameters, responses, and status codes. You can also try out the API calls to see the responses and see syntax examples.

apidoc1

To try out an API call, you’ll need the API key you created in Creating and Saving API Keys for Authentication. In the example, we use the GET request to the user endpoint with the path v1/user/current to get logged-in user information.

To try out a call, follow these steps:

  1. Log into your Secure Edge Portal account.
  2. Go to https://<your_company>.secureedge.view.com/apidoc.
    apidoc1
  3. Scroll through the list of APIs to find user.
    apidoc2
  4. Find the endpoint path /v1/user/current to get logged-in user information. Select it to expand for details about parameters (in this example, there are none) and response codes.
    apidoc3
  5. To authorize use, select the lock icon to the right to display the Available authorizations dialog. Paste the API key you created in Creating and Saving API Keys for Authentication into the Value field. Select Authorize then Close the dialog.
    apidoc4
  6. Now select Try it out.
    apidoc5
  7. Select Execute.
    apidoc6
  8. The API response displays with the 200 code, indicating success, and the Response body displays details of the user account including user name, full name, name and ID of the user role, name and ID of the organization, user permissions, and more.
    apidoc7