Data cache service
Contents
Introduction
When working on solutions for clients it is not always enough to report on the collected data, in some cases the client also wants to get access to the raw data directly.
Normally this can be handled by exporting the data, but in some cases the client is looking for an automated approach, where they can develop a data consumer, thus we have created a service from which we provide access to data from data caches.
The raw data has also shown to be useful when setting up dashboards, where access to the raw data from an RCS for instance allows us to make very advanced solutions such as our CRM solution.
Service APIs
The data cache service consists of two APIs; an external API allowing external applications to retrieve data from a data cache through SOAP calls, and an internal API that gives access to data from a data cache through JavaScript, which can be used from dashboards for example.
Requests using the internal API happens in a stateful context contrary to the external API where requests happen in a stateless context. Thus the primary difference between the two APIs is that the external API requires username and password each time a request is made.
The user requesting data from a data cache must have minimum observer access to the data cache specification, no matter if the external or internal API is used.
External API
Type | Signature | Description |
---|---|---|
int | GetRowCount (string username, string password, int dcsResourceId) | Gets the number of rows of a data cache. |
DataCacheDto | GetData (string username, string password, string[] columns, int dcsResourceId) | Gets all rows from a data cache, with data from a selection of columns. |
DataCacheDto | GetDataSorted (string username, string password, string[] columns, int dcsResourceId, string[] orderByColumns, DataCacheSortOrderEnum sortOrder) | Gets all rows from a data cache, with data from a selection of columns. |
DataCacheDto | GetDataRows (string username, string password, string[] columns, int dcsResourceId, int rowIndex, int rowCount) | Gets all rows from a data cache starting from a row index and returning rows as requested. |
DataCacheDto | GetDataRowsSorted (string username, string password, string[] columns, int dcsResourceId, string[] orderByColumns, DataCacheSortOrderEnum sortOrder, int rowIndex, int rowCount) | Gets all rows from a data cache starting from a row index and returning rows as requested. |
DataCacheDto | GetDataTop (string username, string password, int top, string[] columns, int dcsResourceId) | Gets the top N rows from a data cache, with data from a selection of columns, ordered by some column. Rows with no values will be excluded, meaning that the data cache returned might contain fewer rows, than indicated by N. |
DataCacheDto | GetDataTopSorted (string username, string password, int top, string[] columns, int dcsResourceId, string[] orderByColumns, DataCacheSortOrderEnum sortOrder) | Gets the top N rows from a data cache, with data from a selection of columns, ordered by some column. Rows with no values will be excluded, meaning that the data cache returned might contain fewer rows, than indicated by N. |
DataCacheDto | GetDataForUsers (string username, string password, string[] columns, int dcsResourceId, int[] users) | Gets all rows from a data cache, with data from a selection of columns, belonging to a selection of users. |
DataCacheDto | GetDataForUsersSorted (string username, string password, string[] columns, int dcsResourceId, int[] users, string[] orderByColumns, DataCacheSortOrderEnum sortOrder) | Gets all rows from a data cache, with data from a selection of columns, belonging to a selection of users. |
Internal API
Type | Signature | Description |
---|---|---|
int | GetRowCount (int dcsResourceId) | Gets the number of rows of a data cache. |
DataCacheDto | GetData (string[] columns, int dcsResourceId) | Gets all rows from a data cache, with data from a selection of columns. |
DataCacheDto | GetDataSorted (string[] columns, int dcsResourceId, string[] orderByColumns, DataCacheSortOrderEnum sortOrder) | Gets all rows from a data cache, with data from a selection of columns. |
DataCacheDto | GetDataRows (string[] columns, int dcsResourceId, int rowIndex, int rowCount) | Gets all rows from a data cache starting from a row index and returning rows as requested. |
DataCacheDto | GetDataRowsSorted (string[] columns, int dcsResourceId, string[] orderByColumns, DataCacheSortOrderEnum sortOrder, int rowIndex, int rowCount) | Gets all rows from a data cache starting from a row index and returning rows as requested. |
DataCacheDto | GetDataTop (int top, string[] columns, int dcsResourceId) | Gets the top N rows from a data cache, with data from a selection of columns, ordered by some column. Rows with no values will be excluded, meaning that the data cache returned might contain fewer rows, than indicated by N. |
DataCacheDto | GetDataTopSorted (int top, string[] columns, int dcsResourceId, string[] orderByColumns, DataCacheSortOrderEnum sortOrder) | Gets the top N rows from a data cache, with data from a selection of columns, ordered by some column. Rows with no values will be excluded, meaning that the data cache returned might contain fewer rows, than indicated by N. |
DataCacheDto | GetDataForUsers (string[] columns, int dcsResourceId, int[] users) | Gets all rows from a data cache, with data from a selection of columns, belonging to a selection of users. |
DataCacheDto | GetDataForUsersSorted (string[] columns, int dcsResourceId, int[] users, string[] orderByColumns, DataCacheSortOrderEnum sortOrder) | Gets all rows from a data cache, with data from a selection of columns, belonging to a selection of users. |
DataCacheDto | GetDataForLoggedInUser (string[] columns, int dcsResourceId, Guid dataViewUser) | Gets all rows from a data cache,with data from a selection of columns, belonging to a logged in user. |
Data structures
When data from a data cache is returned to the requester it is represented by a simple object structure.