{
  "Name": "Reportworq - Rest API Run Job Sample - v12 On-Prem - 1.0",
  "HasSecurityAccess": false,
  "PrologProcedure": "\r\n#****Begin: Generated Statements***\r\n#****End: Generated Statements****\r\n\r\n\r\n#==========================================================================================\r\n# PROCESS\r\n# Reportworq - Rest API Run Job Sample - v12 On-Prem - 1.0\r\n#==========================================================================================\r\n#\r\n# PURPOSE:\r\n#\r\n#    THIS PROCESS CAN BE USED TO RUN A Reportworq JOB\r\n#           USING THE LOCAL (ON-PREM) Reportworq REST API\r\n#           ON IBM PLANNING ANALYTICS v12 / PA ENGINE ON-PREM.\r\n#\r\n#    THE PROCESS BUILDS A JOB REQUEST JSON PAYLOAD IN MEMORY\r\n#           AND POSTS IT DIRECTLY TO THE LOCAL Reportworq\r\n#           API USING THE NATIVE TI FUNCTION ExecuteHttpRequest.\r\n#\r\n# WHY THIS SAMPLE EXISTS (READ THIS):\r\n#\r\n#    IBM Planning Analytics v12 / PA Engine runs in a containerized engine that\r\n#    has NO OS shell - on-prem just as much as PAaaS. The classic ExecuteCommand\r\n#    TI function - which every older Reportworq \"Run Job via REST API\" sample used\r\n#    to shell out to PowerShell (which then performed the HTTP POST) - is\r\n#    UNAVAILABLE on v12. This sample replaces that whole mechanism with IBM's\r\n#    native, curl-like ExecuteHttpRequest function:\r\n#        - NO ExecuteCommand\r\n#        - NO PowerShell (.ps1) script\r\n#        - NO filesystem scaffolding (no mkdir, no request/log files)\r\n#    The job request JSON is built in memory and passed inline to the POST.\r\n#\r\n#    This is the ON-PREM analog of the \"v12 - 1.0\" (V12 Cloud / PAaaS) sample.\r\n#    The only substantive differences from that cloud sample are:\r\n#        - it authenticates with the local Reportworq API's accessToken header\r\n#          ('-h accessToken: ' | pAccessToken), NOT a cloud API key;\r\n#        - it posts to the LOCAL Reportworq API endpoint (default\r\n#          https://localhost:8600/api/v1/run), not the cloud endpoint;\r\n#        - there is no workspace concept on the local API, so no ?workspace= is built;\r\n#        - '-k' (skip TLS verification) is included by default, because a local\r\n#          on-prem endpoint typically presents a self-signed / internal-CA cert.\r\n#    Everything else - the JSON payload building, the DEBUG logging, the optional\r\n#    request/response debug file, and the 2xx status check - is identical.\r\n#\r\n#    Use the older \"On-Prem 2.4\" (ExecuteCommand + PowerShell) sample only on\r\n#    PA v11 / on-prem where ExecuteCommand is still available; use THIS sample on\r\n#    v12 / PA Engine on-prem.\r\n#\r\n# PARAMETERS:\r\n# pApiUrl (String): Api endpoint for running a job from TI (local). Example: https://localhost:8600/api/v1/run\r\n# pAccessToken (String): Access token required for API access - in Reportworq: Settings > Reportworq API > the Local API access token.\r\n# pJobName (String): Reportworq Job Path (MyFolder/MyJob or MyJob).\r\n# pNotificationEmail (String): Email address to send notifications (optional).\r\n# pHoldForDelivery (String): Hold Jobs for Review before Distribution ( true/false ) - by default this is set to false.\r\n# pAllowedFileOutputTypes (String): Allowed output types for the job, semicolon delimited, blank defaults to all configured (excel/pdf/ppt/csv).\r\n# pAllowedDestinationTypes (String): Allowed distribution types for the job, semicolon delimited, blank defaults to all configured (file/sharepoint/sheets/email/slack/teams).\r\n# pConvertPowerPointToPdf (String): Convert PPT files to PDF before Distribution ( true/false ).\r\n# pLogLevel (String): Optional Reportworq job log level (Debug/Trace); by default this is blank for a regular job run.\r\n# pRequestLogFolder (String): Optional folder to write a timestamped copy of the request URL, the exact JSON payload sent, and the response (status + body), for debugging. Leave blank (default) to write no file.\r\n#\r\n# NOTE ON pTlsSecurity:\r\n#    The older On-Prem 2.4 sample carried a pTlsSecurity parameter (Tls11,Tls12)\r\n#    that was handed to PowerShell to select the .NET SecurityProtocol. That is\r\n#    intentionally DROPPED here: ExecuteHttpRequest is a native HTTP client and\r\n#    negotiates TLS itself, so there is no protocol switch to set from TI. Because\r\n#    a local / on-prem endpoint typically presents a self-signed or internal-CA\r\n#    certificate, the -k option (skip TLS verification) is included on the call\r\n#    below BY DEFAULT. To enforce certificate verification instead, remove -k and\r\n#    (if the endpoint uses an internal CA) add '-c <path-to-CA-file>' to the call.\r\n#    NOTE: -k is scoped to the loopback default above. If pApiUrl is changed to a\r\n#    NON-loopback host, prefer certificate verification - remove -k and, if the\r\n#    endpoint uses an internal CA, add '-c <path-to-CA-file>' - so the accessToken\r\n#    (a bearer credential) is not exposed to a man-in-the-middle on an untrusted network.\r\n#\r\n# MODIFICATION HISTORY:\r\n# Version 1.0: initial v12 / PA-Engine ON-PREM release using ExecuteHttpRequest (replaces ExecuteCommand/PowerShell);\r\n#              authenticates with the local Reportworq API accessToken header and posts to the local endpoint;\r\n#              -k included by default for the typical self-signed on-prem certificate. DEBUG-severity logging of the\r\n#              request/response, plus an OPTIONAL native request/response debug file (pRequestLogFolder) - the v12-safe\r\n#              \"see the exact call\" file (no shell, no ExecuteCommand).\r\n#\r\n#==========================================================================================\r\n\r\n\r\n#####################################\r\n# CONSTRUCT JOB REQUEST\r\n# DETAILS IN THE REQUIRED\r\n# JSON FORMAT\r\n#\r\n# NOTE: This JSON-building logic is intentionally IDENTICAL to the\r\n#       v12 - 1.0 (V12 Cloud / PAaaS) sample. Only the auth header, the\r\n#       endpoint, the (absent) workspace, and the default -k differ.\r\n#####################################\r\n\r\nvDelimiter = ';';\r\nvAllowedOutputFileTypes = '[';\r\nsString = pAllowedFileOutputTypes;\r\nnDelimiterIndex = 1;\r\nWHILE(nDelimiterIndex <> 0);\r\n  nDelimiterIndex = SCAN(vDelimiter, sString);\r\n  IF(nDelimiterIndex = 0);\r\n    sElm = sString;\r\n  ELSE;\r\n    sElm = TRIM(SUBST(sString, 1, nDelimiterIndex - 1));\r\n    sString = TRIM(SUBST(sString, nDelimiterIndex + LONG(vDelimiter), LONG(sString)));\r\n  ENDIF;\r\n  IF(sElm @<> '');\r\n    vAllowedOutputFileTypes = vAllowedOutputFileTypes | '\"' | sElm | '\", ';\r\n  ENDIF;\r\nEND;\r\n\r\nvAllowedOutputFileTypes = vAllowedOutputFileTypes | ']';\r\n\r\nvDelimiter = ';';\r\nvAllowedDestinationTypes = '[';\r\nsString = pAllowedDestinationTypes;\r\nnDelimiterIndex = 1;\r\nWHILE(nDelimiterIndex <> 0);\r\n  nDelimiterIndex = SCAN(vDelimiter,sString);\r\n  IF(nDelimiterIndex = 0);\r\n    sElm = sString;\r\n  ELSE;\r\n    sElm = TRIM(SUBST(sString, 1, nDelimiterIndex - 1));\r\n    sString = TRIM(SUBST(sString, nDelimiterIndex + LONG(vDelimiter), LONG(sString)));\r\n  ENDIF;\r\n  IF(sElm @<> '');\r\n    vAllowedDestinationTypes = vAllowedDestinationTypes | '\"' | sElm | '\", ';\r\n  ENDIF;\r\nEND;\r\n\r\nvAllowedDestinationTypes = vAllowedDestinationTypes | ']';\r\n\r\nvConvertPowerPointToPdf = 'null';\r\nIF(pConvertPowerPointToPdf @<> '');\r\n  vConvertPowerPointToPdf = pConvertPowerPointToPdf;\r\nENDIF;\r\n\r\njson = EXPAND(\r\n'{\r\n   \"name\": \"%pJobName%\",\r\n   \"notification\": \"%pNotificationEmail%\",\r\n   \"holdForDelivery\": %pHoldForDelivery%,\r\n   \"allowedOutputFileTypes\": %vAllowedOutputFileTypes%,\r\n   \"allowedDestinationTypes\": %vAllowedDestinationTypes%,\r\n   \"convertPowerPointToPdf\": %vConvertPowerPointToPdf%,\r\n');\r\n\r\nIF(pLogLevel @<> '');\r\n  IF(pLogLevel @<> 'Debug' & pLogLevel @<> 'Trace');\r\n      LOGOUTPUT( 'ERROR', 'Invalid Reportworq job log level: ' | pLogLevel );\r\n      PROCESSERROR;\r\n  ENDIF;\r\n  json = json |\r\n    EXPAND('\"LogLevel\": \"%pLogLevel%\",');\r\nENDIF;\r\n\r\n############################################################################\r\n# UNCOMMENT AND DUPLICATE PARAMETER TEMPLATES AS NEEDED\r\n# IF JOB EXECUTION REQUIRES PARAMETER OVERRIDES\r\n#\r\n# Valid parameter types: list, subset, mdx, mdxrepeater\r\n############################################################################\r\n\r\n#########################\r\n# List Parameter Template\r\n#########################\r\n\r\n#parameter1Name = 'MyParameterName';\r\n#parameter1Value = 'MyParameterValue1;MyParameterValue2;MyParameterValue3';\r\n\r\n#parameter1Type = 'list';\r\n#parameter1Delimiter = ';';\r\n\r\n#parameter1Json = EXPAND(\r\n#'          {\r\n#               \"type\": \"%parameter1Type%\",\r\n#               \"name\": \"%parameter1Name%\",\r\n#               \"delimiter\": \"%parameter1Delimiter%\",\r\n#               \"value\": \"%parameter1Value%\"\r\n#            }'\r\n#);\r\n\r\n###########################\r\n# Subset Parameter Template\r\n###########################\r\n\r\n#parameter2Type = 'subset';\r\n#parameter2Name = 'MyParameterName';\r\n#parameter2Subset = 'MyParameterSubset';\r\n#parameter2Server = 'MyParameterServer';\r\n#parameter2Dimension = 'MyParameterDimension';\r\n\r\n#parameter2json = EXPAND(\r\n#'          {\r\n#               \"type\": \"%parameter2Type%\",\r\n#               \"name\": \"%parameter2Name%\",\r\n#               \"server\": \"%parameter2Server%\",\r\n#               \"dimension\": \"%parameter2Dimension%\",\r\n#               \"value\": \"%parameter2Subset%\"\r\n#            }'\r\n#);\r\n\r\n##########################\r\n# MDX Parameter Template\r\n##########################\r\n\r\n#parameter3Type = 'mdx';\r\n#parameter3Name = 'MyParameterName';\r\n#parameter3Server = 'MyParameterServer';\r\n#parameter3Dimension = 'MyParameterDimension';\r\n#parameter3Alias = 'MyParameterAlias';\r\n#parameter3Mdx = 'TM1SUBSETALL([' | parameter3Dimension | '])';\r\n\r\n#parameter3json = EXPAND(\r\n#'          {\r\n#               \"type\": \"%parameter3Type%\",\r\n#               \"name\": \"%parameter3Name%\",\r\n#               \"server\": \"%parameter3Server%\",\r\n#               \"dimension\": \"%parameter3Dimension%\",\r\n#               \"alias\": \"%parameter3Alias%\",\r\n#               \"value\": \"%parameter3Mdx%\"\r\n#            }'\r\n#);\r\n\r\n\r\n##################################\r\n# MDX Repeater Parameter Template\r\n##################################\r\n\r\n#parameter4Type = 'mdxrepeater';\r\n#parameter4Name = 'MyParameterName';\r\n#parameter4Server = 'MyParameterServer';\r\n#parameter4Dimension = 'MyParameterDimension';\r\n#parameter4RepeatParameter = 'MyRepeatParameter';\r\n#parameter4Alias = 'MyParameterAlias';\r\n#parameter4Mdx = '[' | parameter4Dimension | '].[%ELEMENT%].Children';\r\n\r\n#parameter4json = EXPAND(\r\n#'          {\r\n#               \"type\": \"%parameter4Type%\",\r\n#               \"name\": \"%parameter4Name%\",\r\n#               \"server\": \"%parameter4Server%\",\r\n#               \"dimension\": \"%parameter4Dimension%\",\r\n#               \"alias\": \"%parameter4Alias%\",\r\n#               \"repeatParameter\": \"%parameter4RepeatParameter%\",\r\n#               \"value\": \"%parameter4Mdx%\"\r\n#            }'\r\n#);\r\n\r\n\r\n##################################\r\n# Combine Job Json with Parameter(s)\r\n##################################\r\n\r\njsonParameters =\r\n'   \"parameters\": ' |\r\n    '[ '|\r\n#             ' | parameter1Json | ',\r\n#             ' | parameter2Json | ',\r\n#             ' | parameter3Json | ',\r\n#             ' | parameter4Json | '\r\n    ' ]';\r\n\r\n# Use an empty parameter override list if there are no overrides\r\n\r\njson = json |\r\n            jsonParameters | '\r\n}';\r\n\r\n\r\n###################################################\r\n# BUILD THE TARGET URL\r\n#\r\n# The local (on-prem) Reportworq API has no workspace concept, so there is no\r\n# ?workspace= to build - the endpoint is used as-is.\r\n###################################################\r\n\r\nvApiUrl = pApiUrl;\r\n\r\n\r\n###################################################\r\n# DEBUG VISIBILITY - REQUEST\r\n#\r\n# Log the exact target URL and request body at DEBUG severity. DEBUG is the\r\n# GATE: these lines are silent in a normal run and only surface when the TM1\r\n# server / process message logging is turned up to DEBUG. The INFO success line\r\n# and the ERROR / PROCESSERROR failure path further below are unchanged.\r\n###################################################\r\n\r\nLOGOUTPUT('DEBUG', 'Reportworq job request URL: ' | vApiUrl);\r\nLOGOUTPUT('DEBUG', 'Reportworq job request body: ' | json);\r\n\r\n\r\n###################################################\r\n# OPTIONAL REQUEST/RESPONSE DEBUG FILE (opt-in)\r\n#\r\n# When pRequestLogFolder is non-blank, write a timestamped copy of the exact\r\n# call - the URL, the JSON payload, and (below, after the call) the response\r\n# status and body - using the native TI TextOutput function. This RESTORES the\r\n# old \"see the exact call\" debug file the On-Prem 2.4 sample produced (that\r\n# sample used ExecuteCommand to echo the JSON to a file), but the v12-safe way:\r\n# NO shell, NO ExecuteCommand, NO PowerShell. It is OPT-IN because native file\r\n# output cannot be assumed on every v12 instance (no writable path is\r\n# guaranteed); leaving pRequestLogFolder blank (the default) writes nothing and\r\n# touches no filesystem, keeping the default path clean.\r\n###################################################\r\n\r\nvWriteRequestLog = 0;\r\nIF(pRequestLogFolder @<> '');\r\n  vWriteRequestLog = 1;\r\n\r\n  # Build a safe timestamped filename from pJobName using the same sanitizer +\r\n  # TIMST timestamp pattern as the On-Prem 2.4 sample, so the filename is valid.\r\n  sJobNameForFile = '';\r\n  sValidFileNameCharacters = '_- 1234567890abcdefghijklmnopqrstuvwxyz';\r\n  nCurrIdx = 1;\r\n  WHILE (nCurrIdx <= LONG(pJobName));\r\n    sCurrChar = SUBST( pJobName, nCurrIdx, 1 );\r\n\r\n    # Include characters in the list above\r\n    IF ( SCAN( LOWER( sCurrChar ), sValidFileNameCharacters ) > 0 );\r\n      sJobNameForFile = sJobNameForFile | sCurrChar;\r\n    ENDIF;\r\n\r\n    # Switch forward and back slashes to underscores\r\n    IF( sCurrChar @= '\\' % sCurrChar @= '/' );\r\n      sJobNameForFile = sJobNameForFile | '_';\r\n    ENDIF;\r\n    nCurrIdx = nCurrIdx + 1;\r\n  END;\r\n\r\n  vRequestLogFile = pRequestLogFolder | '/' | sJobNameForFile | '_Request_' | TIMST( NOW(), '\\Y\\m\\d\\h\\i\\s') | '.txt';\r\n\r\n  # Prevent TextOutput from wrapping the values in quotes (which would mangle\r\n  # the JSON) - same DatasourceASCIIQuoteCharacter guard the On-Prem 2.4 sample\r\n  # used; restored straight after the writes below.\r\n  OriginalQuoteCharacter = DatasourceASCIIQuoteCharacter;\r\n  DatasourceASCIIQuoteCharacter = ' ';\r\n\r\n  # TextOutput appends one line per call, building up the single file.\r\n  TextOutput( vRequestLogFile, 'URL: ' | vApiUrl );\r\n  TextOutput( vRequestLogFile, 'REQUEST BODY:' );\r\n  TextOutput( vRequestLogFile, json );\r\n\r\n  DatasourceASCIIQuoteCharacter = OriginalQuoteCharacter;\r\nENDIF;\r\n\r\n\r\n###################################################\r\n# EXECUTE THE JOB VIA ExecuteHttpRequest\r\n#\r\n# On v12 there is no shell and no PowerShell, so we POST the request directly\r\n# from TI. This on-prem sample authenticates with the local Reportworq API's\r\n# accessToken header ('-h accessToken: ' | pAccessToken).\r\n#\r\n# ---------------------------------------------------------------------\r\n# JSON-IN-\"-d\" CORRECTNESS - WHY THIS IS SAFE (and the one thing to test):\r\n# ---------------------------------------------------------------------\r\n# ExecuteHttpRequest takes the HTTP method as the first positional argument,\r\n# the URL second, and then one option string per following argument. Each\r\n# option is a SINGLE TI string argument in which the flag and its value are\r\n# concatenated (e.g. '-h accessToken: ' | pAccessToken, and '-d ' | json).\r\n#\r\n#   * NO SHELL IS INVOLVED. Unlike the old ExecuteCommand path (which built a\r\n#     cmd.exe / PowerShell command line, forcing us to escape quotes, juggle\r\n#     DatasourceASCIIQuoteCharacter, and echo the JSON to a file), the JSON\r\n#     here is passed as an ordinary in-process string argument. The double\r\n#     quotes inside the JSON are plain data - they need no escaping.\r\n#\r\n#   * THE PARSER ONLY STRIPS THE LEADING FLAG TOKEN. It reads '-d ' and treats\r\n#     everything after that first space as the verbatim body. Internal spaces\r\n#     and quotes in the body are preserved - this is the same reason a header\r\n#     value like 'accessToken: <token>' (which contains a space) is delivered\r\n#     intact.\r\n#\r\n#   * THE JSON REMAINS MULTI-LINE (identical to the cloud build). This is valid\r\n#     JSON - insignificant whitespace, including newlines between tokens, is\r\n#     allowed - and, because the whole payload is one argument, the newlines\r\n#     are carried as body content, not re-tokenized.\r\n#\r\n#   >>> PENDING VALIDATION ON A REAL PA v12 INSTANCE <<<\r\n#   The single assumption to confirm on a live v12 engine is that\r\n#   ExecuteHttpRequest carries the embedded NEWLINES in the '-d' value through\r\n#   to the request body unchanged. If a live test shows the multi-line body is\r\n#   mangled, the remedy is mechanical and does NOT change the JSON-building\r\n#   logic above: collapse the payload to a single line immediately before the\r\n#   call, e.g.\r\n#       json = SUBST(json, ...);   # strip CR/LF, or rebuild the EXPAND blocks\r\n#                                  # on one line\r\n#   Do not \"fix\" this by re-introducing a file or a shell - the whole point of\r\n#   the v12 sample is that neither is available.\r\n#\r\n# ---------------------------------------------------------------------\r\n# TLS / SELF-SIGNED CERTIFICATES ('-k' is included BY DEFAULT):\r\n# ---------------------------------------------------------------------\r\n# A local / on-prem Reportworq endpoint typically presents a SELF-SIGNED or\r\n# internal-CA certificate, so '-k' (skip TLS verification) is included below by\r\n# default - without it, ExecuteHttpRequest would refuse to connect to an\r\n# untrusted cert and the job would never be submitted. To ENFORCE certificate\r\n# verification instead, REMOVE the '-k' argument and, if the endpoint uses an\r\n# internal CA, add '-c <path-to-CA-file>' as an extra option argument.\r\n###################################################\r\n\r\nExecuteHttpRequest(\r\n    'POST',\r\n    vApiUrl,\r\n    '-h accessToken: ' | pAccessToken,\r\n    '-h Content-Type: application/json',\r\n    '-k',\r\n    '-d ' | json\r\n);\r\n\r\n\r\n###################################################\r\n# READ AND CHECK THE RESPONSE\r\n#\r\n# ExecuteHttpRequest caches a single HTTP response (status code, headers,\r\n# body). We read it with the no-argument response functions, which is the\r\n# form shown in IBM's own community examples.\r\n#\r\n# >>> PENDING VALIDATION: if the PA 3.1.0 documentation on your instance\r\n#     specifies a response-handle form (e.g. HttpResponseGetStatusCode(hResp)),\r\n#     capture the handle returned by ExecuteHttpRequest above and pass it here.\r\n###################################################\r\n\r\nnStatus = HttpResponseGetStatusCode();\r\n\r\n\r\n###################################################\r\n# DEBUG VISIBILITY - RESPONSE\r\n#\r\n# Log the HTTP status and response body at DEBUG severity (silent unless the\r\n# server / process message logging is at DEBUG). This is in addition to the INFO\r\n# success line and the ERROR failure path below - it fires for both outcomes.\r\n###################################################\r\n\r\nLOGOUTPUT('DEBUG', 'Reportworq job response HTTP status: ' | NUMBERTOSTRING(nStatus));\r\nLOGOUTPUT('DEBUG', 'Reportworq job response body: ' | HttpResponseGetBody());\r\n\r\n# Append the response (status + body) to the optional debug file, if one was\r\n# opened above. Same DatasourceASCIIQuoteCharacter guard, restored after.\r\nIF(vWriteRequestLog = 1);\r\n  OriginalQuoteCharacter = DatasourceASCIIQuoteCharacter;\r\n  DatasourceASCIIQuoteCharacter = ' ';\r\n\r\n  TextOutput( vRequestLogFile, 'RESPONSE STATUS: ' | NUMBERTOSTRING(nStatus) );\r\n  TextOutput( vRequestLogFile, 'RESPONSE BODY:' );\r\n  TextOutput( vRequestLogFile, HttpResponseGetBody() );\r\n\r\n  DatasourceASCIIQuoteCharacter = OriginalQuoteCharacter;\r\nENDIF;\r\n\r\n\r\n# Treat ONLY a 2xx status as success. Anything outside 200-299 is a failure:\r\n# a 0 status means the request never completed (DNS/TLS/connect failure) and a\r\n# 3xx means the job was NOT run (an unfollowed redirect), so neither can be\r\n# accepted as \"submitted\". (% is the TI logical-OR operator.)\r\nIF(nStatus < 200 % nStatus >= 300);\r\n  LOGOUTPUT('ERROR', 'Reportworq job request failed. HTTP status: ' | NUMBERTOSTRING(nStatus) | '. Response body: ' | HttpResponseGetBody());\r\n  PROCESSERROR;\r\nENDIF;\r\n\r\nLOGOUTPUT('INFO', 'Reportworq job request submitted for \"' | pJobName | '\". HTTP status: ' | NUMBERTOSTRING(nStatus) | '.');\r\n",
  "MetadataProcedure": "\r\n#****Begin: Generated Statements***\r\n#****End: Generated Statements****",
  "DataProcedure": "\r\n#****Begin: Generated Statements***\r\n#****End: Generated Statements****",
  "EpilogProcedure": "\r\n#****Begin: Generated Statements***\r\n#****End: Generated Statements****",
  "Parameters": [
    {
      "Name": "pApiUrl",
      "Prompt": "Api endpoint for running a job from TI",
      "Value": "https://localhost:8600/api/v1/run",
      "Type": "String"
    },
    {
      "Name": "pAccessToken",
      "Prompt": "Access token required for API access — in Reportworq: Settings → Reportworq API → the Local API access token",
      "Value": "",
      "Type": "String"
    },
    {
      "Name": "pJobName",
      "Prompt": "Reportworq Job Path (MyFolder/MyJob or MyJob)",
      "Value": "",
      "Type": "String"
    },
    {
      "Name": "pNotificationEmail",
      "Prompt": "Email address to send notification (optional)",
      "Value": "",
      "Type": "String"
    },
    {
      "Name": "pHoldForDelivery",
      "Prompt": "Hold Jobs for Review before Distribution (true/false)",
      "Value": "false",
      "Type": "String"
    },
    {
      "Name": "pAllowedFileOutputTypes",
      "Prompt": "Allowed output types for the job, semicolon delimited, blank defaults to all configured (excel/pdf/ppt/csv)",
      "Value": "",
      "Type": "String"
    },
    {
      "Name": "pAllowedDestinationTypes",
      "Prompt": "Allowed distribution types for the job, semicolon delimited, blank defaults to all configured (file/sharepoint/sheets/email/slack/teams)",
      "Value": "",
      "Type": "String"
    },
    {
      "Name": "pConvertPowerPointToPdf",
      "Prompt": "Convert PPT files to PDF before Distribution (true/false)",
      "Value": "",
      "Type": "String"
    },
    {
      "Name": "pLogLevel",
      "Prompt": "Optional Reportworq job log level (Debug/Trace)",
      "Value": "",
      "Type": "String"
    },
    {
      "Name": "pRequestLogFolder",
      "Prompt": "Optional folder to write a timestamped copy of the request (URL + JSON payload) and response (status + body) for debugging. Leave blank to write no file",
      "Value": "",
      "Type": "String"
    }
  ]
}