Introduction
The Synqly Management API provides fast and flexible query capabilities on the individual management list APIs.
The query capabilies can be broken into categories: filtering, ordering, pagination and options.
Note: these capabilities are only available on the Management APIs -- Connector APIs may support some of these capabilities; however, there is no guarantee that they will be supported and you should check the documentation for the specific Connector API you are using.
Query capabilities
The management list APIs provider query parameters to control the list response.
Option | Category | Type | Description |
---|---|---|---|
limit | pagination | integer | Number of Integration objects to return in this page. Defaults to 100. |
start_after | pagination | string | Return Integration objects starting after this name. |
order | order | []string | Select a field to order the results by. Defaults to name. To control the direction of the sorting, append [asc] or [desc] to the field name. For example, name[desc] will sort the results by name in descending order. The ordering defaults to asc if not specified. |
filter | filter | []string | Filter results by this query. Defaults to no filter. |
expand | options | []string | Expand the result with the related management category. |
A sample curl command line would look like
curl --request GET \
--url 'https://api.synqly.com/v1/credentials/59579aa2-0312-4aac-9a83-fee37768076b?limit=10&start_after=splunk_cred&order=name%5Basc%5D&filter=name%5Blike%5Dsplunk%2A'
Pagination
The number of items returned and the start point can be set to manage result pagination.
Ordering
The sorted order can be specified by filling in the order field. The order field can specify any of the List result field names or any of the 'expand' component field names. The 'expand' component field names need to be prefixed with 'component.' prefix. May be used multiple times to order by multiple fields, and the ordering is applied in the order the fields are specified
Examples:
?order=name
?order=created_at[asc]
?order=accounts.name[dsc]?expand=accounts
Filtering
The filter parameter can be specified in the field. The filter field can specify any of the List result field names or any of the 'expand' component field names. The 'expand' component field names need to be prefixed with 'component.' prefix. If used more than once, the filters are ANDed together.
The following filter operations are available.
Operation | Description |
---|---|
eq | fields are equal to |
ne | fields are not-equal to |
gt | fields are greater-than |
lt | fields are less-than |
gte | fields are greater-than or equal to |
lte | fields are less-than or equal to |
in | fields are in the set (comma separated list) |
like | fields that match the pattern with wildcards '*' or '%' |
not in | fields not in the set (comma separated list) |
not like | fields that don't match the pattern |
'*' matches any sequences of charaters. '%' matches any character.
Examples:
?filter=name[eq]Bob&filter=age[gte]35
?filter=name[in]bob,sue,sam
?filter=accounts.name[like]Acme*&expand=accounts
Options
Expand
Some management components support the 'expand' option. The 'expand' option fills in the related component fields defined in the base component.
Examples: Integration optionaly includes Account and IntegrationPoint objects.
?expand=accounts&expand=integration_points
type Integration struct {
...
// When using the expand option on the List or ListAccount APIs, the full account object is included in the response
Account *Account `json:"account,omitempty"`
...
// When using the expand option on the List or ListAccount APIs, the full integration_point object is included in the response
IntegrationPoint *IntegrationPoint `json:"integration_point,omitempty"`
...
}
Common field names
These field names are common across all components. For additional field names to filter and order on, see the fields in the List results for that component.
Field | Type |
---|---|
id | string |
name | string |
fullname | string |
created_at | date-time |
updated_at | date-time |
Note: date-time format is RFC 3339 nano. (eg. "2024-08-23T20:41:41.398051Z")
Example:
accountNameFilter := "name[like]test-account-*"
accountCreatedFilter := "created_at[gt]" + account.CreatedAt.UTC().Format(time.RFC3339Nano)
response, err := client.Accounts.List(ctx, &mgmt.ListAccountsRequest{
Order: []*string{engine.String("created_at[asc]")},
Filter: []*string{&accountNameFilter, &accountCreatedFilter},
})
Example:
curl --request GET \
--url https://api.synqly/com/v1/accounts?filter=name%5Blike%5Dtest-account-%2A&filter=created_at%5Bgt%5D2024-08-23T20%3A41%3A41.398051Z&order=created_at%5Basc%5D