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

« Previous Version 2 Next »

The system permits to save and load "layouts". Layouts are not required if you simply want to query for data. A layout stores:

  • The fields to retrieve with a query
  • A name of the preset
  • The default rows per page
  • Other front end specific properties

The methods permit to:

  • Current user default layout. For example, a user may want to always render a specific set of fields with specific column widths.
  • System presets. Some lists propose predefined and commonly used layouts.
  • User presets. As user can save a list of layouts with name.

URL

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

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

 

MANAGE LAYOUTS

The following API methods are available:

 

URL

Description

(GET) list/layouts

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

  • default: Object with the user's default layout.
  • userpresets: An array of user layouts. If the user has not saved any presets, the array is empty.
  • systempresets: An array of predefined and commonly used layouts. Empty if none available.

 

(PUT) list/layouts/userpresets

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

To clear all presets, set an empty array.

 

(GET) list/layouts/default

Gets the user's default layout.

 

(PUT) list/layouts/default

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

If the body is empty, the system restores the user default to the system default.

 

 

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