TrackRecordPro API Documentation TrackRecordPro

metadata endpoint

Summary

API Endpoint Address

https://api.trackrecordpro.co.uk/3.0/metadata

Minimum Supported API Version3.0
Supported Methods

GET

Access LevelEveryone
DescriptionRetrieve a complete list of all custom fields for the current companies database structure.

GET metadata

GET /3.0/metadata HTTP/1.1

Details

The metadata endpoint returns a list of all metadata attached to 'data' fields on all tables within the companies TrackRecordPro 3 database. This API call can take some time to complete as it has to aggregate the data from many tables, therefore it is advised to cache the results of this endpoint locally.

The endpoint takes no parameters.

At the top level of the returned data, each endpoint which supports metadata/custom fields is an entry in the results, e.g. "assets" and "users". Below this, all custom fields are listed, one entry per field. Each of these is itself a key with the following possible values:

Key nameDescription
display_nameThe name to use when displaying the field to the user
type

Indicates that the custom field is one of the following supported data types:

Field ValueData Type
intAn integer value
boolA boolean value
stringA string value
datetimeA date and time value
dateA date only value
optionsA list of string options
visibleSet to true if the field is to be displayed to users, otherwise false if it is API only.
constraintsOnly set for boolean or integer field types, indicates a potential upper and lower range, for use with numeric fields
optionsOnly set for options lists, contains an array of options to display in the drop down list. Facility to add extra options should be provided by any implementation.
{
    "assets": {
        "$external_id": {
            "display_name": "External ID",
            "type": "int",
            "visible": false,
            "constraints": {
                "min": 0,
                "max": 52650
            }
        },
        "costcode": {
            "display_name": "Costcode",
            "type": "string",
            "visible": true
        },
        "manufacturer": {
            "display_name": "Manufacturer",
            "type": "string",
            "visible": true
        },
        "model": {
            "display_name": "Model",
            "type": "string",
            "visible": true
        },
        "ukas": {
            "display_name": "UKAS",
            "type": "bool",
            "visible": true,
            "constraints": {
                "min": 0,
                "max": 1
            }
        },
        "$costcode": {
            "display_name": "Costcode",
            "type": "string",
            "visible": false
        },
        "next_great_hat_day": {
            "display_name": "Next Great Hat Day",
            "type": "datetime",
            "visible": true
        },
        "user_assigment": {
            "display_name": "User Assigment",
            "type": "options",
            "visible": true,
            "options": [
                "Bob"
            ]
        }
    },
    "files": {
        "ancillaries": {
            "display_name": "Ancillaries",
            "type": "string",
            "visible": true
        },
        "date_received": {
            "display_name": "Date Received",
            "type": "datetime",
            "visible": true
        },
        "po_number": {
            "display_name": "PO Number",
            "type": "int",
            "visible": true,
            "constraints": {
                "min": 0,
                "max": 97020723785
            }
        },
        "$external_id": {
            "display_name": "External ID",
            "type": "int",
            "visible": false,
            "constraints": {
                "min": 0,
                "max": 257467
            }
        },
        "certificate_number": {
            "display_name": "Certificate Number",
            "type": "string",
            "visible": true
        }
    },
    "locations": {
        "$oldid": {
            "display_name": "Old ID",
            "type": "int",
            "visible": false,
            "constraints": {
                "min": 2292,
                "max": 10419
            }
        },
        "main_site": {
            "display_name": "Main Site",
            "type": "bool",
            "visible": true,
            "constraints": {
                "min": 0,
                "max": 1
            }
        },
        "postcode": {
            "display_name": "Postcode",
            "type": "options",
            "visible": true,
            "options": [
                "DE23 8YL",
                "DE24 8UP",
                "NG21 9EN"
            ]
        },
        "number_of_staff": {
            "display_name": "Number Of Staff",
            "type": "int",
            "visible": true,
            "constraints": {
                "min": 0,
                "max": 23
            }
        },
        "bondarea_paul": {
            "display_name": "Bondarea Paul",
            "type": "bool",
            "visible": true,
            "constraints": {
                "min": 0,
                "max": 1
            }
        },
        "managers": {
            "display_name": "Managers",
            "type": "options",
            "visible": true,
            "options": [
                "Craig"
            ]
        }
    },
    "departments": {
        "$oldid": {
            "display_name": "Old ID",
            "type": "int",
            "visible": false,
            "constraints": {
                "min": 0,
                "max": 8431
            }
        },
        "accounting_code": {
            "display_name": "Accounting Code",
            "type": "options",
            "visible": true,
            "options": [
                "AC123",
                "BC321"
            ]
        },
        "manager": {
            "display_name": "Manager",
            "type": "options",
            "visible": true,
            "options": [
                ""
            ]
        },
        "date_of_last_departmental_review": {
            "display_name": "Date Of Last Departmental Review",
            "type": "datetime",
            "visible": true
        }
    },
    "companies": [],
    "users": {
        "$external_id": {
            "display_name": "External ID",
            "type": "int",
            "visible": false,
            "constraints": {
                "min": 8,
                "max": 15679
            }
        }
    },
    "externaltypes": [],
    "assetqueue": []
}

Field Definitions

This endpoint is not directly backed by a database table.