# Cyclos4102Api.UIApi

All URIs are relative to *https://demo.cyclos.org/api*

Method | HTTP request | Description
------------- | ------------- | -------------
[**dataForUi**](UIApi.md#dataForUi) | **GET** /ui/data-for-ui | Returns useful data required to properly display a user interface


<a name="dataForUi"></a>
# **dataForUi**
> DataForUi dataForUi(opts)

Returns useful data required to properly display a user interface

The returned data contains settings and also content like header, footer  and theme. 

### Example
```javascript
var Cyclos4102Api = require('cyclos_4102_api');

var apiInstance = new Cyclos4102Api.UIApi();

var opts = { 
  'fields': ["fields_example"], // [String] | Select which fields to include on returned data. If nothing is set, all object fields are returned. Unprefixed field names will be handled like a whitelist (only listed fields will be included), while names starting with a minus (-) or exclamation mark (!) will be handled as blacklist (listed fields will not be included). This works for nesting as well. For example: `a,b.b1,c.-c1,c.-c2` will return the fields `a`, `b` (containing only the `b1` field) and `c` (containing all its fields except for `c1` or `c2`).  
  'kind': "kind_example", // String | Specifies the kind of user interface to get data for. If null then no  data related to the UI will be returned. Possible values are: * custom: A custom front-end application. Has no headers, footers or theme * main: The main web user interface * mobile: The mobile application user interface * pay: The Ticket / Easy invoice confirmation application user interface 
  'cyclosVersion': "cyclosVersion_example", // String | The last known Cyclos version. Sometimes, data to be cached depends on the version of the Cyclos application, and this helps controlling such cases 
  'headerIf': "headerIf_example", // String | Controls the header cache. If is a boolean value (`true` or `false`) will forcibly return or skip the content. Otherwise, it should be a string in the form `id|version`. In this case, the content will be returned only when changed. When blank will always return it. 
  'footerIf': "footerIf_example", // String | Controls the footer cache. If is a boolean value (`true` or `false`) will forcibly return or skip the content. Otherwise, it should be a string in the form `id|version`. In this case, the content will be returned only when changed. When blank will always return it. 
  'themeIf': "themeIf_example", // String | Controls the theme cache. If is a boolean value (`true` or `false`) will forcibly return or skip the content. Otherwise, it should be a string in the form `id|version`. In this case, the content will be returned only when changed. When blank will always return it. 
  'themeByComponents': true // Boolean | Flag used to indicate how the theme must be returned (if returned): true means the theme components (base / advanced definitions and custom style) will be filled. Otherwise the final CSS (i. e the theme content). Only valid if the kind of the user interface is NOT `mobile`. For that kind the theme es always returned by its components. 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.dataForUi(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **fields** | [**[String]**](String.md)| Select which fields to include on returned data. If nothing is set, all object fields are returned. Unprefixed field names will be handled like a whitelist (only listed fields will be included), while names starting with a minus (-) or exclamation mark (!) will be handled as blacklist (listed fields will not be included). This works for nesting as well. For example: &#x60;a,b.b1,c.-c1,c.-c2&#x60; will return the fields &#x60;a&#x60;, &#x60;b&#x60; (containing only the &#x60;b1&#x60; field) and &#x60;c&#x60; (containing all its fields except for &#x60;c1&#x60; or &#x60;c2&#x60;).   | [optional] 
 **kind** | **String**| Specifies the kind of user interface to get data for. If null then no  data related to the UI will be returned. Possible values are: * custom: A custom front-end application. Has no headers, footers or theme * main: The main web user interface * mobile: The mobile application user interface * pay: The Ticket / Easy invoice confirmation application user interface  | [optional] 
 **cyclosVersion** | **String**| The last known Cyclos version. Sometimes, data to be cached depends on the version of the Cyclos application, and this helps controlling such cases  | [optional] 
 **headerIf** | **String**| Controls the header cache. If is a boolean value (&#x60;true&#x60; or &#x60;false&#x60;) will forcibly return or skip the content. Otherwise, it should be a string in the form &#x60;id|version&#x60;. In this case, the content will be returned only when changed. When blank will always return it.  | [optional] 
 **footerIf** | **String**| Controls the footer cache. If is a boolean value (&#x60;true&#x60; or &#x60;false&#x60;) will forcibly return or skip the content. Otherwise, it should be a string in the form &#x60;id|version&#x60;. In this case, the content will be returned only when changed. When blank will always return it.  | [optional] 
 **themeIf** | **String**| Controls the theme cache. If is a boolean value (&#x60;true&#x60; or &#x60;false&#x60;) will forcibly return or skip the content. Otherwise, it should be a string in the form &#x60;id|version&#x60;. In this case, the content will be returned only when changed. When blank will always return it.  | [optional] 
 **themeByComponents** | **Boolean**| Flag used to indicate how the theme must be returned (if returned): true means the theme components (base / advanced definitions and custom style) will be filled. Otherwise the final CSS (i. e the theme content). Only valid if the kind of the user interface is NOT &#x60;mobile&#x60;. For that kind the theme es always returned by its components.  | [optional] 

### Return type

[**DataForUi**](DataForUi.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

