Document toolboxDocument toolbox

REST API for Lookup Manager

Introduction

Now 3rd party apps can get and edit lookup tables with the newly added REST endpoints

Resources

Table

METHOD

URL

Data

METHOD

URL

Data

GET

/rest/lookuprestresource/1.0/lookup/table

Return an array of table information

Example

[ { "columns":[ { "id":4, "name":"Application" }, { "id":5, "name":"App Owner" } ], "name":"App Mapping", "id":2 } ]

 

Sample code

//Get information for all the tables def data = sendGetRequest("/rest/lookuprestresource/1.0/lookup/table/") data.each{val -> //TODO }

METHOD

URL

Data

METHOD

URL

Data

POST

/rest/lookuprestresource/1.0/lookup/table

The data should be a valid JSON string containing the following information:

  • Name of the new table

  • Columns name of the new table

Example

{ "name":"New_Table", "columns": ["Column_1, Column_2"] }

Sample code

METHOD

URL

Data

METHOD

URL

Data

PUT

/rest/lookuprestresource/1.0/lookup/table/{TABLE_NAME}

The data should be a valid JSON string containing the following information:

  • Name of the table

  • Columns name of the table

  • Mode of the action

    • append: Add the entries to the existing table. New table will be created if no existing table is found

    • overwrite: Remove the existing table and add the entries

  • Entries of the table

    • The first entry must be the column names

Example

Sample code

METHOD

URL

Data

METHOD

URL

Data

DELETE

/rest/lookuprestresource/1.0/lookup/table/{TABLE_ID}

-

Sample code

Table row

METHOD

URL

Data

METHOD

URL

Data

GET

/rest/lookuprestresource/1.0/lookup/table/{TABLE_ID}/entries

Return the an array of rows information for a table

Example

 

Sample code

Table Column

Useful Methods