Overview

HTTP verbs

RESTful notes tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP verbs.

Verb Usage

GET

Used to retrieve a resource

POST

Used to create a new resource

PATCH

Used to update an existing resource, including partial updates

DELETE

Used to delete an existing resource

HTTP status codes

RESTful notes tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP status codes.

Status code Usage

200 OK

The request completed successfully

201 Created

A new resource has been created successfully. The resource’s URI is available from the response’s Location header

204 No Content

An update to an existing resource has been applied successfully

400 Bad Request

The request was malformed. The response body will include an error providing further information

404 Not Found

The requested resource did not exist

Errors

Whenever an error response (status code >= 400) is returned, the body will contain a JSON object that describes the problem. The error object has the following structure:

Hypermedia

RESTful Notes uses hypermedia and resources include links to other resources in their responses. Responses are in Hypertext Application from resource to resource. Language (HAL) format. Links can be found beneath the _links key. Users of the API should not create URIs themselves, instead they should use the above-described links to navigate

Projection

We introduced the concept of projection model to provide each result set. You can get a model that fits your purpose through the projection name.

Page & Sort

For list items, the paging and sort parameters are supported. Some limited sort items are marked separately.

Authentication

In the Authorization request header, specify the token that is issued as follows.

Authorization: bearer {Token}

Resources

DataSource

Resource representations

Table 1. DataSource
Name Type Description Note

id

String

Datasource Id, Generated value, UUID

name

String

DataSource Name, In case of ENGINE type, change the name according to the internal rule to prevent duplication of DataSource in ENGINE

writable (POST)

description

String

The description of description

writable

owner

UserProfile

datasource owner

owner.username

Object

owner username

owner.fullName

Object

owner full name

owner.email

Object

owner email

connType

Enum

Data source ingestion type, Permanent ingestion type (ENGINE) / Temporary ingestion type (LIVE)

writable (POST)

srcType

Enum

Source Type such as FILE, HDFS, HIVE, JDBC, REALTIME, IMPORT, SNAPSHOT

writable (POST)

granularity

Enum

Minimum unit of aggregation in queries for time fields, SECOND/MINUTE/HOUR/DAY/WEEK/MONTH/QUARTER/YEAR

writable

segGranularity

Enum

Storage(Segment) unit in engine for time fields

writable (POST)

status

Enum

Data source status, ENABLED / BAD(Partially unavailable) / PREPARING / FAILED(Ingestion Failed) / DISABLED

published

Boolean

Whether the data source is public opened

writable

workspaces[]

Workspace

Valid if published is false, workspaces in which this data source is used.

connection

DataConnection

Connection information referenced by the data source; if srcType is JDBC, it is used as connection information when ingesting

writable (POST, Resource URL)

ingestion

DataIngestion

Data source ingestion information

fields[]

Field

Field (column) information

writable (POST)

Table 2. Field
Name Type Description Note

name

String

The name of field

description

String

The description of field

type

Enum

Data type, string(STRING)/integer(INTEGER/LONG)/decimal(FLOAT/DOUBLE)/TIMESTAMP

logicalType

Enum

Logical type, string(STRING)/integer(INTEGER/LONG)/decimal(FLOAT/DOUBLE)/TIMESTAMP/geo(GEO_POINT, GEO_LINE, GEO_POLYGON)

role

Enum

OLAP type, DIMENSION/MEASURE/TIMESTAMP

format

FieldFormat

field format

seq

Long

Field sequence

Table 3. FieldFormat
Name Type Description Note

type

String

The type of field format. time_format/time_unix/geo_point/geo_line/geo_polygon

format

String

(time_format) time format

timeZone

String

(time_format) TZ database name in this link : https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

locale

String

(time_format) 2-letter locale such as en, ko.

unit

Enum

(time_unix) unix time unit. SECOND / MILLISECOND

originalSrsName

String

(geo_x) Original SRS name (coordinate system name)

maxLevels

Integer

(geo_x) Geo index level

Table 4. IngestionInfo
Name Type Description Note

type

String

Ingestion source type, local/hdfs/realtime/JDBC(single, batch, link)

rollup

Boolean

The concept of "rollup" is based on druid. Druid can summarize raw data at processing time using roll-up options. A rollup is a primary aggregation operation on a selected set of columns that reduces the size of the stored segment. We also use the roll-up option to improve the performance of some query operations. However, if the data in each row is meaningful, you can set the rollup option to false and ingest. In fact, most usability is in this case, so we changed the default to false

tunningOptions

Map

Specifies additional options of type key / value.

intervals

Array

Specify the range to ingest. Constructs an interval with a combination of start and end times with a "ISO 8601" time format. ex. [start/end,start/end,…​]

format

Object

data format information

format.type

String

csv/excel/json/orc

format.delimeter

String

(csv) column delimeter

format.sheetIndex

Integer

(excel) Sheet index

format.dataType

String

(single, batch, link) DB data type, TABLE, QUERY

format.schema

String

(single, batch, link) The name of the schema(database) to query

format.query

String

(single, batch, link) If the dataType attribute is TABLE, enter the table name. If it is QUERY, enter the query statement

format.fetchSize

String

(single, batch, link) Specify the maximum number of rows that can be retrieved from db at a time.

format.maxLimit

String

(single, batch, link) Maximum number of rows to fetch

path

String

(local) file path to ingest. (Must be a recognizable Path within the server.)

removeFirstRow

String

(local) True if the column header exists

paths

String

(hdfs) Path list in HDFS

findRecursive

Boolean

(hdfs) If the path information is a directory, whether files in the sub-directory are also included in the ingestion path list

jobProperties

Map

(hdfs, hive) Specifies the MR Job attribute to perform when ingestion.

Methods

List

Returns datasources on the specified conditions.

HTTP request
(GET) /api/datasources(?projection)
Parameters
Table 5. Optional query parameters
Parameter Name Type Description Note

connType

string

The type of connection - ENGINE, LINK

srcType

string

The type of origin source (FILE/JDBC/HDFS/HIVE/REALTIME)

published

boolean

Whether the data source is public opened

nameContains

string

The string to be included in the data source name

searchDateBy

enum

Based on "CREATED" / "MODIFIED"

from

string

Search start date, ISO DATE_TIME(yyyy-MM-dd’T’HH:mm:dd.SSSZ) format

from

string

Search end date, ISO DATE_TIME(yyyy-MM-dd’T’HH:mm:dd.SSSZ) format

Response

If successful, this method returns list of projection model in the response body.

Get

Returns a datasource.

HTTP request
(GET) /api/datasources/{datasourceId}(?projection)
Parameters
Table 6. Path parameters
Parameter Name Type Description Note

datasoureId

string

datasource Id

Response

If successful, this method returns projection model in the response body.

Create

Creates a DataSource

HTTP request
(POST) /api/datasources
Parameters

None

Request Body
Request body structure
{
  "name": "string",
  "description": "string",
  "dsType": "enum",
  "connType": "enum",
  "srcType": "enum",
  "granularity": "enum",
  "segGranularity": "enum",
  "published": false,
  "connection": "/api/connections/{connectionId}",
  "fields": [
    {
      "seq": 0,
      "name": "string",
      "alias": "string",
      "description": "string",
      "type": "enum",
      "role": "enum",
      "aggrType": "enum",
      "filtering": false,
      "filteringSeq": 0
    }
  ],
  "ingestion": {
    "info": {
      "type": "string",
      "dataType": "enum",
      "schema": "string",
      "query": "string",
      "path": "string",
      "removeFirstRow": false,
      "paths": ["string"],
      "findRecursive": false,
      "jobProperties": {"key": "value"},
      "format": {
        "type": "string",
        "delimeter": "string",
        "lineSeparator": "string",
        "sheetIndex": 0
      }
    }
  }
}
Request body sample - for JDBC
{
  "name": "JDBCIngestion",
  "dsType": "MASTER",
  "connType": "ENGINE",
  "srcType": "JDBC",
  "granularity": "DAY",
  "segGranularity": "MONTH",
  "connection": "/api/connections/mysql-connection",
  "fields": [
    {
      "name": "time",
      "type": "TIMESTAMP",
      "role": "TIMESTAMP",
      "seq": 0
    },
    {
      "name": "d",
      "type": "TEXT",
      "role": "DIMENSION",
      "seq": 1
    },
    {
      "name": "m1",
      "type": "DOUBLE",
      "role": "MEASURE",
      "aggrType": "SUM",
      "seq": 2
    }
  ],
  "ingestion": {
    "info": {
      "type": "single",
      "schema": "polaris_datasources",
      "dataType": "TABLE",
      "query": "sample_ingestion"
    }
  }
}
Request body sample - for Local File
{
  "name": "Local File Ingestion",
  "dsType": "MASTER",
  "connType": "ENGINE",
  "srcType": "FILE",
  "granularity": "DAY",
  "segGranularity": "MONTH",
  "ingestion": {
    "type": "local",
    "path": "/tmp/sample_ingestion.csv",
    "removeFirstRow": false,
    "format": {
      "type": "csv",
      "delimiter": ","
    },
    "intervals": [
      "2000-01-01T00:00:00.000Z/2020-01-01T00:00:00.000Z"
    ]
  },
  "fields": [
    {
      "name": "event_time",
      "type": "TIMESTAMP",
      "role": "TIMESTAMP",
      "format": {
        "type": "time_format",
        "format": "yyyy-MM-dd'T'HH:mm:ssZ",
        "timeZone": "UTC",
        "locale": "en"
      },
      "seq": 0
    },
    {
      "name": "d1",
      "type": "STRING",
      "role": "DIMENSION",
      "seq": 1
    },
    {
      "name": "d2",
      "type": "STRING",
      "role": "DIMENSION",
      "seq": 2
    },
    {
      "name": "m1",
      "type": "DOUBLE",
      "role": "MEASURE",
      "seq": 3
    },
    {
      "name": "m2",
      "type": "DOUBLE",
      "role": "MEASURE",
      "seq": 4
    }
  ]
}
Request body sample - for HDFS
{
  "name": "HDFS File Ingestion",
  "dsType": "MASTER",
  "connType": "ENGINE",
  "srcType": "HDFS",
  "granularity": "DAY",
  "segGranularity": "MONTH",
  "ingestion": {
    "info": {
      "type": "hdfs",
      "paths": [
        "/tmp/sample_ingestion.csv"
      ],
      "findRecursive": false,
      "format": {
        "type": "csv"
      },
      "jobProperties": {
        "mapreduce.map.memory.mb": "1024",
        "mapreduce.reduce.memory.mb": "1024",
        "mapreduce.map.cpu.vcores": "1",
        "mapreduce.reduce.cpu.vcores": "1"
      }
    }
  }
  "fields": [
    {
      "name": "event_time",
      "type": "TIMESTAMP",
      "role": "TIMESTAMP",
      "format": {
        "type": "time_format",
        "format": "yyyy-MM-dd'T'HH:mm:ssZ",
        "timeZone": "UTC",
        "locale": "en"
      },
      "seq": 0
    },
    {
      "name": "d1",
      "type": "STRING",
      "role": "DIMENSION",
      "seq": 1
    },
    {
      "name": "d2",
      "type": "STRING",
      "role": "DIMENSION",
      "seq": 2
    },
    {
      "name": "m1",
      "type": "DOUBLE",
      "role": "MEASURE",
      "seq": 3
    },
    {
      "name": "m2",
      "type": "DOUBLE",
      "role": "MEASURE",
      "seq": 4
    }
  ]
}
Request body sample - for Hive
{
  "name": "Hive Ingestion orc partition",
  "dsType": "MASTER",
  "connType": "ENGINE",
  "srcType": "HIVE",
  "granularity": "DAY",
  "segGranularity": "MONTH",
  "ingestion": {
    "type": "hive",
    "format": {
      "type": "orc"
    },
    "source": "default.sample_ingestion_partition_parti_orc",
    "partitions": [
      {
        "dd": "21",
        "ym": "201704"
      },
      {
        "ym": "201705"
      }
    ],
    "intervals": [
      "2010-12-12/2018-01-01"
    ]
  },
  "fields": [
    {
      "name": "event_time",
      "type": "TIMESTAMP",
      "role": "TIMESTAMP",
      "format": {
        "type": "time_format",
        "format": "yyyy-MM-dd'T'HH:mm:ssZ",
        "timeZone": "UTC",
        "locale": "en"
      },
      "seq": 0
    },
    {
      "name": "d1",
      "type": "STRING",
      "role": "DIMENSION",
      "seq": 1
    },
    {
      "name": "d2",
      "type": "STRING",
      "role": "DIMENSION",
      "seq": 2
    },
    {
      "name": "m1",
      "type": "DOUBLE",
      "role": "MEASURE",
      "seq": 3
    },
    {
      "name": "m2",
      "type": "DOUBLE",
      "role": "MEASURE",
      "seq": 4
    }
  ]
}
Request body sample - for real time
{
  "name": "RealTime Ingestion",
  "dsType": "MASTER",
  "connType": "ENGINE",
  "srcType": "REALTIME",
  "granularity": "SECOND",
  "segGranularity": "HOUR",
  "ingestion": {
    "type": "realtime",
    "topic": "sample_topic",
    "consumerType": "KAFKA",
    "consumerProperties": {
      "bootstrap.servers": "localhost:9092"
    },
    "format": {
      "type": "json"
    },
    "rollup": false
  },
  "fields": [
    {
      "name": "event_time",
      "type": "TIMESTAMP",
      "role": "TIMESTAMP",
      "format": {
        "type": "time_format",
        "format": "yyyy-MM-dd'T'HH:mm:ssZ",
        "timeZone": "UTC",
        "locale": "en"
      },
      "seq": 0
    },
    {
      "name": "d1",
      "type": "STRING",
      "role": "DIMENSION",
      "seq": 1
    },
    {
      "name": "d2",
      "type": "STRING",
      "role": "DIMENSION",
      "seq": 2
    },
    {
      "name": "m1",
      "type": "DOUBLE",
      "role": "MEASURE",
      "seq": 3
    },
    {
      "name": "m2",
      "type": "DOUBLE",
      "role": "MEASURE",
      "seq": 4
    }
  ]
}
Response

If successful, this method returns a Datasource resource in the response body and 201 status.

Update

Updates a datasource, This method supports patch semantics. The field values you specify replace the existing values.

HTTP request
(PATCH) /api/datasources/{datasourceId}
Parameters
Table 7. Path parameters
Parameter Name Type Description Note

datasoureId

string

datasource Id

Request Body
Request body structure
{
  "name": "string",
  "description": "string",
  "published": false
}
Response

If successful, this method returns a Datasource resource in the response body.

Delete

Deletes a datasource

HTTP request
(DELETE) /api/datasources/{datasourceId}
Parameters
Table 8. Path parameters
Parameter Name Type Description Note
Request body

Do not supply a request body with this method.

Response

If successful, this method returns an empty response body and 204 status.

DataSource Query

Resource representations

Table 9. SearchQueryRequest
Name Type Description Note

dataSource

DataSource

Datasource information to query

userFields[]

UserDefinedField

Specifies User-defined field

filters[]

Filter

Filter information

projections[]

Field

Field information to query

If the aggregationType in the MeasureField that you declare is null or 'NONE', then the Select statement is performed; otherwise, the GroupBy statement is performed.

limits

Limit

Maximum row counts

resultFormat

SearchResultFormat

Specifies the format for query results.

resultForward

ResultForward

Decide where to place the query results.

Table 10. CandidateQueryRequest
Name Type Description Note

dataSource

DataSource

Datasource information to query

filters[]

Filter

Filter information

userFields

UserDefinedField

Specifies User-defined field

searchWord

String

search word

targetField

Field

Target field

sortBy

Enum

Sort criteria, "COUNT", "VALUE"

limit

Integer

Limitation of candidated contents

Table 11. DataSource
Name Type Description Note

type

Enum

Type of Datasource, "default", "mapping"

For the default type, the data source name can be specified as a string.

name

String

Name of the Main (Left) datasource to query

Must be specified in 'engineName' property of the datasource.

keyPair

Map

(mapping) The pair of the field name to be joined, the key part is the field name in the left area, and the value part is the field name in the right area

join

Object

(mapping) Join (Right) Datasource information

join.name

String

Name of the datasource to join

join.joinAlias

String

Specifies the join name when a subjoin datasource exists. The default value is join.{right datasource name}

join.type

Enum

Specifies join type, Currently we are supporting "INNER", "LEFT_OUTER" and "RIGHT_OUTER".

join.join

Object

Join target DataSource when sub-join datasource exists

join.keyPair

Map

The pair of join target field name, when a sub-join datasource exists

Table 12. Filter
Name Type Description Note

type

Enum

Type of Filter, "include", "like", "regexpr", "expression", "measure", "time_list", "time_relative", "time_range")

field

String

field name

ref

String

Specifies the target to which the field refers such as Data source name or user-definedField name.

valueList

Array

(include / time_list) List of values within the selected field

intervals

Array

(time_range) Specify in time format appropriate for timeUnit. The types that can be input are as follows : 'datetime/datetime', 'datetime/period', 'period/datetime', 'period/datetime/period'

ex. if timeUnit is 'DAY' , 2018-05-19/2018-05-20, "2018-05-20/P2D", …​
※ Time format by time unit
- SECOND: "yyyy-MM-dd HH:mm:ss"
- MINUTE: "yyyy-MM-dd HH:mm"
- HOUR: "yyyy-MM-dd HH"
- DAY: "yyyy-MM-dd"
- WEEK: "xxxx-ww"
- MONTH: "yyyy-MM"
- QUARTER: "yyyy-q"
- YEAR: "yyyy"

timeUnit

Enum

(time_list / time_range / time_relative) Time units, "SECOND", "MINUTE", "HOUR", "DAY", "WEEK", "MONTH", "QUARTER", "YEAR", "NONE"

byTimeUnit

Enum

(time_list) by timeUnit, "MINUTE", "HOUR", "DAY", "WEEK", "MONTH", "QUARTER", "YEAR"

discontinuous

Boolean

(time_list) Discontinuity

tense

Enum

(time_relative) Relative base point, "PREVIOUS", "CURRENT", "NEXT"

expr

String

(like) Support wildcard related characters ('_', '%'), escape character ('\')
(regexpr) Regular Expression
(expression) Specifying expression supported in the engine

Table 13. Field
Name Type Description Note

type

Enum

Field role, "dimension", "measure", "timestamp"

name

String

The name of field

alias

String

Alias

ref

String

Specifies the target to which the field refers such as Data source name or user-definedField name.

granularity

Enum

(timestamp) timeserise aggregation unit, "SECOND", "MINUTE", "HOUR", "DAYOFWEEK", "WEEK", "MONTH", "QUARTER", "YEAR"

In addition to fixed granularity, duration can be specified. ex1. ISO8601 Period format : {"type":"period","period":"P2M","timeZone":"UTC","origin":"2000-01-01T00:00:00.000Z"} ex2. Millisecond format : {"type": "duration","duration": "5184000000","origin": "2000-01-01T00:00:00Z"}

timeUnit

Enum

(timestamp, dimension) display format "SECOND", "MINUTE", "HOUR", "DAYOFWEEK", "WEEK", "MONTH", "QUARTER", "YEAR"

timeZone

String

(timestamp, dimension) timezone, follow as this link : http://joda-time.sourceforge.net/timezones.html, default 'UTC'

locale

Enum

(timestamp, dimension) language locale, default 'en'

aggregationType

Eumn

(measure) the type of aggregation, "NONE", "MIN", "MAX", "COUNT", "SUM", "AVG", "STDDEV", "MEDIAN", "AREA", "RANGE", "PERCENTILE", "FIRST", "LAST"

For "first", "last" aggregation, It queries the result sorted by the timestamp role column

options

String

(measure) Options related to aggregation type. Configure as key1 = value1, key2 = value2,

Percentile requires a value between 0 and 1 (ex. value=0.75)

Table 14. UserDefinedField
Name Type Description Note

type

Enum

Type of user-defined field, "user_expr", "user_param", "user_map"

Currently, only the "user_expr" type is supported.

name

String

The name of user-defined field

ref

String

Specifies the target to which the field refers such as Data source name or user-definedField name.

expr

String

(user_expr) Expression

roleType

Enum

(user_expr) Field role, "MEASURE", "DIMENSION"

Methods

Searches datasource on engine.

HTTP request
(POST) /api/datasources/query/search
Request Body
Request body select sample
{
    "dataSource": {
        "type": "default",
        "name": "sales_geo"
    },
    "filters": [
        {
            "type": "time_range",
            "field": "ShipDate",
            "timeUnit": "NONE",
            "intervals": [
                "EARLIEST_DATETIME/2011-05-19 12:00:00",
                "2014-05-19 16:00:23/LATEST_DATETIME"
            ],
            "timeZone": "UTC",
            "locale": "en"
        }
    ],
    "projections": [
        {
            "type": "timestamp",
            "name": "OrderDate",
            "alias": "OrderDate",
            "format": {
                "type": "time_format",
                "format": "yyyy-MM-dd HH:mm:ss",
                "timeZone": "UTC",
                "locale": "en"
            }
        },
        {
            "type": "dimension",
            "name": "City",
            "alias": "City"
        },
        {
            "type": "dimension",
            "name": "Sub-Category",
            "alias": "Sub-Category"
        },
        {
            "type": "dimension",
            "name": "Category",
            "alias": "Category"
        },
        {
            "type": "measure",
            "name": "Sales",
            "alias": "Sales",
            "aggregationType": "NONE",
            "userDefinedAlias": "Sales"
        }
    ],
    "userFields": [

    ],
    "limits": {
        "limit": 1000,
        "sort": [
            {
                "field": "OrderDate",
                "direction": "DESC"
            }
        ]
    },
    "metaQuery": false,
    "preview": false
}
Request body GroupBy sample
{
    "dataSource": {
        "type": "default",
        "name": "sales_geo"
    },
    "filters": [
        ...
    ],
    "projections": [
        {
            "type": "dimension",
            "name": "Category"
        },
        {
            "type": "timestamp",
            "name": "OrderDate",
            "format": {
                "type": "time_continuous",
                "discontinuous": false,
                "unit": "YEAR"
            }
        },
        {
            "type": "measure",
            "name": "Discount",
            "alias": "AVG(Discount)"
            "aggregationType": "AVG"
        }
    ],
    "limits": {
        "limit": 20,
        "sort": [
            {
                "field": "SUM(Discount)",
                "direction": "ASC"
            }
        ]
    }
}
Response

If successful, this method returns list of result format in the response body.

Candidate

Returns cadidated contents of field.

HTTP request
(POST) /api/datasources/query/candidate
Request Body
Request body sample
{
    "dataSource": "sales",
    "filters": [
        {
            "type": "include",
            "field": "State",
            "valueList": [
                "Texas"
            ]
        }
    ],
    "targetField": {
        "type": "dimension",
        "name": "Category"
    },
    "sortBy": "COUNT",
    "limit": 100
}
Response

If successful, this method returns following structure in the response body.

Response body structure - for timestamp field
{
  "minTime": "yyyy-MM-ddTHH:mm:ss.SSSZ"
  "maxTime": "yyyy-MM-ddTHH:mm:ss.SSSZ"
  "minValue": "string"                 # If Dimension Role and DataType is Timestamp, the original value is also included in the result.
  "minValue": "string"                 #
}
Response body structure - for dimension field
[
    {
        "field": "string",
        "count": 0
    }
    ...
]

Dashboard

Dashboard representations

Table 15. Dashboard
Property Name Type Description Note

id

string

Dashboard ID, Generated value, UUID

name

string

Dashboard name

Max size = 150

description

string

Dashboard description

Max size is 1000 (bytes)

configuration

Object (BoardConfiguration)

Dashboard configuration

temporaryId

string

Temporary Datsource ID

tag

string

Dashboard Tag

imageUrl

string

Dashboard (preview) image url

hiding

boolean

if true, hide dashboard in workbook for viewer

seq

int

Dashboard sequence in workbook

workbook

Object (Workbook)

Workbook including this dashboard

datasources

Object (Datasource)

Datasource set that used by this dashboard

widgets

Object (Widget)

Widget information in this dashboard

Projection Models

Table 16. 'default' Projection
Name Type Description Note

id

string

Asset identifier, Generated value, UUID

name

string

Dashboard name

Max size = 150

description

string

Dashboard description

Max size is 1000 (bytes)

imageUrl

string

Dashboard (preview) image url

tag

string

Dashboard Tag

Table 17. 'forListView' Projection
Name Type Description Note

id

string

Asset identifier, Generated value, UUID

name

string

Dashboard name

Max size = 150

description

string

Dashboard description

Max size is 1000 (bytes)

imageUrl

string

Dashboard (preview) image url

tag

string

Dashboard Tag

hiding

boolean

if true, hide dashboard in workbook for viewer

seq

int

Dashboard sequence in workbook

Methods

Get all dashboards

Listing all dashboards

HTTP request

(GET) /api/dashboards

Response

Return values are determined by the Projection Models

Example response
---
{
    "_embedded": {
        "dashboards": [
            {
                "name": "asd",
                "id": "13d3d6e0-6a26-464e-b1d7-42797ce72493",
                "modifiedBy": {
                    "type": "user",
                    "username": "admin",
                    "fullName": "Administrator",
                    "email": "admin@metatron.com"
                },
                "modifiedTime": "2019-01-28T03:37:55.521Z",
                "createdBy": {
                    "type": "user",
                    "username": "admin",
                    "fullName": "Administrator",
                    "email": "admin@metatron.com"
                },
                "createdTime": "2019-01-24T05:21:33.073Z",
                "imageUrl": "metatron://images/page/13d3d6e0-6a26-464e-b1d7-42797ce72493",
                "_links": {
                    "self": {
                        "href": "http://localhost:8180/api/dashboards/13d3d6e0-6a26-464e-b1d7-42797ce72493"
                    },
                    "dashboard": {
                        "href": "http://localhost:8180/api/dashboards/13d3d6e0-6a26-464e-b1d7-42797ce72493{?projection}",
                        "templated": true
                    },
                    "workBook": {
                        "href": "http://localhost:8180/api/dashboards/13d3d6e0-6a26-464e-b1d7-42797ce72493/workbook"
                    },
                    "dataSources": {
                        "href": "http://localhost:8180/api/dashboards/13d3d6e0-6a26-464e-b1d7-42797ce72493/datasources"
                    },
                    "widgets": {
                        "href": "http://localhost:8180/api/dashboards/13d3d6e0-6a26-464e-b1d7-42797ce72493/widgets"
                    }
                }
            },
            {
                "name": "sad",
                "id": "ba8cb902-e183-4c9c-a94d-d9fd32735442",
                "modifiedBy": {
                    "type": "user",
                    "username": "admin",
                    "fullName": "Administrator",
                    "email": "admin@metatron.com"
                },
                "modifiedTime": "2019-02-08T08:37:44.001Z",
                "createdBy": {
                    "type": "user",
                    "username": "admin",
                    "fullName": "Administrator",
                    "email": "admin@metatron.com"
                },
                "createdTime": "2019-02-08T08:37:43.758Z",
                "_links": {
                    "self": {
                        "href": "http://localhost:8180/api/dashboards/ba8cb902-e183-4c9c-a94d-d9fd32735442"
                    },
                    "dashboard": {
                        "href": "http://localhost:8180/api/dashboards/ba8cb902-e183-4c9c-a94d-d9fd32735442{?projection}",
                        "templated": true
                    },
                    "workBook": {
                        "href": "http://localhost:8180/api/dashboards/ba8cb902-e183-4c9c-a94d-d9fd32735442/workbook"
                    },
                    "dataSources": {
                        "href": "http://localhost:8180/api/dashboards/ba8cb902-e183-4c9c-a94d-d9fd32735442/datasources"
                    },
                    "widgets": {
                        "href": "http://localhost:8180/api/dashboards/ba8cb902-e183-4c9c-a94d-d9fd32735442/widgets"
                    }
                }
            },
            {
                "name": "asd",
                "id": "b92f8465-8a5c-4901-81a9-0b015e369c63",
                "modifiedBy": {
                    "type": "user",
                    "username": "admin",
                    "fullName": "Administrator",
                    "email": "admin@metatron.com"
                },
                "modifiedTime": "2019-03-26T08:53:41.011Z",
                "createdBy": {
                    "type": "user",
                    "username": "admin",
                    "fullName": "Administrator",
                    "email": "admin@metatron.com"
                },
                "createdTime": "2019-03-26T08:53:40.950Z",
                "_links": {
                    "self": {
                        "href": "http://localhost:8180/api/dashboards/b92f8465-8a5c-4901-81a9-0b015e369c63"
                    },
                    "dashboard": {
                        "href": "http://localhost:8180/api/dashboards/b92f8465-8a5c-4901-81a9-0b015e369c63{?projection}",
                        "templated": true
                    },
                    "workBook": {
                        "href": "http://localhost:8180/api/dashboards/b92f8465-8a5c-4901-81a9-0b015e369c63/workbook"
                    },
                    "dataSources": {
                        "href": "http://localhost:8180/api/dashboards/b92f8465-8a5c-4901-81a9-0b015e369c63/datasources"
                    },
                    "widgets": {
                        "href": "http://localhost:8180/api/dashboards/b92f8465-8a5c-4901-81a9-0b015e369c63/widgets"
                    }
                }
            }
        ]
    },
    "_links": {
        "self": {
            "href": "http://localhost:8180/api/dashboards{?page,size,sort,projection}",
            "templated": true
        },
        "profile": {
            "href": "http://localhost:8180/api/profile/dashboards"
        },
        "search": {
            "href": "http://localhost:8180/api/dashboards/search"
        }
    },
    "page": {
        "size": 20,
        "totalElements": 3,
        "totalPages": 1,
        "number": 0
    }
}
---

Get a dashboard

Get detail a dashboard

HTTP request

(GET) /api/dashboards/{dashboardId}

Parameters
Table 18. Path Variable

Name

Type

Description

Note

dashboardId

string

Dashboard identifier

Response

Return values are determined by the Projection Models

Example response
---
{
    "createdBy": "admin",
    "createdTime": "2019-01-24T05:21:33.073Z",
    "modifiedBy": "admin",
    "modifiedTime": "2019-01-28T03:37:55.521Z",
    "id": "13d3d6e0-6a26-464e-b1d7-42797ce72493",
    "name": "asd",
    "configuration": {
        "options": {
            "layout": {
                "layoutType": "FIT_TO_SCREEN",
                "widgetPadding": 5
            },
            "widget": {
                "showTitle": "BY_WIDGET",
                "showLegend": "BY_WIDGET",
                "showMinimap": "BY_WIDGET"
            }
        },
        "widgets": [
            {
                "id": "5db89c46-06a7-c36e-d9b4-d22203c3e986",
                "type": "page",
                "ref": "a7a89473-60a9-4986-9e3f-2bb6b50616c7",
                "title": false
            },
            {
                "id": "89b2abbf-4911-3840-eb32-92014f3dddf0",
                "type": "page",
                "ref": "ec796d6b-abff-437f-b141-5a325a711169",
                "title": false
            }
        ],
        "dataSource": {
            "joins": [],
            "temporary": false,
            "id": "ds-gis-37",
            "name": "sales_geo",
            "uiDescription": "Sales data (2011~2014)",
            "type": "default"
        },
        "filters": [],
        "relations": [
            {
                "ref": "a7a89473-60a9-4986-9e3f-2bb6b50616c7"
            },
            {
                "ref": "ec796d6b-abff-437f-b141-5a325a711169"
            }
        ],
        "content": [
            {
                "type": "row",
                "isClosable": true,
                "reorderEnabled": true,
                "title": "",
                "content": [
                    {
                        "type": "stack",
                        "width": 50,
                        "isClosable": true,
                        "reorderEnabled": true,
                        "title": "",
                        "activeItemIndex": 0,
                        "content": [
                            {
                                "id": "5db89c46-06a7-c36e-d9b4-d22203c3e986",
                                "title": "New Chart",
                                "type": "component",
                                "componentName": "widget",
                                "componentState": {
                                    "id": "5db89c46-06a7-c36e-d9b4-d22203c3e986",
                                    "type": "page",
                                    "imageUrl": ""
                                },
                                "isClosable": true,
                                "reorderEnabled": true
                            }
                        ]
                    },
                    {
                        "type": "stack",
                        "width": 50,
                        "isClosable": true,
                        "reorderEnabled": true,
                        "title": "",
                        "activeItemIndex": 0,
                        "content": [
                            {
                                "id": "89b2abbf-4911-3840-eb32-92014f3dddf0",
                                "title": "New Chart",
                                "type": "component",
                                "componentName": "widget",
                                "componentState": {
                                    "id": "89b2abbf-4911-3840-eb32-92014f3dddf0",
                                    "type": "page",
                                    "imageUrl": ""
                                },
                                "isClosable": true,
                                "reorderEnabled": true
                            }
                        ]
                    }
                ]
            }
        ],
        "userDefinedFields": [
            {
                "oriColumnName": "countd",
                "useChart": false,
                "useFilter": false,
                "useChartFilter": false,
                "type": "user_expr",
                "role": "MEASURE",
                "dataSource": "sales_geo",
                "alias": "countd",
                "name": "countd",
                "expr": "countd",
                "aggregated": false
            },
            {
                "oriColumnName": "",
                "useChart": false,
                "useFilter": false,
                "useChartFilter": false,
                "type": "user_expr",
                "role": "MEASURE",
                "dataSource": "sales_geo",
                "alias": "count",
                "name": "count",
                "expr": "count",
                "aggregated": false
            },
            {
                "oriColumnName": "",
                "useChart": false,
                "useFilter": false,
                "useChartFilter": false,
                "type": "user_expr",
                "role": "MEASURE",
                "dataSource": "sales_geo",
                "alias": "cntd",
                "name": "cntd",
                "expr": "COUNTD( \"City\" \n )",
                "aggregated": true
            }
        ]
    },
    "imageUrl": "metatron://images/page/13d3d6e0-6a26-464e-b1d7-42797ce72493",
    "seq": 0,
    "_embedded": {
        "workBook": {
            "name": "ㅁㄴㅇ",
            "id": "c84a2d69-dbf5-4c96-ae49-ed9dd141f15b",
            "type": "workbook",
            "modifiedBy": {
                "type": "user",
                "username": "admin",
                "fullName": "Administrator",
                "email": "admin@metatron.com"
            },
            "modifiedTime": "2019-03-26T08:53:40.950Z",
            "createdBy": {
                "type": "user",
                "username": "admin",
                "fullName": "Administrator",
                "email": "admin@metatron.com"
            },
            "createdTime": "2019-01-24T05:21:22.291Z",
            "folderId": "ROOT",
            "workspaceId": "ws-00",
            "_links": {
                "self": {
                    "href": "http://localhost:8180/api/workbooks/c84a2d69-dbf5-4c96-ae49-ed9dd141f15b{?projection}",
                    "templated": true
                },
                "dashBoards": {
                    "href": "http://localhost:8180/api/workbooks/c84a2d69-dbf5-4c96-ae49-ed9dd141f15b/dashboards"
                },
                "workspace": {
                    "href": "http://localhost:8180/api/workbooks/c84a2d69-dbf5-4c96-ae49-ed9dd141f15b/workspace"
                }
            }
        },
        "dataSources": [
            {
                "name": "sales",
                "id": "ds-gis-37",
                "modifiedBy": {
                    "type": "user",
                    "username": "polaris",
                    "fullName": "Polaris",
                    "email": "polaris@metatron.com"
                },
                "modifiedTime": "2019-01-24T01:56:12.605Z",
                "status": "ENABLED",
                "createdBy": {
                    "type": "user",
                    "username": "polaris",
                    "fullName": "Polaris",
                    "email": "polaris@metatron.com"
                },
                "published": true,
                "dsType": "MASTER",
                "createdTime": "2019-01-24T01:56:12.605Z",
                "connType": "ENGINE",
                "srcType": "IMPORT",
                "engineName": "sales_geo",
                "description": "Sales data (2011~2014)",
                "_links": {
                    "self": {
                        "href": "http://localhost:8180/api/datasources/ds-gis-37{?projection}",
                        "templated": true
                    },
                    "dashBoards": {
                        "href": "http://localhost:8180/api/datasources/ds-gis-37/dashboards"
                    },
                    "workspaces": {
                        "href": "http://localhost:8180/api/datasources/ds-gis-37/workspaces"
                    },
                    "connection": {
                        "href": "http://localhost:8180/api/datasources/ds-gis-37/connection"
                    },
                    "snapshot": {
                        "href": "http://localhost:8180/api/datasources/ds-gis-37/snapshot"
                    }
                }
            }
        ]
    },
    "_links": {
        "self": {
            "href": "http://localhost:8180/api/dashboards/13d3d6e0-6a26-464e-b1d7-42797ce72493"
        },
        "dashboard": {
            "href": "http://localhost:8180/api/dashboards/13d3d6e0-6a26-464e-b1d7-42797ce72493{?projection}",
            "templated": true
        },
        "workBook": {
            "href": "http://localhost:8180/api/dashboards/13d3d6e0-6a26-464e-b1d7-42797ce72493/workbook"
        },
        "dataSources": {
            "href": "http://localhost:8180/api/dashboards/13d3d6e0-6a26-464e-b1d7-42797ce72493/datasources"
        },
        "widgets": {
            "href": "http://localhost:8180/api/dashboards/13d3d6e0-6a26-464e-b1d7-42797ce72493/widgets"
        }
    }
}
---

Get widgets

Get a embedding url and redirect the html page

HTTP request

(GET) /api/dashboards/{dashboardId}/embed

Produce MediaType.TEXT_HTML_VALUE, so you have to set HTTP header Accept: text/html
Parameters
Table 19. Path Variable

Name

Type

Description

Note

dashboardId

string

Dashboard identifier

Table 20. Optional Parameter

Name

Type

Description

Note

widgetType

string

Searching type of widget

page, text, filter

Response

Return values are determined by the Projection Models

Example response
---

Get widgets

Listing widgets in dashboard

HTTP request

(GET) /api/dashboards/{dashboardId}/widgets

Parameters
Table 21. Path Variable

Name

Type

Description

Note

dashboardId

string

Dashboard identifier

Table 22. Optional Parameter

Name

Type

Description

Note

widgetType

string

Searching type of widget

page, text, filter

Response

Return values are determined by the Projection Models

Example response
---
{
    "_embedded": {
        "widgets": [
            {
                "name": "New Chart",
                "id": "a7a89473-60a9-4986-9e3f-2bb6b50616c7",
                "type": "page",
                "modifiedBy": {
                    "type": "user",
                    "username": "admin",
                    "fullName": "Administrator",
                    "email": "admin@metatron.com"
                },
                "modifiedTime": "2019-01-28T02:22:14.327Z",
                "createdBy": {
                    "type": "user",
                    "username": "admin",
                    "fullName": "Administrator",
                    "email": "admin@metatron.com"
                },
                "createdTime": "2019-01-28T02:22:12.261Z",
                "imageUrl": "metatron://images/page/a7a89473-60a9-4986-9e3f-2bb6b50616c7",
                "_links": {
                    "self": {
                        "href": "http://localhost:8180/api/pageWidgets/a7a89473-60a9-4986-9e3f-2bb6b50616c7"
                    },
                    "widget": {
                        "href": "http://localhost:8180/api/pageWidgets/a7a89473-60a9-4986-9e3f-2bb6b50616c7{?projection}",
                        "templated": true
                    },
                    "dashBoard": {
                        "href": "http://localhost:8180/api/pageWidgets/a7a89473-60a9-4986-9e3f-2bb6b50616c7/dashBoard"
                    }
                }
            },
            {
                "name": "New Chart",
                "id": "ec796d6b-abff-437f-b141-5a325a711169",
                "type": "page",
                "modifiedBy": {
                    "type": "user",
                    "username": "admin",
                    "fullName": "Administrator",
                    "email": "admin@metatron.com"
                },
                "modifiedTime": "2019-01-28T03:37:36.989Z",
                "createdBy": {
                    "type": "user",
                    "username": "admin",
                    "fullName": "Administrator",
                    "email": "admin@metatron.com"
                },
                "createdTime": "2019-01-28T03:37:35.253Z",
                "imageUrl": "metatron://images/page/ec796d6b-abff-437f-b141-5a325a711169",
                "_links": {
                    "self": {
                        "href": "http://localhost:8180/api/pageWidgets/ec796d6b-abff-437f-b141-5a325a711169"
                    },
                    "widget": {
                        "href": "http://localhost:8180/api/pageWidgets/ec796d6b-abff-437f-b141-5a325a711169{?projection}",
                        "templated": true
                    },
                    "dashBoard": {
                        "href": "http://localhost:8180/api/pageWidgets/ec796d6b-abff-437f-b141-5a325a711169/dashBoard"
                    }
                }
            }
        ]
    },
    "_links": {
        "self": {
            "href": "http://localhost:8180/api/dashboards/13d3d6e0-6a26-464e-b1d7-42797ce72493/widgets?page=0&size=20"
        }
    },
    "page": {
        "size": 20,
        "totalElements": 2,
        "totalPages": 1,
        "number": 0
    }
}
---