Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The system permits to save and load queries:

  • Current user default query. For example, a user may decide to always apply a filter when running a query without explicit query string.
  • System presets. Some lists propose predefined and commonly used queries.
  • User presets. As user can save a list of queries with name.

URL

The following URLs permit to get, add, modify or delete layouts. All actions are private to the current user.

(GET) ./list/queries
(GET) ./list/queries/default
(PUT) ./list/queries/userpresets
(PUT) ./list/queries/default

 

MANAGE PRESETS

The following API methods are available:

 

URL

Description

(GET) list/queries

Gets a list of all queries. This is an object with properties:

  • default: Object with the user's default query. To set a default, specify the "setdefault" parameter in the /list method.
  • userpresets: An array of user queries. If the user has not saved any presets, the array is empty.
  • systempresets: An array of predefined and commonly used queries. Empty if none available.

 

(PUT) list/queries/userpresets

Sets a list of user presets. Include the JSON array in the HTTP BODY.

To clear all presets, set an empty array.

 

(GET) list/queries/default

Gets the user's default query.

This is the same object you receive in the "default" property when calling list/queries (see above).

 

(PUT) list/queries/default

Sets the user's default query. Include the query object in the HTTP BODY.

If the body is empty, the system clears the query (no filter applied).

 

 

PRESET OBJECT

A preset object has these properties:

origin

Describes who created the layout:

  • SystemDefault: The system default.
  • UserDefault: The user's default query.
  • User: A user preset saved with a name.

 

string
nameThe name of the layout.string
query

The query string. Not null. An empty string means that no filter will be applied.

See Query language

string

 

EXAMPLES

Calling /list/queries may return:

{
	{
		"default": {
			"origin": "User",
			"name": "User default",
			"query": ""
		},
		"userpresets": [{
			"origin": "User",
			"name": "My query",
			"query": "{status} = 1 AND {locked} = false"
		},
		],
		"systempresets": []
	}
}

 

 

 

 

  • No labels