Datasentinel Docs
Visit our websiteBlogRelease Notes
  • 👋Welcome
  • 🆓Free Trial
  • 📣Release Notes
  • Getting started
    • Architecture
    • Installation
      • 🌐Platform
      • 🕶️Agent
    • PostgreSQL clusters
      • 🔌Extensions
        • 🔌pg_stat_statements
        • 🔌pg_store_plans
        • 🔌system_stats
        • 🔌pg_buffercache
      • 🕶️Monitoring User
      • ➕Adding Connection
    • FAQs
      • ❓Platform FAQ
      • ❓Agent FAQ
  • Features
    • Key Features
      • 📊Session History
      • 📊Top Queries
      • 📂Top Tables
      • 🔓Lock Explorer
      • 📈Cluster & System Metrics
      • ⌚Live360
      • 📰Reporting
      • 🔔Alerting
        • Settings
        • Templates
        • Silences
        • Manager
    • Other Features
      • 📡Agentless Monitoring
      • 🛡️Role Based Access
      • 🔂Changed Parameters
    • Tips & Hints
      • 🖥️User Interface
      • 🏷️Tags
      • 🔀Metric Correlation
      • 👁️‍🗨️Consolidated View
      • ❗Graphical Annotations
      • ☁️Predefined Providers
      • ❓Wait Event Description
      • ®️Read Replicas
      • 👁️‍🗨️Agentless & System Metrics
      • ☑️Simplified pg_instance Display
  • implementation
    • Platform Usage
      • ⚙️Configuration
        • 🔑License
        • 📓LDAP
        • ✉️SMTP
        • 📋Audit
        • 👨‍🏭Users & Roles
      • 🧩API
        • 🔗Access Token
        • 🧩Connection API
        • 🧩Role API
        • 🧩User API
        • 🧩Reporting API
        • 🧩Workload API
        • 🧩Alerting API
      • 🛠️Tooling
    • Agent Usage
      • 📣Release Notes
      • ⌨️CLI
      • 🧩API
      • 🗃️Collection Level
      • 🔬Internals
    • Upgrade
      • 🔄Platform
      • 🔄Agent
    • Troubleshooting
      • 🩺Error message: “502 Bad Gateway”
      • 🩺The UI is not displaying any metrics for my new instance.
      • 🩺UI dashboard is encountering loading errors
      • 🩺InfluxDB
  • Support
    • How to Contact Us
  • GitHub Toolkit
Powered by GitBook
On this page
  • Access Token
  • Token Creation
  • Token Infos
  1. implementation
  2. Platform Usage
  3. API

Access Token

To enable interaction with the Platform API, it is necessary to generate an access token.This access token is subsequently used when making calls to the API.

This access token will remain operational for a 24-hour period.

Access Token

Token Creation

POST https://<<platform-server>>/ds-api/user-token

Authentication is mandatory, requiring a valid username and password.

Response

{
  "user-token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1ODAyMTYyMjQsImlhdCI6MTU4MDEyOTgxOSwiZGF0YWJhc2UiOiJNYWluIE9yZy4iLCJlbWFpbCI6InRlc3RAZGF0YXNlbnRpbmVsLmlvIiwidXNlciI6InRlc3QifQ.JMDvq2JPcqz9M0_it_0UtP9y79dClVwx9pDEzCl9HTk"
}

Example
curl -u myUser:myPassword -k -X POST https://<<platform-server>>/ds-api/user-token
output
{
  "user-token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1ODAyMTYyMjQsImlhdCI6MTU4MDEyOTgxOSwiZGF0YWJhc2UiOiJNYWluIE9yZy4iLCJlbWFpbCI6InRlc3RAZGF0YXNlbnRpbmVsLmlvIiwidXNlciI6InRlc3QifQ.JMDvq2JPcqz9M0_it_0UtP9y79dClVwx9pDEzCl9HTk"
}

Token Infos

GET https://<<platform-server>>/ds-api/user-token?token={user-token}

Authentication is mandatory, requiring a valid username and password.

Query Parameters

Name
Type
Description

user-token*

String

Access Token

Response

Output example
{
    "email": "contact@datasentinel.io",
    "expire_time": "2020-04-28 13:58:53",
    "organization_name": "ds-data",
    "user": "datasentinel"
}

Example
export TOKEN=<<user_token>>
curl -u myUser:myPassword -k -X GET https://<<platform-server>>/ds-api/user-token?token=$TOKEN
output
{
    "email": "contact@datasentinel.io",
    "expire_time": "2023-04-28 13:58:53",
    "organization_name": "ds-data",
    "user": "datasentinel"
}
PreviousAPINextConnection API

Last updated 1 year ago

🧩
🔗