RestBI Documentation
  • Welcome to RestBI
  • Getting Started
    • Quickstart Guide for RestBI
    • Installation
      • Docker Compose
      • Kubernetes
  • Object Definitions
    • Data Model
      • Model
      • Connection
      • Table
      • Join
      • Column
      • Formula
      • ValidationResult
    • Query
      • Query
      • QueryFilter
      • SQLResult
  • SDK
    • Overview
    • Reference
      • RestBIClient
      • executeQuery
      • getMetadata
      • validateModel
  • API
    • Overview
    • Reference
      • POST /query
      • POST /validate
      • POST /metadata
      • GET /
  • Examples
    • RestBI Demo App
      • Installation
      • Report Builder
      • Drill Anywhere
      • Model Helper
Powered by GitBook
On this page
  1. API
  2. Reference

POST /metadata

PreviousPOST /validateNextGET /

Last updated 9 months ago

Description: Retrieves metadata (and details) from the database based on the provided details.

Request Body:

  • Type:

  • Description: A JSON object with connection details to the database.

Example Request:

{
  "id": "2",
  "name": "Chinook",
  "host": "localhost",
  "port": 5432,
  "user": "postgres",
  "password": "test",
  "database": "chinook",
  "type": "POSTGRES"
}

Response:

  • 200 OK:

    • Type: []

    • Body: A JSON array of Table objects, each containing columns.

  • 500 Internal Server Error:

    • Type: SQLError

    • Body:

CURL Example:

curl -X POST http://localhost:3000/metadata \
  -H "Content-Type: application/json" \
  -d '{
        "id": "2",
        "name": "Chinook",
        "host": "localhost",
        "port": 5432,
        "user": "postgres",
        "password": "test",
        "database": "chinook",
        "type": "POSTGRES"
    }'
Table
Column
Connection
Connection
Table