Difference between revisions of "Integration/Content source"

From TempusServa wiki
Jump to navigation Jump to search
old>Admin
 
(11 intermediate revisions by 2 users not shown)
Line 2: Line 2:


== Setting up a content source ==
== Setting up a content source ==
THIS ARTICLE IS UNDER DEVELOPMENT
Many parameters are straight forward
 
It is obvious how many parameters work
* Related solution
* Related solution
* Max cache age
* Max cache age
Line 27: Line 25:


=== Query parameters  ===
=== Query parameters  ===
THIS ARTICLE IS UNDER DEVELOPMENT
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
# Build views in frontend.
# Activate the link and copy the URL
# ´Remove unneeded parameters
#* command
#* SagID
#* QUERY_NEW
 
=== Possible parameters ===
 
{|
 
| QUERY_FIELD_n
| Part of the search/filter. The field to filter by.
|-
 
| QUERY_OPERATOR_n
| Part of the search/filter. The way to filter. Full list [[Dashboard widget configuration]]
|-
 
| QUERY_VALUE_n
| Part of the search/filter. The value to filter by.
|-
 
| QUERY_SHOWFIELD
| The fields to show in the list, separated by space.
|-
 
| QUERY_PageSize
| Number of records to show pr page.
|-
 
| QUERY_PageOffset
| The page number to show.
|-
 
| QUERY_SortOrder
| The field to sort ascending by. Use either this or SortOrderDesc.
|-
 
| QUERY_SortOrderDesc
| The field to sort descending by. Use either this or SortOrder.
|-
 
| QUERY_Grouping
| The field to group records by.
|-
 
| QUERY_GroupingDesc
|
|-
 
|}


=== Dynamic parameter  ===
=== Dynamic parameter  ===
Line 45: Line 99:


Parameters and values are injected directly into the http request.
Parameters and values are injected directly into the http request.
'''Note: Using the "show" command the variable will ALLWAYS get mapped to "DataID"'''


== Using a content source ==
== Using a content source ==
THIS ARTICLE IS UNDER DEVELOPMENT
Calling the '''cmsinterface''' servlet will provide you with an overview on how to use it.
Calling the '''cmsinterface''' servlet will provide you with an overview on how to use it.


Line 75: Line 129:
For performance reasons information about the content sources is kept cached.
For performance reasons information about the content sources is kept cached.


Adding or chaning sources will propogate automatically : You will need to clear the system cache to pick the changes.
Adding or changing sources will propegate automatically : You will need to clear the system cache to pick the changes.
 
=== Parameter encoding ===
Note that URL's copied from a browser address bar are often encoded in HTML format.
 
The content will not decode values and request strings, so all encoded strings will fail.

Latest revision as of 10:35, 22 April 2024

THIS ARTICLE IS UNDER DEVELOPMENT

Setting up a content source

Many parameters are straight forward

  • Related solution
  • Max cache age
  • Is active

Unique NAME

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& ...

Query command

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

Query parameters

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

Possible parameters

QUERY_FIELD_n Part of the search/filter. The field to filter by.
QUERY_OPERATOR_n Part of the search/filter. The way to filter. Full list Dashboard widget configuration
QUERY_VALUE_n Part of the search/filter. The value to filter by.
QUERY_SHOWFIELD The fields to show in the list, separated by space.
QUERY_PageSize Number of records to show pr page.
QUERY_PageOffset The page number to show.
QUERY_SortOrder The field to sort ascending by. Use either this or SortOrderDesc.
QUERY_SortOrderDesc The field to sort descending by. Use either this or SortOrder.
QUERY_Grouping The field to group records by.
QUERY_GroupingDesc

Dynamic parameter

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"

Using a content source

Calling the cmsinterface servlet will provide you with an overview on how to use it.

Example:

  https://www.acme.com/TempusServa/cmsinterface

The interface requires just the name of the source, but additional parameters can be provided.

Parameters

  • q: Name of the interface (required)
    • This name must match "Unique NAME"
  • f: Format of the result (optional)
    • Valid values: html json xml
  • v: Parameter for dynamic values (optional)
    • The value will be substituted to the parameter in "Dynamic parameter"

Example:

  https://www.acme.com/TempusServa/cmsinterface?q=mysource&f=json

Troubleshooting

THIS ARTICLE IS UNDER DEVELOPMENT

Configuration caching

For performance reasons information about the content sources is kept cached.

Adding or changing sources will propegate automatically : You will need to clear the system cache to pick the changes.

Parameter encoding

Note that URL's copied from a browser address bar are often encoded in HTML format.

The content will not decode values and request strings, so all encoded strings will fail.