Query

Query Upsert

Uses ALIAS name inside parsed query for ID, and either creates/updates a query.

CHANGE NOTIFICATION This api in the past has returned a single object but is changing to return an array of query objects (because posted QL text may contain more than one statement). To get the old behavior of single object pass version=old.

# new version, will be default in Sept 2017.
curl -s -XPOST "https://api.lytics.io/api/query?version=new" \
   -H "Authorization: $LIOKEY" \
   --data-binary @your_file.lql

# old version, returns object
curl -s -XPOST "https://api.lytics.io/api/query?version=old" \
   -H "Authorization: $LIOKEY" \
   --data-binary @your_file.lql

post/api/query

Request

  • Base URL
    https://api.lytics.io
  • URL
    https://api.lytics.io/api/query
  • Auth
    API key in header Authorization

Query parameters

account_idstring

Your Lytics account ID.

versionstring

Use the "new" array based response or "old" object.

Response

OK

statusstring

Example response

{
  "status": "success",
  "data": [
    {
      "id": "abcdef123",
      "updated": "2014-10-30T21:01:06.493Z",
      "created": "2014-10-30T21:01:06.493Z",
      "text": "SELECT ..."
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.