→ Applies to: SynetoOS 5.x

 

Access to API Keys

Step 1. Login to SynetoOS GUI

Step 2. Click on the question mark in the top right-hand corner

 

Step 3. Click on View API explorer

You'll be redirected to Syneto Doorman API

 

Step 4. Click on POST /api-keys

 

Add API Keys

Step 1. Prepare this code with the information needed (replace <name><user><resource><network/subnet><validity> with the correct information)

{
  "name": "<name>",
  "owner": "<user>",
  "scopes": [
    {
      "resource": "<resource>",
      "permissions": [ "GET" ]
    }
  ],
  "allowed_networks": [ "<network/subnet>" ],
  "validity": "<validity>"
}

name: an arbitrary name representing the app that uses the API key. For monitoring purposes, the name could be “monitoring”;

owner: any name;

resource: specifies the API endpoint for which the key is intended. For monitoring purposes, the resource could be “prometheus”;

permissions: defines the allowed methods (GET, POST, DELETE). For monitoring purposes, the correct value is “GET”;

allowed_network: indicates the networks from which the connection is allowed, with the format “0.0.0.0/0”;

validity: specifies the number of days the key will remain valid, suffixed with “d”. For example “365d” (for one year).

 

Get API Keys

Step 1. Click on GET /api-keys

 /api-keys Ottenere tutte le sezioni per recuperare tutte le chiavi API configurate.

 

Step 2. Enter the name to be provided is the one used when the API key was added (Example: monitoring)

 

Step 3. Click on Try it out

 

Delete API Keys

Step 1. Click on DELETE/api-keys

 

Step 2. Enter the name to be provided is the one used when the API key was added (Example: monitoring)

 

Step 3. Click on Try it out