<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Qlik Sense ODAG API: How to create ODAG links (PowerShell) in Official Support Articles</title>
    <link>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-ODAG-API-How-to-create-ODAG-links-PowerShell/ta-p/1713634</link>
    <description>&lt;P&gt;This is a sample to create ODAG links with the ODAG API using PowerShell.&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Environment&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;LI-PRODUCT title="Qlik Sense Enterprise on Windows" id="qlikSenseEnterpriseWindows"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Sample using JWT authentication:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;$body = '{"name": "ODAGLink",
    "selectionApp": "67a7d998-fdcb-414f-9049-7b6350234b9d",
    "templateApp": "13617037-cfa5-4205-93a7-87aac10c1676",
    "rowEstExpr": "Count(Dim1)",
    "properties": {
        "rowEstRange": [
        {
            "context": "*",
            "highBound": 100000
        }]
    }
}'
$hdrs = @{}
$hdrs.Add("X-Qlik-xrfkey","12345678qwertyui")
$hdrs.Add("Authorization","Bearer eyJhbGciOi...GYyMdkVoQLxRFYP7r7mLbGaamCwUIApcHtUc7b3LEg")
$url = "https://qlikserver1.domain.local/jwt/api/odag/v1/links?xrfkey=12345678qwertyui"
Invoke-RestMethod -Uri $url -Method Post -Headers $hdrs -Body $body -ContentType 'application/json'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Sample using ticket authentication:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;#Paste the ticket here
$ticket='5PEtidGu2GjhLn2k'

$body = '{"name": "ODAGLink",
    "selectionApp": "67a7d998-fdcb-414f-9049-7b6350234b9d",
    "templateApp": "13617037-cfa5-4205-93a7-87aac10c1676",
    "rowEstExpr": "Count(Dim1)",
    "properties": {
        "rowEstRange": [
        {
            "context": "*",
            "highBound": 100000
        }]
    }
}'
$hdrs = @{}
$hdrs.Add("X-Qlik-xrfkey","12345678qwertyui")
$url = "https://qlikserver1.domain.local/api/odag/v1/links?qlikticket="+$ticket
Invoke-RestMethod -Uri $url -Method Post -Headers $hdrs -Body $body -ContentType 'application/json'
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Sample using certificates:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;$body = '{"name": "ODAGLink",
    "selectionApp": "67a7d998-fdcb-414f-9049-7b6350234b9d",
    "templateApp": "13617037-cfa5-4205-93a7-87aac10c1676",
    "rowEstExpr": "Count(Dim1)",
    "properties": {
        "rowEstRange": [
        {
            "context": "*",
            "highBound": 100000
        }]
    }
}'
$hdrs = @{}
$hdrs.Add("X-Qlik-User","UserDirectory=DOMAIN;UserId=Administrator")
$cert = Get-ChildItem -Path "Cert:\CurrentUser\My" | Where {$_.Subject -like '*QlikClient*'}
$url = "https://qlikserver1.domain.local:9098/v1/links"
Invoke-RestMethod -Uri $url -Method Post -Headers $hdrs -Body $body -ContentType 'application/json' -Certificate $cert&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Sep 2023 07:20:36 GMT</pubDate>
    <dc:creator>Damien_V</dc:creator>
    <dc:date>2023-09-14T07:20:36Z</dc:date>
    <item>
      <title>Qlik Sense ODAG API: How to create ODAG links (PowerShell)</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-ODAG-API-How-to-create-ODAG-links-PowerShell/ta-p/1713634</link>
      <description>&lt;P&gt;This is a sample to create ODAG links with the ODAG API using PowerShell.&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Environment&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;LI-PRODUCT title="Qlik Sense Enterprise on Windows" id="qlikSenseEnterpriseWindows"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Sample using JWT authentication:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;$body = '{"name": "ODAGLink",
    "selectionApp": "67a7d998-fdcb-414f-9049-7b6350234b9d",
    "templateApp": "13617037-cfa5-4205-93a7-87aac10c1676",
    "rowEstExpr": "Count(Dim1)",
    "properties": {
        "rowEstRange": [
        {
            "context": "*",
            "highBound": 100000
        }]
    }
}'
$hdrs = @{}
$hdrs.Add("X-Qlik-xrfkey","12345678qwertyui")
$hdrs.Add("Authorization","Bearer eyJhbGciOi...GYyMdkVoQLxRFYP7r7mLbGaamCwUIApcHtUc7b3LEg")
$url = "https://qlikserver1.domain.local/jwt/api/odag/v1/links?xrfkey=12345678qwertyui"
Invoke-RestMethod -Uri $url -Method Post -Headers $hdrs -Body $body -ContentType 'application/json'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Sample using ticket authentication:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;#Paste the ticket here
$ticket='5PEtidGu2GjhLn2k'

$body = '{"name": "ODAGLink",
    "selectionApp": "67a7d998-fdcb-414f-9049-7b6350234b9d",
    "templateApp": "13617037-cfa5-4205-93a7-87aac10c1676",
    "rowEstExpr": "Count(Dim1)",
    "properties": {
        "rowEstRange": [
        {
            "context": "*",
            "highBound": 100000
        }]
    }
}'
$hdrs = @{}
$hdrs.Add("X-Qlik-xrfkey","12345678qwertyui")
$url = "https://qlikserver1.domain.local/api/odag/v1/links?qlikticket="+$ticket
Invoke-RestMethod -Uri $url -Method Post -Headers $hdrs -Body $body -ContentType 'application/json'
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Sample using certificates:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;$body = '{"name": "ODAGLink",
    "selectionApp": "67a7d998-fdcb-414f-9049-7b6350234b9d",
    "templateApp": "13617037-cfa5-4205-93a7-87aac10c1676",
    "rowEstExpr": "Count(Dim1)",
    "properties": {
        "rowEstRange": [
        {
            "context": "*",
            "highBound": 100000
        }]
    }
}'
$hdrs = @{}
$hdrs.Add("X-Qlik-User","UserDirectory=DOMAIN;UserId=Administrator")
$cert = Get-ChildItem -Path "Cert:\CurrentUser\My" | Where {$_.Subject -like '*QlikClient*'}
$url = "https://qlikserver1.domain.local:9098/v1/links"
Invoke-RestMethod -Uri $url -Method Post -Headers $hdrs -Body $body -ContentType 'application/json' -Certificate $cert&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 07:20:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-ODAG-API-How-to-create-ODAG-links-PowerShell/ta-p/1713634</guid>
      <dc:creator>Damien_V</dc:creator>
      <dc:date>2023-09-14T07:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense ODAG API: How to create ODAG links (PowerShell)</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-ODAG-API-How-to-create-ODAG-links-PowerShell/tac-p/2135370#M10631</link>
      <description>&lt;P&gt;I have been using your code, and it appears that the odag apps are being made but nothing visually is appearing in the apps, how do I make it so that the button for app generation is also made, it just seems that the objects are being made in the QRS/backend but not appearing in the front?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 12:30:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-ODAG-API-How-to-create-ODAG-links-PowerShell/tac-p/2135370#M10631</guid>
      <dc:creator>Richard_Smith_Uchotski</dc:creator>
      <dc:date>2023-11-07T12:30:16Z</dc:date>
    </item>
  </channel>
</rss>

