levi-turner / QlikSenseScripts

MIT License
35 stars 10 forks source link

qs-cli-metadata_fetch.ps1 #4

Closed skynerve closed 4 years ago

skynerve commented 5 years ago

Hi, All codes steps working fine until Invoke-QlikGet.

Invoke-QlikGet -path https://$($FQDN)/api/v1/apps/$($opsmon.id)/data/metadata

Invoke-RestMethod : Cannot GET /api/v1/apps/510929d2-e88e-46c3-a509-6124cd3d213b/data/metadata?xrfkey=iaixlwcksfuezonk F:\qs\Qlik-Cli\functions\core.ps1:36 знак:17

Could you please explain what's wrong with it?

levi-turner commented 5 years ago
PS C:\Program Files\Qlik\Sense\Repository> #Requires -Modules Qlik-Cli
$Data = Get-Content C:\ProgramData\Qlik\Sense\Host.cfg
$FQDN = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($($Data)))
Connect-Qlik -ComputerName https://$($FQDN):443 -UseDefaultCredentials
$opsmon = Get-QlikApp -filter "name eq 'Operations Monitor'"
Invoke-QlikGet -path https://$($FQDN)/api/v1/apps/$($opsmon.id)/data/metadata

buildVersion      : 25.15.2.0
buildDate         : 6/7/2019 09:04:33 AM
databaseProvider  : Devart.Data.PostgreSql
nodeType          : 1
sharedPersistence : True
requiresBootstrap : False
singleNodeOnly    : False
schemaPath        : About

reload_meta        : @{cpu_time_spent_ms=43050; hardware=}
static_byte_size   : 17944770
fields             : {@{name=$Field; src_tables=System.Object[]; is_system=True; is_hidden=True; is_semantic=False; distinct_only=False; cardinal=189; total_count=213;
                     is_locked=False; always_one_selected=False; is_numeric=False; comment=; tags=System.Object[]; byte_size=4011}, @{name=$Table; src_tables=System.Object[];
                     is_system=True; is_hidden=True; is_semantic=False; distinct_only=False; cardinal=30; total_count=213; is_locked=False; always_one_selected=False;
                     is_numeric=False; comment=; tags=System.Object[]; byte_size=508}, @{name=$Rows; src_tables=System.Object[]; is_system=True; is_hidden=True; is_semantic=False;
                     distinct_only=False; cardinal=24; total_count=30; is_locked=False; always_one_selected=False; is_numeric=True; comment=; tags=System.Object[]; byte_size=301},
                     @{name=$Fields; src_tables=System.Object[]; is_system=True; is_hidden=True; is_semantic=False; distinct_only=False; cardinal=13; total_count=30;
                     is_locked=False; always_one_selected=False; is_numeric=True; comment=; tags=System.Object[]; byte_size=148}...}
tables             : {@{name=db_check; is_system=False; is_semantic=False; is_loose=False; no_of_rows=0; no_of_fields=1; no_of_key_fields=0; comment=; byte_size=0},
                     @{name=node_list; is_system=False; is_semantic=False; is_loose=False; no_of_rows=2; no_of_fields=3; no_of_key_fields=0; comment=; byte_size=24},
                     @{name=Weekdays; is_system=False; is_semantic=False; is_loose=False; no_of_rows=7; no_of_fields=2; no_of_key_fields=1; comment=; byte_size=20},
                     @{name=Hour_Table; is_system=False; is_semantic=False; is_loose=False; no_of_rows=24; no_of_fields=2; no_of_key_fields=1; comment=; byte_size=44}...}
has_section_access : False

For me.

  1. Is Qlik Sense Enterprise on June 2018 or newer?
  2. Has the Operations Monitor been reloaded on Qlik Sense Enterprise June 2018 or newer?
levi-turner commented 4 years ago

Closing due to lack of follow up