GraphQL APIs

The TOS Aurora GraphQL APIs allow you to build queries for all the new features that were introduced with TOS Aurora. Older features in SecureTrack are still available using TOS REST APIs.

To learn more about GraphQL, see https://graphql.org.

You can also implement database changes in GraphQL using 'mutations', for example, to modify zone mapping. For further information about mutations and examples, see Mutations.

See the documentation of GraphQL operations and types.

GraphiQL Interactive Console

TOS Aurora has an integrated GraphQL console - GraphiQL (pronounced graphical) - in which you can perform queries and mutations on the TOS database, and view the output on the screen. The GraphiQL console includes a documentation panel on the right which provides details of all available entities. In the left side of the screen, while typing a query you can press CTRL+SPACE to view a list of valid options.

You can build a search with up to 20 levels in the hierarchy.

You can access the live version of the GraphiQL console, which is linked to your data, with the following URL:
https://<TOS URL>/v2/api/sync/graphiql

You can also access the console through SecureTrack's interface, by selecting > GraphQL APIs.

The console for SNMP queries and mutations is located at https://<TOS URL>/v2/monitor-tower/graphiql and not at https://<TOS URL>/v2/api/sync/graphiql, which is used for most GraphQL queries.

Filtering GraphQL Queries

You can apply a filter to a GraphQL query to determine which data is retrieved. The list of available filters and the format is based on the filters available in TQL. For details, see Tufin Query Language.

You can build a search with up to 20 levels in the hierarchy.

To filter a GraphQL query, enter a TQL filter between double quotation marks ("). For example, the following query is filtered to retrieve rules that have a value in the name field and were last modified in the past 90 days:

{
  rules(filter: "name exists and timeLastModified after 90 days ago") {
    values{
      name
    }
  }
}

Limiting Items Shown

Limit which items the console returns by adjusting the values in the argument "first (), offset ()". first defines how many items are shown, while offset sets the point at which the items are taken.

The maximum value for first is 500. When no limit for this option is specified, the first 100 results are returned.

When considering an entire set of relevant items, offset (0) refers to the first item, offset (1) to the second, etc.

In the example below, first (2), offset (0) returns the first two rules, starting from the first item answering the query condition.

Counting Items Retrieved

You can use count to see the number of items that match a filter. The following example displays the number of rules with a permissiveness level of High.

{
  rules(filter: "permissivenessLevel='HIGH'") {
    count
  }
}