# Setting up a content source

Many parameters are straight forward

- Related solution
- Max cache age
- Is active

### <span class="mw-headline" id="bkmrk-unique-name-1">Unique NAME</span>

This is the calling name of the interface, that must be provided accessing the content service.

Example for calling the view **myview**

```
  ... /cmsservice?q=myview& ...
```

### <span class="mw-headline" id="bkmrk-query-command-1">Query command</span>

Relevant commands include

- General records 
    - list: List of records
    - show: Single record
- HTML formatted views 
    - heat: Heatmaps
    - gant: Gant charts
    - xtab: Pivot tables
    - calm: Calendar

### <span class="mw-headline" id="bkmrk-query-parameters-1">Query parameters</span>

Parameters are provided without URL encoding

```
 QUERY_FIELD_1=TITEL&QUERY_OPERATOR_1=8&QUERY_VALUE_1=Hello&QUERY_SHOWFIELD=TITEL StatusID DEADLINE
```

Procedure for easy parameter setup

1. Build views in frontend.
2. Activate the link and copy the URL
3. ´Remove unneeded parameters 
    - command
    - SagID
    - QUERY\_NEW

### <span class="mw-headline" id="bkmrk-possible-parameters-1">Possible parameters</span>

<table id="bkmrk-query_field_n-part-o"><tbody><tr><td>QUERY\_FIELD\_n</td><td>Part of the search/filter. The field to filter by.</td></tr><tr><td>QUERY\_OPERATOR\_n</td><td>Part of the search/filter. The way to filter. Full list [Dashboard widget configuration](https://wiki.tsnocode.com/index.php?title=Dashboard_widget_configuration "Dashboard widget configuration")</td></tr><tr><td>QUERY\_VALUE\_n</td><td>Part of the search/filter. The value to filter by.</td></tr><tr><td>QUERY\_SHOWFIELD</td><td>The fields to show in the list, separated by space.</td></tr><tr><td>QUERY\_PageSize</td><td>Number of records to show pr page.</td></tr><tr><td>QUERY\_PageOffset</td><td>The page number to show.</td></tr><tr><td>QUERY\_SortOrder</td><td>The field to sort ascending by. Use either this or SortOrderDesc.</td></tr><tr><td>QUERY\_SortOrderDesc</td><td>The field to sort descending by. Use either this or SortOrder.</td></tr><tr><td>QUERY\_Grouping</td><td>The field to group records by.</td></tr><tr><td>QUERY\_GroupingDesc</td><td> </td></tr></tbody></table>

### <span class="mw-headline" id="bkmrk-dynamic-parameter-1">Dynamic parameter</span>

This specifies a parameter that will be set by the value provided in the **v** parameter.

Example: Using this interface

```
 Unique NAME: mylist
 Query command: list
 Dynamic parameter: QUERY_PageOffset
```

Making a call to

```
 .../cmsinterface?q=mylist&v=2
```

Will fetch a list of data and display page 2, because **2** is injected into **QUERY\_PageOffset**.

Parameters and values are injected directly into the http request.

**Note: Using the "show" command the variable will ALLWAYS get mapped to "DataID"**