Skip to main content
Eptura Knowledge Center

Access Serraview Public API

Early Access

The Public API has been released to your UAT environment.

Level: Developer

This describes how an external application can gain access to the Public API.

clipboard_ed688d2b8048c6be445ebf37120528a11.png

For further information on the end-points available in the API, the end-point documentation can be found at https://COMPANYNAME.serraview.com/docs/engage/api-docs/index.html?urls.primaryName=Public%20API%20V1%20Docs or in Serraview Public API Endpoints.

There are two methods that can be used to set up the Serraview Service Account and the Authentication Key.

Afterwards, you can prepare to make an authorized Public API call.

Method 1 - Generate and Upload Authentication Key

After you have generated the Public Key and this can be uploaded to Serraview and this will create the Service Account.

Step 1. Generate the RSA Key Pair

Set up Public API authentication requires an RSA public/private key pair (of at least 2,048 bits) the public key is uploaded to Serraview while the private is used to sign the initial auth token.

Step 2. Upload Public Key to Serraview

If you already have a key pair, the public key needs to be uploaded via Serraview Configuration.

  1. Navigate to Admin Settings > System Configure > General > Public API .

  2. Click the Public Key Upload tab.

clipboard_e0a6bc27dfb1558fc688e984bbaee2914.png

  1. You have the choice of using PEM or JWK formats.

PEM
  1. Select the PEM option, which is the common text format of the public key.

  2. In the Key field, enter the Public key and including the starts and end line.

Starts with the line:

-----BEGIN PUBLIC KEY-----

and ends with:

-----END PUBLIC KEY-----

Important

Ensure you are uploading the public key, the private key looks similar, but the header/footer lines will identify it as PRIVATE and the private key is typically longer.

JWK
  1. Select the JWK option, which is the JSON-formatted string containing the public key.

{
  "kty": "RSA",
  "n": <long random-looking string>,
  "e": <much shorter random string>,
  "kid": <long-ish hexadecimal string>
}

Important

Ensure you are uploading a public JWK; the key must have fields "n" and "e", not "p", "q", "u", "d" or others.

  1. Click the Upload Public Key button.

The success notification, “Public Key Uploaded Successfully” displays.

This will create the Account ID used to identify the account for authentication; this will be used later.

clipboard_ead2f227e3432506b81bb5cd1c11e4612.png

In the User Security, you will see the corresponding Service Account with the same Account ID.

clipboard_e090099f6a5866e4db905d97b8cdd4f3e.png

Method 2 - Create a Service Account and to generate the Authentication Key

First, you will need to create a Serraview Service Account and then this will generate the Private Key. Afterwards, you can upload this key to the Public Key.

Step 1. Create a Service Account

  1. Navigate to Resources > User Secuirty.

  2. Click the Service Account  icon.

  3. Click the + Add Service Account  icon. The Add Service Account form displays.

  4. In the Email address field, enter the email address.

The service account must be a separate email address (do not use an existing email address). For example, publicapi@mycompany.com

  1. In the Description field, enter a short description.

clipboard_e74c2ca3a9cbb0c2ad6b0e735bd0acac0.png

  1. Click the Add Service Account button and the New Service Account Created dialog displays.

clipboard_ecb39945b39c10e00fe107e8de41bbc36.png

  1. Click the Copy private key to clipboard button to keep copy of the Private Key and then paste the Private Key in a secured file .

  2. When ready, click the Okay, got it button.

The Service Account displays in the list.

Step 2. Upload Public Key

  1. Navigate to Admin Settings > System Configure > General > Public API .

clipboard_e122bd3ef43808c520d99cf56a08984a1.png

  1. Click the Upload Public Key button.

clipboard_e8c48c835b0a7d22601f368b5541f4893.png

The success notification, “Public Key Uploaded Successfully” displays.

Step 3. View the Account ID

  1. Click the General tab.

The Account ID used to identify the account for authentication; this will be used later.

The Account ID is the same as the Service Account’s Account ID.

clipboard_e0c8c292482c1cda2c3564e39a77fd5a9.png