Search Results for

    Show / Hide Table of Contents

    CustomQueries

    Queryable, Introduced in version 26.6

    GET https://localhost:8001/sv/001.1/api/v1/Common/CustomQueries
    

    A custom SQL query that can be run through the API with RunCustomQuery.

    Custom queries are created and maintained in the procedure Custom queries in Monitor. Use this entity to look up the QueryId of a query and the parameters it accepts before running it.

    Only active queries are returned. A query being listed does not mean the current user may run it: availability to the user is checked when the query is run.

    Change log

    Filter EntityChangeLog.EntityTypeId by the GUID below to find changes to this entity. See Entity GUIDs for how entity GUIDs are used.

    a417e60a-cae8-4fe8-a7dd-2dbbbadb37ac
    

    Properties

    Name Type Summary Introduced in
    Id Int64 The business key identifier of the custom query.
    QueryNumber String The number of the custom query, e.g. ORDERS. It is shown as Number in the procedure
    Custom queries in Monitor and is always in upper case.
    Description String The description of the custom query, at most 50 characters.
    QueryId Guid The unique id of the custom query, e.g. 3F2504E0-4F89-41D3-9A0C-0305E82C3301.
    It is shown as Unique Id in the procedure Custom queries in Monitor.

    Use this value to identify the query in RunCustomQuery. It never
    changes, and a query delivered to several systems keeps the same unique id in all of them, so it can be
    stored in an integration. A copy of a query gets a new unique id.
    Parameters CustomQueryParameters[] The parameters defined on the custom query. Bind values to these by name when running the query with
    RunCustomQuery. Parameters that are not given a value use their DefaultValue.

    • Expandable

    Example

    To find the query with the number ORDERS and the parameters it accepts, filter on QueryNumber and expand Parameters:

    $filter=QueryNumber eq 'ORDERS'&$expand=Parameters
    

    Pass the returned QueryId to RunCustomQuery.

    JSON

    {
      "Id": 0,
      "QueryNumber": null,
      "Description": null,
      "QueryId": "00000000-0000-0000-0000-000000000000",
      "Parameters": null
    }
    
    In This Article
    Back to top Copyright © 2026 Monitor ERP System AB