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
  • User
  • Add
  • Display
  • Update
  • Delete
  • Assign role
  • Remove role
  • Users
  • Display
  1. implementation
  2. Platform Usage
  3. API

User API

PreviousRole APINextReporting API

Last updated 1 year ago

To use the User API, it's necessary to generate an access token.

A comprehensive toolkit, with practical usage examples, is accessible on .

This toolkit comes pre-installed as a default component within the on-premises platform, located at /datasentinel/soft/datasentinel_toolkit.

User

Add

POST https://<<platform-server>>/ds-api/users/{email}

Create a User

Path Parameters

Name
Type
Description

email*

String

Headers

Name
Type
Description

user-token*

String

Generated Access Token

Request Body

Name
Type
Description

password

String

User Password Required for Regular users

privilege

String

Possible values: read, read write or admin Default: admin

profile

String

Possible values: developer or data admin Default: data admin

live_360

String

roles

String array

role

String

comment

String

ldap

Boolean

Default: false

Response

{
  "status": "User with login <<user>> created successfully"
}

Two Flavors of User Access

  • Regular Users: The Standard Access. You need to specify a password

JSON body example
{
  "password": "myPassword",
  "privilege": "admin",
  "profile": "data admin",
  "live_360": 1,
  "roles": ["role_1", "role_2"],
  "comment": "My comment"
}
  • LDAP Users: For Seamless Network Integration You need to set the ldap value to true.

This POST request assigns privileges to a user authenticated through LDAP.

JSON body example
{
  "ldap": true,
  "privilege": "admin",
  "profile": "data admin",
  "live_360": 1,
  "roles": [],
  "comment": "My comment"
}

Display

GET https://<<platform-server>>/ds-api/users/{email}

Display User Attributes

Path Parameters

Name
Type
Description

email*

String

Headers

Name
Type
Description

user-token*

String

Generated Access Token

Response

Example
{
    "id": 54,
    "login": "username",
    "email": "userName@myCompany.com",
    "profile": "data admin",
    "privilege": "admin",
    "roles": ["role_1", "role_2"],
    "live_360": 1,
    "comment": "My comment"
}

Update

PUT https://<<platform-server>>/ds-api/users/{email}

Update User Properties

Path Parameters

Name
Type
Description

email*

String

Headers

Name
Type
Description

user-token*

String

Generated Access Token

Request Body

Name
Type
Description

password

String

User Password

privilege

String

Possible values: read, read write or admin Default: admin

profile

String

Possible values: developer or data admin Default: data admin

live_360

String

roles

String array

role

String

comment

String

Response

{
  "status": "User updated successfully!"
}

Delete

DELETE https://<<platform-server>>/ds-api/users/{email}

Delete User

Path Parameters

Name
Type
Description

email*

String

Headers

Name
Type
Description

user-token*

String

Generated Access Token

Response

Example
{
  "message": "User deleted"
}

Assign role

POST https://<<platform-server>>/ds-api/users/{email}/role/{role name}

Add an existing role to a user

Path Parameters

Name
Type
Description

email*

String

role name

String

Existing role

Headers

Name
Type
Description

user-token*

String

Generated Access Token

Response

{
    "status": "Role role_2 has been assigned to myUser@datasentinel.io"
}

Remove role

DELETE https://<<platform-server>>/ds-api/users/{email}/role/{role name}

Remove an existing role from a user

Path Parameters

Name
Type
Description

email*

String

role name

String

Existing role

Headers

Name
Type
Description

user-token*

String

Generated Access Token

Response

{
    "status": "Role role_2 has been removed from myUser@datasentinel.io"
}

{
  "error": "Invalid request"
}

Users

Display

GET https://<<platform-server>>/ds-api/users

Display All Users

Headers

Name
Type
Description

user-token*

String

Generated Access Token

Response

Example
 [
    {
        "id": 2,
        "login": "datasentinel",
        "email": "contact@datasentinel.io",
        "profile": "data admin",
        "privilege": "admin",
        "roles": [],
        "live_360": 1,
        "comment": ""
    },
    {
        "id": 54,
        "login": "username",
        "email": "userName@myCompany.com",
        "profile": "data admin",
        "privilege": "read",
        "roles": ["role_1", "role_2"],
        "live_360": 0,
        "comment": ""
    }
]

Access to Possible values: 0 or 1 Default: 1

Since version 2024.04 Roles used for

Deprecated since version 2024.04 use roles instead Role used for Default: No restriction

Refer to the on setting up LDAP authentication

Access to Possible values: 0 or 1 Default: 1

Since version 2024.04 Roles used for

Deprecated since version 2024.04 use roles instead Role used for Default: No restriction

🧩
🧩
🔗Access Token
GitHub
Documention
Live360 Feature
Role Based Access Control
Role Based Access Control
Live360 Feature
Role Based Access Control
Role Based Access Control