Common Endpoint Actions

As mentioned earlier, Data consumer endpoints represent a connection point for querying its associated record for generating reports. Most of these endpoints have read/write functionality to create/update/delete datasets from their associated records, but some only have read-only functionality.

Data consumer endpoints have a common set of actions for accessing associated records:

autocomplete.json

Finds all existing records with name that begins with provided string referred to as parameter term.

matapi-action-autocomplete

 

choices.json

Finds all existing records matching provided filter criteria and return a list of choices in the form of key record identifier => value record name pairs.

matapi-action-choices

 

count.json

Finds all existing records matching provided filter criteria and returns total count.

matapi-action-count

 

define.json

Returns meta information for an endpoint by providing details of accessible fields with its associated record and related endpoints; for example, fields’ name, type, required, and value choices if applicable.

matapi-action-define

 

delete.json

Deletes an existing record by its identifier; returns model data of deleted record upon success, else if record does not exists, then status_code 404 will be tossed.

 

matapi-action-define

find.json

Finds all existing records that match filter criteria and returns an array of found model data. Parameter filter syntax requirement is that can contain one or more ‘(field_name [=|!=|<|<=|>|>=|LIKE|RLIKE|BETWEEN] value)’, matching parenthesis, joined with [AND|OR], URL encoded values (example ‘Hello+World’), and no HTML tags.

 

matapi-action-find_by_ids

find_export_queue.json

Places a job into a queue to generate a report that will contain records that match provided filter criteria, and it returns a job identifier to be provided to action /export/download.json to download completed report.

matapi-action-export-download

 

get.json

Fetches existing record matching provided identifier. Returns object contain found record’s contents, or status_code 404 if not found.

 

matapi-action-get

get_current.json

Fetches an existing record which will contain information that is only permissible for viewing by current user / context.

matapi-action-get-current

 

save.json

Creates new record with data provided in an associative array of key record field name => record field value. Refer to the record’ meta information using action define.json associated with this endpoint to determine fields’ name, type, required, and value choices. Return model data of what was saved within new record.

 

matapi-action-save

validate.json

Validates if a record exists that matches to data provided within an associative array of key record field name => record field value. If a record matches provided data, then its model data is returned. Refer to the record’ meta information using action define.json associated with this endpoint to determine fields’ name, type, required, and value choices.

matapi-action-validate

 

Have a Question? Please contact support@tune.com for technical support.