MENU
    Look up a table query for a Tulip Table by id
    • 04 Mar 2025
    • 3 Minutes to read
    • Contributors

    Look up a table query for a Tulip Table by id


    Article summary

    Get
    /tables/{tableId}/query/{queryId}

    Looks up a table query for a Tulip Table by id.

    Requires the table-queries:read API key scope.

    Security
    HTTP
    Type basic

    Access to the Tulip API requires the use of HTTP Basic Authentication using the credentials of an active Tulip API Token. All requests require the Authorization HTTP header with the Basic scheme to provide API credentials unless otherwise noted.

    API tokens can be configured with a set of scopes which determine what parts of the API that specific token has access to. Security best practices dictate that API credentials be given the minimum set of capabilities required to fulfill their intended purpose. For example, an API token created for use in an integration that is only designed to use the Tables API should probably only be given the tables:read and tables:write scopes. In this way you can minimize risk in the event that API credentials are compromised. API endpoints will document what API token scopes are required to access that endpoint in their descriptions. If a request is made to an endpoint with an API token which does not have the required scopes, the response will be an authorization error.

    Path parameters
    tableId
    stringRequired

    The id of a Tulip Table.

    Pattern^[a-zA-Z0-9_]+$
    Exampleg56RCoZCtzv7borvp
    queryId
    stringRequired

    The id of a Tulip Table query.

    Pattern^[a-zA-Z0-9_]+$
    Exampleg56RCoZCtzv7borvp
    Responses
    200

    The Tulip Table query was retrieved successfully.

    Collapse all
    object

    A Tulip Table query that exists on a Tulip Table. The record object will include all the fields of the query, addition to the record's created timestamp and last updated timestamp.

    Example{ "id": "PRYGkKgnqySMcpWwr", "createdAt": "2019-01-15T17:30:01.244Z", "createdBy": "N24uug8iXSTWR39rB", "updatedAt": "2019-01-15T17:31:20.002Z", "updatedBy": "N24uug8iXSTWR39rB", "tableId": "b93Aj93KlIoaw", "label": "Basic Query", "filters": [ { "_id": "aidv93mise9", "field": "Color", "functionType": "equal", "value": { "datasourceType": "static", "params": { "value": "yellow" } } }, { "_id": "jfsa093m9ds", "field": "ID", "functionType": "notEqual", "value": { "datasourceType": "static", "params": { "value": "a" } } } ], "filterAggregator": "all", "sortOptions": [ { "sortBy": "Color", "sortDir": "asc" } ], "limit": 1000.0 }
    _createdAt
    string (date-time)
    _updatedAt
    string (date-time)
    tableId
    string

    The ID of the Tulip Table that the query exists on.

    label
    string

    The name of the Tulip Table Query.

    filters
    Array of object (TulipTableFilter)

    The filters that are applied on this Tulip Table Query.

    object

    The filters can use any of the columns defined in the Tulip Table (including _createdAt and _updatedAt) that the query exists on with any of the functions.

    Example{ "_id": "abcdefg", "field": "Color", "functionType": "equal", "value": { "datasourceType": "static", "params": { "value": "yellow" } } }
    _id
    string
    field
    string
    functionType
    string
    Valid values[ "equal", "notEqual", "blank", "notBlank", "greaterThanOrEqual", "lessThanOrEqual", "greaterThan", "lessThan", "contains", "notContains", "startsWith", "notStartsWith", "endsWith", "notEndsWith", "isIn", "notIsIn" ]
    value
    object

    The value to compare to.

    If datasourceType is set to "app-info", then params is not required.

    If datasourceType is set to "static", then params is required.

    filterAggregator
    Valid values[ "all", "any" ]
    Default"all"
    sortOptions
    Array of object (TulipTableSortOption)

    The field and sorting direction used to sort the query results

    object

    Sorts are used to order the queries based on columns defined in the Tulip Table where the query exists.

    Example{ "sortBy": "Color", "sortDir": "asc" }
    limit
    number

    The number of records that will be returned at most from this Tulip Table query.

    400

    The request was malformed. This could mean that headers, query parameters, or the request body was unable to be parsed or had unexpected values.

    object
    errorCode
    string
    errorUniqueID
    string
    Pattern^[a-zA-Z0-9+/]+$
    Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
    details
    string
    401

    The request was made unauthorized. HTTP Basic Authorization using a Tulip API Key is required for use of the API.

    object
    errorCode
    string
    errorUniqueID
    string
    Pattern^[a-zA-Z0-9+/]+$
    Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
    details
    string
    403

    The provided authentication info was rejected. The response will provide additional details.

    object
    errorCode
    string
    errorUniqueID
    string
    Pattern^[a-zA-Z0-9+/]+$
    Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
    details
    string
    404

    The requested database entry was not found.

    object
    errorCode
    string
    errorUniqueID
    string
    Pattern^[a-zA-Z0-9+/]+$
    Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
    details
    string
    422

    The request was malformed. This could mean that headers, query parameters, or the request body was unable to be parsed or had unexpected values.

    object
    errorCode
    string
    errorUniqueID
    string
    Pattern^[a-zA-Z0-9+/]+$
    Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
    details
    string
    500

    The server encountered an unexpected error.

    object
    errorCode
    string
    errorUniqueID
    string
    Pattern^[a-zA-Z0-9+/]+$
    Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
    details
    string

    Was this article helpful?