Discovery API

The Discovery API is meant for developers to get the definition of the different data structures in the Agillic solution. Discovery have been implement for Person Data, One-to-Many Tables, Global Data and Global Data Tables

To get the definition(metadata) of the table the following APIs can be used.

Person Data

Person Data makes up the fields of Recipients, which can be fetched using the Discovery API for Person Data:

curl https://api-eu1.agillic.net/discovery/persondata

This will return definition of all the Person Data fields for Recipients in JSON:

One-to-Many Tables

The list of One-to-Many Tables defined in the solution can be found by:

curl -X GET https://api-eu1.agillic.net/discovery/onetomany

Which will return a list of table names:

[
    "CARS",
    "DESTINATIONS",
    "ARRANGEMENT",
    "VIDEO",
    "RECOMMENDATION TO PRODUCT",
    "LANGUAGE TO LINK",
    "CHECKIN",
    "TRIPS",
    "OTM",
    "VOUCHERS",
    "WEBINAR",
    "RECOMMENDATION",
    "EVENT",
    "ARTICLE TO STORY",
    "PURCHASE",
    "ACCOUNT",
    "PRODUCT",
    "WINBACK",
    "KONTI",
    "USER TO ACCOUNTS",
    "AID",
    "PARKING",
    "SUBSCRIPTION_MAIL",
    "DONATION",
    "ACCOUNTS",
    "PRIMARY CAT TO PRODUCT"
]

One-to-Many Table

The fields definition of an One-to-Many table can be retrieved using following endpoint:

curl -X GET https://api-eu1.agillic.net/discovery/onetomany/PURCHASE

This will return:

{
    "name": "PURCHASE",
    "fields": [
        {
            "name": "PRODUCT_ID",
            "identifier": false,
            "type": "STRING"
        },
        {
            "name": "STATUS",
            "identifier": false,
            "type": "STRING"
        },
        {
            "name": "NAME",
            "identifier": false,
            "type": "STRING"
        },
        {
            "name": "LOCATION",
            "identifier": false,
            "type": "STRING"
        },
        {
            "name": "PRICE",
            "identifier": false,
            "type": "NUMBER"
        },
        {
            "name": "ID",
            "identifier": true,
            "type": "STRING"
        },
        {
            "name": "SIZE",
            "identifier": false,
            "type": "NUMBER"
        }
    ]
}

Global Data

The list of global data variable defined can be retrieved doing a GET on the Global Data API:

curl -X GET https://api-eu1.agillic.net/discovery/globaldata/

will return a array of global data with their name, type and the description:

[
  {     
    "NAME":"COMPANY", 
    "TYPE":"STRING", 
    "DESCRIPTION": "Name of the company" 
  },
  { 
    "NAME":"YEAR", 
    "TYPE":"NUMBER", 
    "DESCRIPTION": "Current year" 
  },
  { 
    "NAME":"MONTH", 
    "TYPE":"STRING", 
    "DESCRIPTION": "Current month" 
  },
  ...
]

Global Data Tables

The list of Global Data Tables defined in the solution can be found by:

curl -X GET https://api-eu1.agillic.net/discovery/globaldata/tables

Which will return a list of table names:

[
    "PRODUCT",
    "BRAND",
    "DISCOUNT",
    "VIDEO",
    "KURSER",
    "DISCOUNT_COPY",
    "LINKS",
    "ARTIKEL",
    "SUBSCRIPTION_MAIL",
    "TEST_TABLE_1",
    "REJSEKONSULENT",
    "ACCOUNTS",
    "STORE",
    "BOOK",
    "ARRANGEMENT",
    "TANK",
    "STORY"
]

Global Data Table

The fields definition can be retrieved using following endpoint:

curl -X GET https://api-eu1.agillic.net/discovery/globaldata/tables/PRODUCTS

This will return:

{
    "name": "PRODUCT",
    "description": "Product table",
    "fields": [
        {
            "name": "LINK",
            "identifier": false,
            "type": "STRING"
        },
        {
            "name": "TYPE",
            "identifier": false,
            "type": "STRING"
        },
        {
            "name": "DESCRIPTION",
            "identifier": false,
            "type": "STRING"
        },
        {
            "name": "CATEGORY",
            "identifier": false,
            "type": "STRING"
        },
        {
            "name": "BRAND",
            "identifier": false,
            "type": "STRING"
        },
        {
            "name": "ORGPRICE",
            "identifier": false,
            "type": "NUMBER"
        },
        {
            "name": "AGEGROUP",
            "identifier": false,
            "type": "STRING"
        },
        {
            "name": "IMAGE_LINK",
            "identifier": false,
            "type": "STRING"
        },
        {
            "name": "COLOR",
            "description": "Color of the product",
            "identifier": false,
            "type": "STRING"
        },
        {
            "name": "TITLE",
            "description": "The Product Title",
            "identifier": false,
            "type": "STRING"
        },
        {
            "name": "GENDER",
            "identifier": false,
            "type": "STRING"
        },
        {
            "name": "AVAILABILITY",
            "identifier": false,
            "type": "NUMBER"
        },
        {
            "name": "SIZE",
            "identifier": false,
            "type": "STRING"
        },
        {
            "name": "ID",
            "identifier": true,
            "type": "STRING"
        },
        {
            "name": "PRICE",
            "identifier": false,
            "type": "NUMBER"
        }
    ]
}

API Documentation