Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
abarata
Partner - Contributor
Partner - Contributor

On Demand App Navigation Link Help

Hello everyone.
I'm working on an app with ODAG and when I am trying to create an app navigation link I have the error of already have a link with that name. In fact, I already had another app with a navigation link with that name, which I deleted for some time ago.

After having spoken with qlik support team they told me that if you deleted the app completely prior to deleting the app link within it, the names of app links are still reserved unfortunately. But they doesn't have a solution do drop those reserved names.

Does anyone have a solution to destroy objects that doesn't exist in any specific app?
Or does anyone know where these objects are stored?

I tried to access to qlik engine api to use the destroyobject() method however I need to select an app to do it, and I don't want to remove from an specific app but rather from the supposed place where these objects are stored.

Thanks in advance.

Labels (4)
4 Replies
Levi_Turner
Employee
Employee

Hey @abarata

I'm curious what the case number was.

You should be able to delete the ODAG Link via the QRS API. The general work-flow is like this:

GET /qrs/odaglink/full?filter=(name eq 'foo123')
Sample Response:

{
  "id": "8f5a3f9f-ff19-47e6-8fe6-e21d749e0da4",
  "createdDate": "2018-12-28T15:50:35.616Z",
  "modifiedDate": "2018-12-28T15:50:35.616Z",
  "modifiedByUserName": "domain\\levi",
  "owner": {
    "id": "0d11d863-1c53-4a00-8699-3837b09109aa",
    "userId": "levi",
    "userDirectory": "domain",
    "name": "Levi Turner",
    "privileges": null
  },
  "name": "foo123",
  "templateApp": {
    "id": "cca0b0aa-8fa5-415f-b415-dc6632c312a2",
    "name": "ODAG Template App",
    "appId": "",
    "publishTime": "2018-11-27T19:21:35.43Z",
    "published": true,
    "stream": {
      "id": "69658271-2081-47f3-9a94-3ec5d1358a0d",
      "name": "ODAG",
      "privileges": null
    },
    "savedInProductVersion": "12.108.7",
    "migrationHash": "98d482c3f964dccf69cbfb9a00e0c048ea6eb221",
    "availabilityStatus": 0,
    "privileges": null
  },
  "templateAppOrigName": "ODAG Template App",
  "loadScriptHash": 3601132354136866,
  "rowEstExpr": "Sum(FLIGHT_COUNT)",
  "odagLinkStatus": 0,
  "bindings": "[{\"templateAppVarName\":\"Origin Code\",\"selectAppParamType\":\"Field\",\"selectAppParamName\":\"Origin Code\",\"selectionStates\":\"SO\",\"numericOnly\":false},{\"templateAppVarName\":\"Destination Code\",\"selectAppParamType\":\"Field\",\"selectAppParamName\":\"Destination Code\",\"selectionStates\":\"SO\",\"numericOnly\":false},{\"templateAppVarName\":\"Year\",\"selectAppParamType\":\"Field\",\"selectAppParamName\":\"Year\",\"selectionStates\":\"SO\",\"numericOnly\":false},{\"templateAppVarName\":\"Quarter\",\"selectAppParamType\":\"Field\",\"selectAppParamName\":\"Quarter\",\"selectionStates\":\"SO\",\"numericOnly\":false},{\"templateAppVarName\":\"Ticket Carrier Code\",\"selectAppParamType\":\"Field\",\"selectAppParamName\":\"Ticket Carrier Code\",\"selectionStates\":\"SO\",\"numericOnly\":false},{\"templateAppVarName\":\"Fare Class\",\"selectAppParamType\":\"Field\",\"selectAppParamName\":\"Fare Class\",\"selectionStates\":\"SO\",\"numericOnly\":false}]",
  "properties": "{\"rowEstRange\":[{\"context\":\"*\",\"highBound\":100000}],\"genAppLimit\":[{\"context\":\"User_*\",\"limit\":5}],\"appRetentionTime\":[{\"context\":\"User_*\",\"retentionTime\":\"unlimited\"}],\"menuLabel\":[{\"context\":\"*\",\"label\":\"foo123\"}],\"genAppName\":[{\"userContext\":\"*\",\"formatString\":\"{0}_{1}-{2}\",\"params\":[\"templateAppName\",\"userDirectory\",\"userId\"]}]}",
  "modelGroups": [],
  "privileges": null,
  "schemaPath": "OdagLink"
}

This will provide the ODAGLink ID, which you can then delete via the following call:

DELETE /qrs/odaglink/8f5a3f9f-ff19-47e6-8fe6-e21d749e0da4

For demo code in pure PowerShell which accomplishes the task:

$hdrs = @{}
$hdrs.Add("X-Qlik-Xrfkey","examplexrfkey123")
$hdrs.Add("X-Qlik-User", "UserDirectory=INTERNAL; UserId=sa_api")
$cert = Get-ChildItem -Path "Cert:\CurrentUser\My" | Where {$_.Subject -like '*QlikClient*'}
$Data = Get-Content C:\ProgramData\Qlik\Sense\Host.cfg
$FQDN = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($($Data)))
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]'Ssl3,Tls,Tls11,Tls12' 
$odaglinkfull = Invoke-RestMethod -Uri "https://$($FQDN):4242/qrs/odaglink/full?filter=(name eq 'foobar')&xrfkey=examplexrfkey123" -Method Get -Headers $hdrs -ContentType 'application/json' -Certificate $cert
Invoke-RestMethod -Uri "https://$($FQDN):4242/qrs/odaglink/$($odaglinkfull.id)?xrfkey=examplexrfkey123" -Method Delete -Headers $hdrs -ContentType 'application/json' -Certificate $cert

* Note, this will be need to run on the Central node by the Service account

bgadela12
Contributor II
Contributor II

Hi Levi,

Thanks for the workaround. Just curious if this is the intended ODAG functionality, something R&D would consider 'working as designed' or if it is a bug. If its intended, is there any feature request already raised by a different customer

I have already logged a case with our DSE's via support portal to see if this will be considered a bug. 

Thanks,
Bharath

Levi_Turner
Employee
Employee

Can you let me know the case number so that I can follow up internally to see what has been investigated / communicated?

 

Whether it's intended or not isn't something I can say, but it's certainly unintuitive at the least.

bgadela12
Contributor II
Contributor II

Hi Levi,

Below is the Qlik support case info:

"01542135 - ODAG links not deleted from the repository after deleting the apps"

Thanks,
Bharath