Skip to content

Instantly share code, notes, and snippets.

"selection"

A stateful concept; you make a selection using [Selection API] , you get back an ID representing that selection. Then you can make requests to other endpoints; referring to the selection you just created; by passing selectionId to subsequent requests. Example (only discovered by watching the QMC work):

  • type: POST request
  • url: https://usrem-nnd.qliktech.com/qrs/Selection?xrfkey=OYLUwknGdxf8mqeT
  • data/body: {"items":[{"type":"User","objectID":"192e1540-57c5-4456-b412-bc604408df15"}]}

Needed for:

$.ajax({ url: 'https://{domain}/{virtualproxy}/qrs/about/api/description', data : {xrfkey:'0123456789abcdef'}, type: 'GET',
beforeSend: function(xhr){xhr.setRequestHeader('X-Qlik-Xrfkey', '0123456789abcdef');} })
$.ajax({ url: 'https://{domain}/{virtualproxy}/onelogin/qrs/app/object/full?filter=app.id+eq+3d4c2e84-3af1-4534-8405-cdbdb3bae9a4+and+engineObjectId+eq+\'6b648a8e-aec9-445c-9e3f-755dc1ec1889\'', data : {xrfkey:'0123456789abcdef'}, type: 'GET',
beforeSend: function(xhr){xhr.setRequestHeader('X-Qlik-Xrfkey', '0123456789abcdef');} })
keys are the qext names
values are objects like:
"{
"name": "name",
"description": "name",
"icon": "list",
"type": "visualization",
"version": "1.0.0",
"author": "",
"homepage": "",
e.refresh_user = function () {
// alert(url);
//Only need to get this information once
e.get_user_promise = $http({
method: 'GET',
url: urlService.path('/qps/user')
});
States = {
VALID: 1,
INVALID: 2,
VALIDATING: 3,
CLOSED: 5,
CLOSING: 6,
CANCELLED: 7
}
@theredpea
theredpea / refresh.html
Created March 14, 2018 00:17
Refresh events
<html>
<head>
<script >
//Each time the refresh page reloads
//1) a new setTimeout will be created
//2) the refresh-container will get the onload callback executed
setTimeout(function(){ window.location.reload(true); }, 5000);
</script>
@theredpea
theredpea / getting_websockets_frames.js
Last active April 25, 2018 15:47
frame frame socket wss websocket network
wss_rows = document.getElementsByClassName('data-grid-data-grid-node');
wss_array=[];
for (i=0;i<wss_rows.length;i++){
wss_row=wss_rows[i];
wss_array.push({
LIB CONNECT TO 'xbrl_api_fact (qtsel_nnd)';
// Action required: Implement the logic to retrieve the total records
// from the REST source and assign to the 'total' local variable.
Let total = 3000;
Let totalfetched = 0;
Let startAt = 0;
Let pageSize = 1000;
LOAD * INLINE [
Val
0022
0023
0024
C001
C002
G001
SF01 ];

qFrequencyMode.md frequency: { type: "string", component: "dropdown", label: "Frequency mode", ref: "qListObjectDef.qFrequencyMode", options: [{ value: "N", label: "No frequency"