{
  "info": {
    "_postman_id": "268aa7a1-6f06-42e1-a787-86d163464360",
    "name": "ATRS Public REST API",
    "schema": "https://schema.postman.com/json/collection/v2.1.0/collection.json",
    "description": "ATRS REST API request collection. Import the environment template, set your ATRS origin and private credentials, and send requests individually. Start with Service / Ping, authenticate with OAuth2 / token or Login / token, then use TableauAccount / GetAccounts. Use the Package and PackageSchedule folders to create and manage report packages. Supply a complete package JSON definition in atrs_package_create_json. Execute report schedules with ScheduleType report and packages with ScheduleType package. Retain ExecutionId, monitor the result and check the actual reports and delivery. No automatic polling, retries or token renewal are configured.\n\nFollow https://atrs.readme.io/docs/use-the-atrs-api-with-postman for import and usage instructions. Keep credentials private and remove secrets before exporting an environment."
  },
  "item": [
    {
      "name": "Folder",
      "item": [
        {
          "name": "Get a folder",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Folder/Get?id={{atrs_folder_id}}",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Folder",
                "Get"
              ],
              "query": [
                {
                  "key": "id",
                  "value": "{{atrs_folder_id}}"
                }
              ]
            },
            "description": "Retrieve one folder by numeric identifier. Subfolders and schedules are separate operations.\n\nReference: https://atrs.readme.io/reference/folderget\n\nConfigure: atrs_folder_id."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "positiveInteger(\"atrs_folder_id\");",
                  "requiredValue(\"atrs_folder_id\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Resolve a folder path",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Folder/GetFolderFromPath",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Folder",
                "GetFolderFromPath"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Resolve an existing ATRS folder path into its folder representation.\n\nReference: https://atrs.readme.io/reference/foldergetfolderfrompath\n\nConfigure: atrs_folder_path."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "const payload = {path:requiredValue(\"atrs_folder_path\")};",
                  "pm.variables.set(\"atrs_request_body_json\", JSON.stringify(payload));",
                  "requiredValue(\"atrs_folder_path\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "List schedules in a folder",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Folder/GetSchedules?id={{atrs_folder_id}}",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Folder",
                "GetSchedules"
              ],
              "query": [
                {
                  "key": "id",
                  "value": "{{atrs_folder_id}}"
                }
              ]
            },
            "description": "List schedules visible to the authenticated user in the selected ATRS folder.\n\nReference: https://atrs.readme.io/reference/foldergetschedules\n\nConfigure: atrs_folder_id."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "positiveInteger(\"atrs_folder_id\");",
                  "requiredValue(\"atrs_folder_id\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "List subfolders",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Folder/GetSubFolders?id={{atrs_folder_id}}",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Folder",
                "GetSubFolders"
              ],
              "query": [
                {
                  "key": "id",
                  "value": "{{atrs_folder_id}}"
                }
              ]
            },
            "description": "Retrieve the subfolders beneath the supplied ATRS folder identifier.\n\nReference: https://atrs.readme.io/reference/foldergetsubfolders\n\nConfigure: atrs_folder_id."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "positiveInteger(\"atrs_folder_id\");",
                  "requiredValue(\"atrs_folder_id\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Resolve a schedule identifier",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Folder/GetUniqueIdFromPath",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Folder",
                "GetUniqueIdFromPath"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Resolve a folder path, schedule name and schedule type into uniqueid. Use this identifier with the corresponding schedule operations.\n\nReference: https://atrs.readme.io/reference/foldergetuniqueidfrompath\n\nConfigure: atrs_folder_path, atrs_schedule_name, atrs_schedule_type."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "scheduleFamily();",
                  "const payload = {path:requiredValue(\"atrs_folder_path\"),scheduleName:requiredValue(\"atrs_schedule_name\"),scheduleType:requiredValue(\"atrs_schedule_type\")};",
                  "pm.variables.set(\"atrs_request_body_json\", JSON.stringify(payload));",
                  "requiredValue(\"atrs_folder_path\");",
                  "requiredValue(\"atrs_schedule_name\");",
                  "requiredValue(\"atrs_schedule_type\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Create a folder",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Folder/Createfolder",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Folder",
                "Createfolder"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Create a child folder using lowercase foldername and parentid. The response is a boolean, not the new folder identifier. Resolve the resulting path to obtain FolderId. Duplicate names and invalid parents can fail.\n\nReference: https://atrs.readme.io/reference/foldercreatefolder\n\nSet atrs_foldercreatefolder_json to the complete JSON request shown in the reference."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "  const origin = String(pm.variables.get(\"atrs_base_url\") || \"\");",
                  "  if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Set atrs_base_url to the API origin without /api or a trailing slash\");",
                  "  if (!String(pm.variables.get(\"atrs_token\") || \"\").trim()) throw new Error(\"Authenticate before sending this request\");",
                  "  const raw = pm.variables.get(\"atrs_foldercreatefolder_json\");",
                  "  if (!String(raw || \"\").trim()) throw new Error(\"Set atrs_foldercreatefolder_json to the complete request JSON\");",
                  "  const body = JSON.parse(raw);",
                  "  if (!body || typeof body !== \"object\" || Array.isArray(body)) throw new Error(\"Use a JSON object\");",
                  "  pm.variables.set(\"atrs_request_body_json\", JSON.stringify(body));",
                  "} catch (error) {",
                  "  console.error(error.message);",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Login",
      "item": [
        {
          "name": "Authenticate an ATRS user",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Login/token",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Login",
                "token"
              ]
            },
            "auth": {
              "type": "noauth"
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Authenticate with username and password. A successful response returns the user token model, including token and ExpiryDateEpoch. Send Authorization: Bearer followed by the returned token. Invalid credentials return HTTP 401.\n\nReference: https://atrs.readme.io/reference/logintoken\n\nConfigure: atrs_username, atrs_password."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "pm.environment.unset(\"atrs_token\");pm.environment.unset(\"atrs_token_expires_in\");pm.environment.unset(\"atrs_token_expiry_epoch\");",
                  "const payload = {username:requiredValue(\"atrs_username\"),password:requiredValue(\"atrs_password\")};",
                  "pm.variables.set(\"atrs_request_body_json\", JSON.stringify(payload));",
                  "requiredValue(\"atrs_username\");",
                  "requiredValue(\"atrs_password\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code !== 200) throw new Error(\"Authentication failed; no stored token is available\");",
                  "const data = pm.response.json();",
                  "if (data.RequiresMfa === true) throw new Error(\"Authentication is incomplete; do not use a challenge as a token\");",
                  "if (typeof data.token !== \"string\" || !data.token.trim() || typeof data.ExpiryDateEpoch !== \"number\" || !Number.isFinite(data.ExpiryDateEpoch) || data.ExpiryDateEpoch <= 0) throw new Error(\"Missing token or expiry\");",
                  "pm.environment.set(\"atrs_token\", data.token);",
                  "pm.environment.set(\"atrs_token_expiry_epoch\", String(data.ExpiryDateEpoch));"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "OAuth2",
      "item": [
        {
          "name": "Issue an OAuth2 client token",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/OAuth2/token",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "OAuth2",
                "token"
              ]
            },
            "auth": {
              "type": "noauth"
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Exchange client credentials for a bearer token. The response includes expires_in=86399 seconds.\n\nReference: https://atrs.readme.io/reference/oauth2token\n\nConfigure: atrs_client_id, atrs_client_secret."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "pm.environment.unset(\"atrs_token\");pm.environment.unset(\"atrs_token_expires_in\");pm.environment.unset(\"atrs_token_expiry_epoch\");",
                  "const payload = {grant_type:\"client_credentials\",client_id:requiredValue(\"atrs_client_id\"),client_secret:requiredValue(\"atrs_client_secret\")};",
                  "pm.variables.set(\"atrs_request_body_json\", JSON.stringify(payload));",
                  "requiredValue(\"atrs_client_id\");",
                  "requiredValue(\"atrs_client_secret\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code !== 200) throw new Error(\"Authentication failed; no stored token is available\");",
                  "const data = pm.response.json();",
                  "if (data.RequiresMfa === true) throw new Error(\"Authentication is incomplete; do not use a challenge as a token\");",
                  "if (typeof data.access_token !== \"string\" || !data.access_token.trim() || typeof data.expires_in !== \"number\" || !Number.isSafeInteger(data.expires_in) || data.expires_in <= 0) throw new Error(\"Missing token or lifetime\");",
                  "pm.environment.set(\"atrs_token\", data.access_token);",
                  "pm.environment.set(\"atrs_token_expires_in\", String(data.expires_in));"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Package",
      "item": [
        {
          "name": "Clone a package",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Package/Clone?Id={{atrs_package_id}}",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Package",
                "Clone"
              ],
              "query": [
                {
                  "key": "Id",
                  "value": "{{atrs_package_id}}"
                }
              ]
            },
            "description": "Create a copy of the package and return its new numeric identifier. Retrieve the copy and check its recurrence, reports and destinations before execution. This GET creates persisted data; do not automatically retry an uncertain response.\n\nReference: https://atrs.readme.io/reference/packageclone\n\nConfigure: atrs_package_id."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "positiveInteger(\"atrs_package_id\");",
                  "requiredValue(\"atrs_package_id\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Get a package through Package",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Package/Get?Id={{atrs_package_id}}",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Package",
                "Get"
              ],
              "query": [
                {
                  "key": "Id",
                  "value": "{{atrs_package_id}}"
                }
              ]
            },
            "description": "Retrieve a package by its package-level Id. The response uses PackageName and Reports and includes recurrence, destinations and data-driver settings. Keep the intended complete definition separately when editing or transferring a package.\n\nReference: https://atrs.readme.io/reference/packageget\n\nConfigure: atrs_package_id."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "positiveInteger(\"atrs_package_id\");",
                  "requiredValue(\"atrs_package_id\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "List reports in a package",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Package/GetReportsInPackage?Id={{atrs_package_id}}",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Package",
                "GetReportsInPackage"
              ],
              "query": [
                {
                  "key": "Id",
                  "value": "{{atrs_package_id}}"
                }
              ]
            },
            "description": "Return report summaries for the selected package. Use the package-level Id. Member identifiers refer to individual reports and are not the package identifier.\n\nReference: https://atrs.readme.io/reference/packagegetreportsinpackage\n\nConfigure: atrs_package_id."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "positiveInteger(\"atrs_package_id\");",
                  "requiredValue(\"atrs_package_id\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Create a package through Package",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Package/Create",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Package",
                "Create"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Create an ATRS package with PackageName, FolderPath, Schedule, Reports and delivery destinations. Set DataDriven to true and provide DataDriver for a data-driven package. JSON drivers use DataDriverType 1 and ValuesJson; SQL drivers use type 0 with ConString and Query. Include both destination arrays, using [] for an unused type. This operation has different validation from PackageSchedule/Create. See [Create and Manage Report Packages](/docs/create-and-manage-report-packages).\n\nReference: https://atrs.readme.io/reference/packagecreate"
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "  const origin = String(pm.variables.get(\"atrs_base_url\") || \"\");",
                  "  if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Set atrs_base_url to the API origin without /api or a trailing slash\");",
                  "  if (!String(pm.variables.get(\"atrs_token\") || \"\").trim()) throw new Error(\"Authenticate before sending this request\");",
                  "  const value = pm.variables.get(\"atrs_package_create_json\");",
                  "  if (!String(value || \"\").trim()) throw new Error(\"Set atrs_package_create_json to the complete package JSON\");",
                  "  const body = JSON.parse(value);",
                  "  if (!body || typeof body !== \"object\" || Array.isArray(body)) throw new Error(\"Use a package object\");",
                  "  if (!String(body.PackageName || \"\").trim() || !String(body.FolderPath || \"\").trim() || !body.Schedule) throw new Error(\"Supply PackageName, FolderPath and Schedule\");",
                  "  if (!Array.isArray(body.Reports) || !body.Reports.length || !Array.isArray(body.EmailDestinations) || !Array.isArray(body.DiskDestinations)) throw new Error(\"Supply Reports and both complete destination arrays\");",
                  "  pm.variables.set(\"atrs_request_body_json\", JSON.stringify(body));",
                  "} catch (error) {",
                  "  console.error(error.message);",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code !== 200) throw new Error(\"Package request failed; inspect ATRS before retrying\");",
                  "const data = pm.response.json();",
                  "if (!Number.isSafeInteger(data.UniqueId) || data.UniqueId <= 0) throw new Error(\"No valid package UniqueId returned; inspect ATRS before retrying\");",
                  "pm.environment.set(\"atrs_package_id\", String(data.UniqueId));"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "PackageSchedule",
      "item": [
        {
          "name": "Delete a package",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/PackageSchedule/Delete?Id={{atrs_package_id}}",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "PackageSchedule",
                "Delete"
              ],
              "query": [
                {
                  "key": "Id",
                  "value": "{{atrs_package_id}}"
                }
              ]
            },
            "description": "Delete the package identified by Id and return a JSON boolean. Use the package-level identifier. Deletion does not recall delivered files or cancel an execution already in progress.\n\nReference: https://atrs.readme.io/reference/packagescheduledelete\n\nConfigure: atrs_package_id."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "positiveInteger(\"atrs_package_id\");",
                  "requiredValue(\"atrs_package_id\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Get a package",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/PackageSchedule/Get?Id={{atrs_package_id}}",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "PackageSchedule",
                "Get"
              ],
              "query": [
                {
                  "key": "Id",
                  "value": "{{atrs_package_id}}"
                }
              ]
            },
            "description": "Retrieve the package identified by Id, including its PackageName, Reports, Schedule, destinations and DataDriver. Use the package-level identifier returned by creation.\n\nReference: https://atrs.readme.io/reference/packagescheduleget\n\nConfigure: atrs_package_id."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "positiveInteger(\"atrs_package_id\");",
                  "requiredValue(\"atrs_package_id\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Search packages by keywords",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/PackageSchedule/GetAll",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "PackageSchedule",
                "GetAll"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "List packages or search their Keywords. Send a JSON body with FilterValues, FilterOperator and MatchType. Operators are =, <>, LIKE and NOT LIKE; MatchType is ALL or ANY. Missing or blank filter values return the unfiltered list. This GET uses a request body; use a client that supports JSON bodies on GET requests.\n\nReference: https://atrs.readme.io/reference/packageschedulegetallget\n\nConfigure atrs_search_keywords_json, atrs_search_operator and atrs_search_match_type.\n\nThis collection requires nonblank atrs_search_keywords_json values. Missing filters in the API return an unfiltered list."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "const payload = {FilterValues:JSON.parse(requiredValue(\"atrs_search_keywords_json\")),FilterOperator:requiredValue(\"atrs_search_operator\"),MatchType:requiredValue(\"atrs_search_match_type\")};",
                  "if (!Array.isArray(payload.FilterValues) || !payload.FilterValues.length || payload.FilterValues.some(v => typeof v !== \"string\" || !v.trim())) throw new Error(\"Supply nonempty explicit keyword strings\");",
                  "if (![\"=\",\"<>\",\"LIKE\",\"NOT LIKE\"].includes(String(payload.FilterOperator).trim().toUpperCase())) throw new Error(\"Unsupported keyword operator\");",
                  "if (![\"ALL\",\"ANY\"].includes(String(payload.MatchType).trim().toUpperCase())) throw new Error(\"Choose ALL or ANY\");",
                  "pm.variables.set(\"atrs_request_body_json\", JSON.stringify(payload));",
                  "requiredValue(\"atrs_search_keywords_json\");",
                  "requiredValue(\"atrs_search_operator\");",
                  "requiredValue(\"atrs_search_match_type\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Create a package",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/PackageSchedule/Create",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "PackageSchedule",
                "Create"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Create an ATRS package containing Tableau reports, recurrence and delivery destinations. Use PackageName and Reports. Include both EmailDestinations and DiskDestinations, using [] for an unused type. For a JSON data-driven package, set DataDriven to true and include DataDriver with DataDriverType 1, KeyField and nonempty ValuesJson containing serialized row JSON. This endpoint validates ValuesJson for data-driven creation; use Package/Create for a SQL-backed definition. A successful response contains the package UniqueId. Follow [Create and Manage Report Packages](/docs/create-and-manage-report-packages) or [Create a Data-Driven Tableau Package](/docs/configure-data-driven-tableau-packages).\n\nReference: https://atrs.readme.io/reference/packageschedulecreate"
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "  const origin = String(pm.variables.get(\"atrs_base_url\") || \"\");",
                  "  if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Set atrs_base_url to the API origin without /api or a trailing slash\");",
                  "  if (!String(pm.variables.get(\"atrs_token\") || \"\").trim()) throw new Error(\"Authenticate before sending this request\");",
                  "  const value = pm.variables.get(\"atrs_package_create_json\");",
                  "  if (!String(value || \"\").trim()) throw new Error(\"Set atrs_package_create_json to the complete package JSON\");",
                  "  const body = JSON.parse(value);",
                  "  if (!body || typeof body !== \"object\" || Array.isArray(body)) throw new Error(\"Use a package object\");",
                  "  if (!String(body.PackageName || \"\").trim() || !String(body.FolderPath || \"\").trim() || !body.Schedule) throw new Error(\"Supply PackageName, FolderPath and Schedule\");",
                  "  if (!Array.isArray(body.Reports) || !body.Reports.length || !Array.isArray(body.EmailDestinations) || !Array.isArray(body.DiskDestinations)) throw new Error(\"Supply Reports and both complete destination arrays\");",
                  "  if (body.DataDriven === true) { if (!body.DataDriver || typeof body.DataDriver.ValuesJson !== \"string\" || !body.DataDriver.ValuesJson.trim() || !Array.isArray(JSON.parse(body.DataDriver.ValuesJson))) throw new Error(\"Supply DataDriver.ValuesJson as serialized JSON rows\"); }",
                  "  pm.variables.set(\"atrs_request_body_json\", JSON.stringify(body));",
                  "} catch (error) {",
                  "  console.error(error.message);",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code !== 200) throw new Error(\"Package request failed; inspect ATRS before retrying\");",
                  "const data = pm.response.json();",
                  "if (!Number.isSafeInteger(data.UniqueId) || data.UniqueId <= 0) throw new Error(\"No valid package UniqueId returned; inspect ATRS before retrying\");",
                  "pm.environment.set(\"atrs_package_id\", String(data.UniqueId));"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Schedule",
      "item": [
        {
          "name": "Terminate an execution process",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Schedule/CancelExecution?ExecutionId={{atrs_execution_id}}",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Schedule",
                "CancelExecution"
              ],
              "query": [
                {
                  "key": "ExecutionId",
                  "value": "{{atrs_execution_id}}"
                }
              ]
            },
            "description": "Terminate the process associated with ExecutionId. The service looks up the execution record, resolves ProcessId and kills that process, then records Terminated by user with a failed result. A waiting execution without a live associated process may fail; this is not a general guarantee that any queued job can be removed. This GET changes execution state. Already rendered or delivered outputs are not undone. The recorded result has ErrorMessage=\"Execution cancelled by user\", ErrorNumber=-102562911 and Result=false. Poll status after cancellation to reconcile the result.\n\nReference: https://atrs.readme.io/reference/schedulecancelexecution\n\nConfigure: atrs_execution_id."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "requiredValue(\"atrs_execution_id\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Disable a schedule",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Schedule/DisableSchedule",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Schedule",
                "DisableSchedule"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Disable future scheduled execution for the supplied schedule. This does not promise cancellation of an already running job.\n\nReference: https://atrs.readme.io/reference/scheduledisableschedule\n\nConfigure: atrs_schedule_type, atrs_schedule_id."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "positiveInteger(\"atrs_schedule_id\");scheduleFamily();",
                  "const payload = {ScheduleType:requiredValue(\"atrs_schedule_type\"),UniqueId:Number(requiredValue(\"atrs_schedule_id\")),RunBy:\"API\"};",
                  "pm.variables.set(\"atrs_request_body_json\", JSON.stringify(payload));",
                  "requiredValue(\"atrs_schedule_type\");",
                  "requiredValue(\"atrs_schedule_id\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Enable a schedule",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Schedule/EnableSchedule",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Schedule",
                "EnableSchedule"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Enable the supplied schedule for scheduled execution.\n\nReference: https://atrs.readme.io/reference/scheduleenableschedule\n\nConfigure: atrs_schedule_type, atrs_schedule_id."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "positiveInteger(\"atrs_schedule_id\");scheduleFamily();",
                  "const payload = {ScheduleType:requiredValue(\"atrs_schedule_type\"),UniqueId:Number(requiredValue(\"atrs_schedule_id\")),RunBy:\"API\"};",
                  "pm.variables.set(\"atrs_request_body_json\", JSON.stringify(payload));",
                  "requiredValue(\"atrs_schedule_type\");",
                  "requiredValue(\"atrs_schedule_id\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Execute a schedule synchronously",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Schedule/ExecuteSchedule",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Schedule",
                "ExecuteSchedule"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Execute the selected schedule and wait for the execution result. Check Result as well as the HTTP status; a successful HTTP response can carry Result=false.\n\nReference: https://atrs.readme.io/reference/scheduleexecuteschedule\n\nConfigure: atrs_schedule_type, atrs_schedule_id."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "positiveInteger(\"atrs_schedule_id\");scheduleFamily();",
                  "const payload = {ScheduleType:requiredValue(\"atrs_schedule_type\"),UniqueId:Number(requiredValue(\"atrs_schedule_id\")),RunBy:\"API\"};",
                  "pm.variables.set(\"atrs_request_body_json\", JSON.stringify(payload));",
                  "requiredValue(\"atrs_schedule_type\");",
                  "requiredValue(\"atrs_schedule_id\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Queue a schedule asynchronously",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Schedule/ExecuteScheduleAsync",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Schedule",
                "ExecuteScheduleAsync"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Queue an execution and return its ExecutionId. Poll GetExecutionStatus, inspect ResultJson, and confirm output delivery. Use bounded polling and reconcile ambiguous submission outcomes before retrying; no idempotency-key contract is exposed.\n\nReference: https://atrs.readme.io/reference/scheduleexecutescheduleasync\n\nConfigure: atrs_schedule_type, atrs_schedule_id."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "positiveInteger(\"atrs_schedule_id\");scheduleFamily();",
                  "pm.environment.unset(\"atrs_execution_id\");",
                  "const payload = {ScheduleType:requiredValue(\"atrs_schedule_type\"),UniqueId:Number(requiredValue(\"atrs_schedule_id\")),RunBy:\"API\"};",
                  "pm.variables.set(\"atrs_request_body_json\", JSON.stringify(payload));",
                  "requiredValue(\"atrs_schedule_type\");",
                  "requiredValue(\"atrs_schedule_id\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code !== 200) throw new Error(\"Submission outcome is uncertain; investigate before submitting again\");",
                  "const data = pm.response.json();",
                  "if (typeof data.ExecutionId !== \"string\" || !data.ExecutionId.trim()) throw new Error(\"Missing ExecutionId; reconcile the submission before retrying\");",
                  "pm.environment.set(\"atrs_execution_id\", data.ExecutionId);"
                ]
              }
            }
          ]
        },
        {
          "name": "Execute with event context",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Schedule/ExecuteScheduleByEventAsync",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Schedule",
                "ExecuteScheduleByEventAsync"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Queue an event-triggered execution carrying EventName, EventId and string AsyncData. Context content depends on the triggering event and is not a common structured JSON body. Retain ExecutionId for monitoring.\n\nReference: https://atrs.readme.io/reference/scheduleexecuteschedulebyeventasync\n\nConfigure: atrs_event_request_json."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "const payload = JSON.parse(requiredValue(\"atrs_event_request_json\"));",
                  "pm.variables.set(\"atrs_request_body_json\", JSON.stringify(payload));",
                  "requiredValue(\"atrs_event_request_json\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Execute and advance the schedule",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Schedule/ExecuteScheduleOnTimeAsync",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Schedule",
                "ExecuteScheduleOnTimeAsync"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Queue execution through the scheduled-time path. This mode advances NextRun after completion. Do not use it interchangeably with on-demand execution when preserving the next scheduled run matters.\n\nReference: https://atrs.readme.io/reference/scheduleexecutescheduleontimeasync\n\nConfigure: atrs_schedule_type, atrs_schedule_id."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "positiveInteger(\"atrs_schedule_id\");scheduleFamily();",
                  "const payload = {ScheduleType:requiredValue(\"atrs_schedule_type\"),UniqueId:Number(requiredValue(\"atrs_schedule_id\")),RunBy:\"API\"};",
                  "pm.variables.set(\"atrs_request_body_json\", JSON.stringify(payload));",
                  "requiredValue(\"atrs_schedule_type\");",
                  "requiredValue(\"atrs_schedule_id\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Read the API execution queue",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Schedule/GetExecutionQueue",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Schedule",
                "GetExecutionQueue"
              ]
            },
            "description": "Return waiting, executing and retained API queue records. The queue includes completed entries whose completion age is less than 120000 seconds (33 hours 20 minutes). That selection window is not a guarantee of durable retention or a universal deletion schedule. Store execution history separately when durable retention is required. Inspect ResultJson to distinguish successful and failed completion.\n\nReference: https://atrs.readme.io/reference/schedulegetexecutionqueue\n\nConfigure: atrs_base_url."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Get an execution status",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Schedule/GetExecutionStatus?ExecutionId={{atrs_execution_id}}",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Schedule",
                "GetExecutionStatus"
              ],
              "query": [
                {
                  "key": "ExecutionId",
                  "value": "{{atrs_execution_id}}"
                }
              ]
            },
            "description": "Read one queue entry using ExecutionId. Parse ResultJson separately. Completed can contain a failed result; a timeout can report ErrorNumber=1041226. An empty result on a stale entry is not success. The configured cleanup timeout defaults to 36000 seconds (10 hours). Cleanup can mark an overdue entry Completed with a failed ResultJson; its message says 10 hours even if the configured timeout differs. This is distinct from retained queue history and client polling deadlines.\n\nReference: https://atrs.readme.io/reference/schedulegetexecutionstatus\n\nConfigure: atrs_execution_id.\n\nThe execution bridge can synthesize a successful result when application output contains no JSON. A boolean Result: true is insufficient evidence of rendering or delivery; inspect actual output and destination."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "requiredValue(\"atrs_execution_id\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code !== 200) throw new Error(\"Status request failed; keep monitoring the same execution after resolving the error\");",
                  "const data = pm.response.json();",
                  "if (data.ExecutionId !== pm.variables.get(\"atrs_execution_id\")) throw new Error(\"Execution ID mismatch\");",
                  "if (typeof data.Status !== \"string\" || !data.Status.trim() || data.Status === \"Stale\") throw new Error(\"Execution state needs reconciliation; do not resubmit\");",
                  "if (data.Status === \"Terminated by user\") throw new Error(\"Execution was terminated; reconcile its outcome\");",
                  "if (data.Status === \"Completed\") {",
                  " if (typeof data.ResultJson !== \"string\" || !data.ResultJson.trim()) throw new Error(\"No execution result; investigate before retrying\");",
                  " const result = JSON.parse(data.ResultJson);",
                  " if (!result || result.Result !== true) throw new Error(\"Execution did not report boolean Result: true\");",
                  " console.log(\"Execution reports success. Verify actual report contents and delivery separately.\");",
                  "} else { console.log(\"Status:\", data.Status, \"; inspect within your monitoring deadline; do not resubmit.\"); }"
                ]
              }
            }
          ]
        },
        {
          "name": "Get available execution threads",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Schedule/GetNumberOfFreeThreads",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Schedule",
                "GetNumberOfFreeThreads"
              ]
            },
            "description": "Return available capacity for the current server. The default capacity is four; configuration can change it, and the result is clamped to zero. The calculation can clean up old execution entries. This is a snapshot, not a capacity reservation. Schedule-process concurrency, per-schedule page-renderer processes and data-driver row threads are different capacities. The number returned here does not describe all three and does not reserve capacity.\n\nReference: https://atrs.readme.io/reference/schedulegetnumberoffreethreads\n\nConfigure: atrs_base_url."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Rename a schedule",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Schedule/RenameSchedule",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Schedule",
                "RenameSchedule"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Rename an existing schedule. Supply ScheduleName with the new name, ScheduleType and uniqueid.\n\nReference: https://atrs.readme.io/reference/schedulerenameschedule\n\nConfigure: atrs_schedule_type, atrs_schedule_id, atrs_new_schedule_name."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "positiveInteger(\"atrs_schedule_id\");scheduleFamily();",
                  "const payload = {ScheduleType:requiredValue(\"atrs_schedule_type\"),UniqueId:Number(requiredValue(\"atrs_schedule_id\")),RunBy:\"API\",ScheduleName:requiredValue(\"atrs_new_schedule_name\")};",
                  "pm.variables.set(\"atrs_request_body_json\", JSON.stringify(payload));",
                  "requiredValue(\"atrs_schedule_type\");",
                  "requiredValue(\"atrs_schedule_id\");",
                  "requiredValue(\"atrs_new_schedule_name\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Terminate a schedule process",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Schedule/TerminateSchedule?ProcessId={{atrs_process_id}}",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Schedule",
                "TerminateSchedule"
              ],
              "query": [
                {
                  "key": "ProcessId",
                  "value": "{{atrs_process_id}}"
                }
              ]
            },
            "description": "Terminate the process identified by ProcessId. This GET changes server state. Termination does not reverse outputs already delivered and is distinct from cancelling an ExecutionId.\n\nReference: https://atrs.readme.io/reference/scheduleterminateschedule\n\nConfigure: atrs_process_id."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "positiveInteger(\"atrs_process_id\");",
                  "requiredValue(\"atrs_process_id\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Dispatch a schedule asynchronously",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Schedule/DispatchScheduleAsync",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Schedule",
                "DispatchScheduleAsync"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Dispatch an execution through the collaboration-aware path and return an ExecutionId. Collaboration configuration and participating servers affect where work runs. A returned identifier acknowledges dispatch, not successful delivery.\n\nReference: https://atrs.readme.io/reference/scheduledispatchscheduleasync\n\nSet atrs_scheduledispatchscheduleasync_json to the complete JSON request shown in the reference."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "  const origin = String(pm.variables.get(\"atrs_base_url\") || \"\");",
                  "  if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Set atrs_base_url to the API origin without /api or a trailing slash\");",
                  "  if (!String(pm.variables.get(\"atrs_token\") || \"\").trim()) throw new Error(\"Authenticate before sending this request\");",
                  "  const raw = pm.variables.get(\"atrs_scheduledispatchscheduleasync_json\");",
                  "  if (!String(raw || \"\").trim()) throw new Error(\"Set atrs_scheduledispatchscheduleasync_json to the complete request JSON\");",
                  "  const body = JSON.parse(raw);",
                  "  if (!body || typeof body !== \"object\" || Array.isArray(body)) throw new Error(\"Use a JSON object\");",
                  "  pm.variables.set(\"atrs_request_body_json\", JSON.stringify(body));",
                  "  pm.environment.unset(\"atrs_execution_id\");",
                  "} catch (error) {",
                  "  console.error(error.message);",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code !== 200) throw new Error(\"Inspect the submission outcome before retrying\");",
                  "const data = pm.response.json();",
                  "if (typeof data.ExecutionId !== \"string\" || !data.ExecutionId.trim()) throw new Error(\"No ExecutionId returned; inspect ATRS before retrying\");",
                  "pm.environment.set(\"atrs_execution_id\", data.ExecutionId);"
                ]
              }
            }
          ]
        },
        {
          "name": "Start an immediate execution process",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Schedule/ExecuteScheduleInstant",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Schedule",
                "ExecuteScheduleInstant"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Start the immediate execution path and return ProcessId. This is a process identifier, not an ExecutionId. Use process-oriented monitoring and recovery appropriately.\n\nReference: https://atrs.readme.io/reference/scheduleexecutescheduleinstant\n\nSet atrs_scheduleexecutescheduleinstant_json to the complete JSON request shown in the reference."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "  const origin = String(pm.variables.get(\"atrs_base_url\") || \"\");",
                  "  if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Set atrs_base_url to the API origin without /api or a trailing slash\");",
                  "  if (!String(pm.variables.get(\"atrs_token\") || \"\").trim()) throw new Error(\"Authenticate before sending this request\");",
                  "  const raw = pm.variables.get(\"atrs_scheduleexecutescheduleinstant_json\");",
                  "  if (!String(raw || \"\").trim()) throw new Error(\"Set atrs_scheduleexecutescheduleinstant_json to the complete request JSON\");",
                  "  const body = JSON.parse(raw);",
                  "  if (!body || typeof body !== \"object\" || Array.isArray(body)) throw new Error(\"Use a JSON object\");",
                  "  pm.variables.set(\"atrs_request_body_json\", JSON.stringify(body));",
                  "  pm.environment.unset(\"atrs_process_id\");",
                  "} catch (error) {",
                  "  console.error(error.message);",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code !== 200) throw new Error(\"Inspect the submission outcome before retrying\");",
                  "const data = pm.response.json();",
                  "if (!Number.isSafeInteger(data.ProcessId) || data.ProcessId <= 0) throw new Error(\"No valid ProcessId returned; inspect ATRS before retrying\");",
                  "pm.environment.set(\"atrs_process_id\", String(data.ProcessId));"
                ]
              }
            }
          ]
        },
        {
          "name": "Import a schedule definition",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Schedule/importScheduleJSON",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Schedule",
                "importScheduleJSON"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Import a compatible ATRS export object as JSON. Preserve the exported definition intact; a schedule GET response or create request is not an export. The response contains a string returnModel. Retrieve and check the imported schedule before executing it. After an uncertain response, check ATRS before retrying. See [Verify Schedules After a Transfer](/docs/import-and-migrate-schedule-definitions).\n\nReference: https://atrs.readme.io/reference/scheduleimportschedulejson\n\nSet atrs_scheduleimportschedulejson_json to the complete JSON request shown in the reference."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "  const origin = String(pm.variables.get(\"atrs_base_url\") || \"\");",
                  "  if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Set atrs_base_url to the API origin without /api or a trailing slash\");",
                  "  if (!String(pm.variables.get(\"atrs_token\") || \"\").trim()) throw new Error(\"Authenticate before sending this request\");",
                  "  const raw = pm.variables.get(\"atrs_scheduleimportschedulejson_json\");",
                  "  if (!String(raw || \"\").trim()) throw new Error(\"Set atrs_scheduleimportschedulejson_json to the complete request JSON\");",
                  "  const body = JSON.parse(raw);",
                  "  if (!body || typeof body !== \"object\" || Array.isArray(body)) throw new Error(\"Use a JSON object\");",
                  "  pm.variables.set(\"atrs_request_body_json\", JSON.stringify(body));",
                  "} catch (error) {",
                  "  console.error(error.message);",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Scheduleinfo",
      "item": [
        {
          "name": "List recently failed schedules",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Scheduleinfo/GetFailedSchedules?id={{atrs_history_selector}}",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Scheduleinfo",
                "GetFailedSchedules"
              ],
              "query": [
                {
                  "key": "id",
                  "value": "{{atrs_history_selector}}"
                }
              ]
            },
            "description": "Return failed history records for the selector id: reportid, packid or autoid. This id is a type selector, not a numeric schedule identifier. The history selection uses a calendar-day difference of at most one day; it is not a rolling 24-hour window. StartedAtUtc and FinishedAtUtc are not populated by this operation. Use ExecutionDateEpoch for the recorded execution time.\n\nReference: https://atrs.readme.io/reference/scheduleinfogetfailedschedules\n\nConfigure: atrs_history_selector."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "requiredValue(\"atrs_history_selector\");",
                  "if (![\"reportid\",\"packid\",\"autoid\"].includes(String(requiredValue(\"atrs_history_selector\")))) throw new Error(\"Choose reportid, packid or autoid\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Read schedule execution history",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Scheduleinfo/GetScheduleHistory?id={{atrs_schedule_id}}&page={{atrs_history_page}}&pageSize={{atrs_history_page_size}}",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Scheduleinfo",
                "GetScheduleHistory"
              ],
              "query": [
                {
                  "key": "id",
                  "value": "{{atrs_schedule_id}}"
                },
                {
                  "key": "page",
                  "value": "{{atrs_history_page}}"
                },
                {
                  "key": "pageSize",
                  "value": "{{atrs_history_page_size}}"
                }
              ]
            },
            "description": "Return Items, TotalCount, Page and PageSize for a schedule. Defaults are page=1 and pageSize=50. Empty or out-of-range results can return TotalCount=0. Paging is not a stable snapshot and does not promise a deterministic tie-breaker for simultaneous timestamps.\n\nReference: https://atrs.readme.io/reference/scheduleinfogetschedulehistory\n\nConfigure: atrs_schedule_id, atrs_history_page, atrs_history_page_size."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "positiveInteger(\"atrs_schedule_id\");",
                  "positiveInteger(\"atrs_history_page\");",
                  "positiveInteger(\"atrs_history_page_size\");",
                  "requiredValue(\"atrs_schedule_id\");",
                  "requiredValue(\"atrs_history_page\");",
                  "requiredValue(\"atrs_history_page_size\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Get the most recent run result",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Scheduleinfo/LastRunResult",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Scheduleinfo",
                "LastRunResult"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Retrieve the latest stored run result for a schedule. Result is the string true or false when history exists. This operation does not populate ScheduleName, StartedAtUtc or FinishedAtUtc. With no matching history, numeric fields are zero and the result and text fields are null; this does not establish success or failure. Do not use ScheduleType=package to determine a package execution outcome. Retain the ExecutionId returned by package execution and use GetExecutionStatus, checking ResultJson and delivery separately.\n\nReference: https://atrs.readme.io/reference/scheduleinfolastrunresult\n\nConfigure: atrs_schedule_id."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "positiveInteger(\"atrs_schedule_id\");",
                  "const payload = {Id:Number(requiredValue(\"atrs_schedule_id\")),ScheduleType:\"report\"};",
                  "pm.variables.set(\"atrs_request_body_json\", JSON.stringify(payload));",
                  "requiredValue(\"atrs_schedule_id\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Service",
      "item": [
        {
          "name": "Ping the API service",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Service/Ping",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Service",
                "Ping"
              ]
            },
            "auth": {
              "type": "noauth"
            },
            "description": "Unauthenticated connectivity check. Returns the JSON number 1. A successful ping does not verify authentication, report rendering or scheduler readiness.\n\nReference: https://atrs.readme.io/reference/serviceping\n\nConfigure: atrs_base_url."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code !== 200) throw new Error(\"Request failed; inspect the response\");",
                  "const data = pm.response.json();",
                  "if (data !== 1) throw new Error(\"Expected the JSON number 1\");"
                ]
              }
            }
          ]
        },
        {
          "name": "Get the configuration path",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Service/GetConfigPath",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Service",
                "GetConfigPath"
              ]
            },
            "description": "Return the ATRS configuration path as a JSON string when Accept is application/json. The value can be a network path; it is not a downloadable configuration document.\n\nReference: https://atrs.readme.io/reference/servicegetconfigpath"
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "  const origin = String(pm.variables.get(\"atrs_base_url\") || \"\");",
                  "  if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Set atrs_base_url to the API origin without /api or a trailing slash\");",
                  "  if (!String(pm.variables.get(\"atrs_token\") || \"\").trim()) throw new Error(\"Authenticate before sending this request\");",
                  "} catch (error) {",
                  "  console.error(error.message);",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Check scheduler state",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Service/IsSchedulerRunning",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Service",
                "IsSchedulerRunning"
              ]
            },
            "description": "Return a JSON boolean indicating whether the scheduler is running. This is service state, not the health of every reporting dependency.\n\nReference: https://atrs.readme.io/reference/serviceisschedulerrunning"
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "  const origin = String(pm.variables.get(\"atrs_base_url\") || \"\");",
                  "  if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Set atrs_base_url to the API origin without /api or a trailing slash\");",
                  "  if (!String(pm.variables.get(\"atrs_token\") || \"\").trim()) throw new Error(\"Authenticate before sending this request\");",
                  "} catch (error) {",
                  "  console.error(error.message);",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Start the scheduler",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Service/StartScheduler",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Service",
                "StartScheduler"
              ]
            },
            "description": "Start the configured ATRS scheduler service or process. This GET changes server state and should be invoked deliberately by an administrator.\n\nReference: https://atrs.readme.io/reference/servicestartscheduler"
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "  const origin = String(pm.variables.get(\"atrs_base_url\") || \"\");",
                  "  if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Set atrs_base_url to the API origin without /api or a trailing slash\");",
                  "  if (!String(pm.variables.get(\"atrs_token\") || \"\").trim()) throw new Error(\"Authenticate before sending this request\");",
                  "} catch (error) {",
                  "  console.error(error.message);",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Stop the scheduler",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Service/StopScheduler",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Service",
                "StopScheduler"
              ]
            },
            "description": "Stop the configured scheduler service or process. This GET changes server state and can affect scheduled reporting.\n\nReference: https://atrs.readme.io/reference/servicestopscheduler"
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "  const origin = String(pm.variables.get(\"atrs_base_url\") || \"\");",
                  "  if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Set atrs_base_url to the API origin without /api or a trailing slash\");",
                  "  if (!String(pm.variables.get(\"atrs_token\") || \"\").trim()) throw new Error(\"Authenticate before sending this request\");",
                  "} catch (error) {",
                  "  console.error(error.message);",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Update collaboration settings",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/Service/UpdateCollaborationSettings",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "Service",
                "UpdateCollaborationSettings"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Apply collaboration settings, terminate relevant system processes and rewrite configuration. Nonempty connection fields replace stored values; local database connection fields are cleared by the operation. Coordinate the change across participating servers before invoking it.\n\nReference: https://atrs.readme.io/reference/serviceupdatecollaborationsettings\n\nSet atrs_collaboration_settings_json to the complete JSON request shown in the reference."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "  const origin = String(pm.variables.get(\"atrs_base_url\") || \"\");",
                  "  if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Set atrs_base_url to the API origin without /api or a trailing slash\");",
                  "  if (!String(pm.variables.get(\"atrs_token\") || \"\").trim()) throw new Error(\"Authenticate before sending this request\");",
                  "  const raw = pm.variables.get(\"atrs_collaboration_settings_json\");",
                  "  if (!String(raw || \"\").trim()) throw new Error(\"Set atrs_collaboration_settings_json to the complete request JSON\");",
                  "  const body = JSON.parse(raw);",
                  "  if (!body || typeof body !== \"object\" || Array.isArray(body)) throw new Error(\"Use a JSON object\");",
                  "  pm.variables.set(\"atrs_request_body_json\", JSON.stringify(body));",
                  "} catch (error) {",
                  "  console.error(error.message);",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "SingleSchedule",
      "item": [
        {
          "name": "Add an email destination",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/SingleSchedule/AddEmailDestination?clearExisting={{atrs_clear_existing}}",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "SingleSchedule",
                "AddEmailDestination"
              ],
              "query": [
                {
                  "key": "clearExisting",
                  "value": "{{atrs_clear_existing}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Add an email destination to an existing single-report schedule. ParentId is the report identifier. clearExisting=true deletes only existing email destinations for that report before insertion; it does not delete disk or other destination types. Retain the returned DestinationId for subsequent changes.\n\nReference: https://atrs.readme.io/reference/singlescheduleaddemaildestination\n\nConfigure: atrs_clear_existing, atrs_email_destination_json."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "if (![\"true\",\"false\"].includes(String(requiredValue(\"atrs_clear_existing\")))) throw new Error(\"Choose true or false\");",
                  "const payload = JSON.parse(requiredValue(\"atrs_email_destination_json\"));",
                  "pm.variables.set(\"atrs_request_body_json\", JSON.stringify(payload));",
                  "requiredValue(\"atrs_clear_existing\");",
                  "requiredValue(\"atrs_email_destination_json\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Clone a single schedule",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/SingleSchedule/Clone?Id={{atrs_schedule_id}}",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "SingleSchedule",
                "Clone"
              ],
              "query": [
                {
                  "key": "Id",
                  "value": "{{atrs_schedule_id}}"
                }
              ]
            },
            "description": "Copy the selected single schedule and return the new schedule identifier as a JSON integer. This GET changes stored data; repeating it can create duplicate copies.\n\nReference: https://atrs.readme.io/reference/singlescheduleclone\n\nConfigure: atrs_schedule_id."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "positiveInteger(\"atrs_schedule_id\");",
                  "requiredValue(\"atrs_schedule_id\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Create a Tableau schedule",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/SingleSchedule/Create",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "SingleSchedule",
                "Create"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Create a Tableau schedule using SingleScheduleModel. Supply an existing FolderPath, ScheduleName, ReportUrl, TableauAccountId, Schedule, ClientRenderingSettings and at least one email or disk destination. For a data-driven schedule, set IsDataDriven to true and supply DataDriver. Provide a valid yyyy-MM-dd EndDate even when HasEndDate is false. Keep Schedule.Enabled false while checking the configuration. The response contains UniqueId. Retrieve the saved schedule before executing it. See [Create a Schedule from a Working Template](/docs/create-and-update-single-schedules).\n\nReference: https://atrs.readme.io/reference/singleschedulecreate\n\nConfigure: atrs_single_create_json."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "const payload = JSON.parse(requiredValue(\"atrs_single_create_json\"));",
                  "if (!payload || Array.isArray(payload) || typeof payload !== \"object\") throw new Error(\"Supply a complete schedule object\");",
                  "for (const name of [\"ScheduleName\",\"FolderPath\",\"ReportUrl\",\"TableauAccountId\",\"Schedule\",\"ClientRenderingSettings\"]) if (payload[name] === null || payload[name] === undefined || payload[name] === \"\") throw new Error(\"Schedule definition needs \" + name);",
                  "if (!Array.isArray(payload.EmailDestinations) || !Array.isArray(payload.DiskDestinations) || payload.EmailDestinations.length + payload.DiskDestinations.length === 0) throw new Error(\"Supply complete destination arrays and at least one destination\");",
                  "if (payload.Schedule.Enabled !== false) throw new Error(\"Keep test recurrence disabled in the intended definition\");",
                  "if (!/^\\d{4}-\\d{2}-\\d{2}$/.test(String(payload.Schedule.EndDate || \"\"))) throw new Error(\"Supply a valid yyyy-MM-dd EndDate even without an end date\");",
                  "function validDate(value) { if (typeof value !== \"string\" || !/^\\d{4}-\\d{2}-\\d{2}$/.test(value)) return false; const d = new Date(value + \"T00:00:00Z\"); return Number.isFinite(d.getTime()) && d.toISOString().slice(0,10) === value; }",
                  "if (!validDate(payload.Schedule.StartDate) || !validDate(payload.Schedule.EndDate)) throw new Error(\"Supply real yyyy-MM-dd schedule dates\");",
                  "if (payload.Schedule.Frequency === \"Weekly\" && (!payload.Schedule.WeeklyOptions || !Array.isArray(payload.Schedule.WeeklyOptions.SelectedDaysOfWeek))) throw new Error(\"Supply weekly options\");",
                  "if (payload.Schedule.Frequency === \"Monthly\" && (!payload.Schedule.MonthlyOptions || !Array.isArray(payload.Schedule.MonthlyOptions.SelectedMonthsOfyear))) throw new Error(\"Supply monthly options\");",
                  "for (const d of payload.DiskDestinations) if (!d || typeof d.OutputPath !== \"string\" || !d.OutputPath.trim()) throw new Error(\"Supply every disk output path\");",
                  "for (const d of payload.EmailDestinations) { if (!d || [\"To\",\"Cc\",\"Bcc\"].some(k => !Array.isArray(d[k])) || d.To.length+d.Cc.length+d.Bcc.length===0) throw new Error(\"Supply all recipient arrays and at least one recipient\"); }",
                  "if (payload.IsDataDriven === true && (!payload.DataDriver || typeof payload.DataDriver !== \"object\")) throw new Error(\"Supply the data-driver definition\");",
                  "pm.variables.set(\"atrs_request_body_json\", JSON.stringify(payload));",
                  "requiredValue(\"atrs_single_create_json\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Delete a single schedule",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/SingleSchedule/Delete?Id={{atrs_schedule_id}}",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "SingleSchedule",
                "Delete"
              ],
              "query": [
                {
                  "key": "Id",
                  "value": "{{atrs_schedule_id}}"
                }
              ]
            },
            "description": "Delete the selected single schedule through the controller lifecycle operation. The caller must have schedule-modification permission. Returns a JSON boolean.\n\nReference: https://atrs.readme.io/reference/singlescheduledelete\n\nConfigure: atrs_schedule_id."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "positiveInteger(\"atrs_schedule_id\");",
                  "requiredValue(\"atrs_schedule_id\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Get a Tableau schedule",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/SingleSchedule/Get?Id={{atrs_schedule_id}}",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "SingleSchedule",
                "Get"
              ],
              "query": [
                {
                  "key": "Id",
                  "value": "{{atrs_schedule_id}}"
                }
              ]
            },
            "description": "Retrieve the Tableau schedule read projection. ClientRenderingSettings and destination summaries differ from the complete write models. Do not use this response as a lossless migration backup.\n\nReference: https://atrs.readme.io/reference/singlescheduleget\n\nConfigure: atrs_schedule_id."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "positiveInteger(\"atrs_schedule_id\");",
                  "requiredValue(\"atrs_schedule_id\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Search Tableau schedules (GET)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/SingleSchedule/GetAll",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "SingleSchedule",
                "GetAll"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Search schedules by explicit keywords. POST carries the same search model as GET and is preferable for clients that cannot send GET bodies. Missing filters do not mean list all.\n\nThis GET binds a JSON body. OpenAPI 3.0 API explorers cannot reliably send it. Use the cURL example.\n\n| Body field | Type | Meaning |\n|---|---|---|\n| FilterValues | array | Explicit keyword values to match. Omitting the body or sending an empty collection triggers a generated search value; default LIKE normally returns no matches. Negative operators can behave differently. |\n| FilterOperator | string | Keyword comparison operator. |\n| MatchType | string | Combine keyword comparisons using ALL or ANY. |\n\nBody schema: `KeywordSearchInput`.\n\nReference: https://atrs.readme.io/reference/singleschedulegetallget\n\nConfigure atrs_search_keywords_json, atrs_search_operator and atrs_search_match_type.\n\nThis collection requires nonblank atrs_search_keywords_json values. Missing filters in the API return an unfiltered list."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "const payload = {FilterValues:JSON.parse(requiredValue(\"atrs_search_keywords_json\")),FilterOperator:requiredValue(\"atrs_search_operator\"),MatchType:requiredValue(\"atrs_search_match_type\")};",
                  "if (!Array.isArray(payload.FilterValues) || !payload.FilterValues.length || payload.FilterValues.some(v => typeof v !== \"string\" || !v.trim())) throw new Error(\"Supply nonempty explicit keyword strings\");",
                  "if (![\"=\",\"<>\",\"LIKE\",\"NOT LIKE\"].includes(String(payload.FilterOperator).trim().toUpperCase())) throw new Error(\"Unsupported keyword operator\");",
                  "if (![\"ALL\",\"ANY\"].includes(String(payload.MatchType).trim().toUpperCase())) throw new Error(\"Choose ALL or ANY\");",
                  "pm.variables.set(\"atrs_request_body_json\", JSON.stringify(payload));",
                  "requiredValue(\"atrs_search_keywords_json\");",
                  "requiredValue(\"atrs_search_operator\");",
                  "requiredValue(\"atrs_search_match_type\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Search Tableau schedules (POST)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/SingleSchedule/GetAll",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "SingleSchedule",
                "GetAll"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Search schedules by explicit keywords. POST carries the same search model as GET and is preferable for clients that cannot send GET bodies. Missing filters do not mean list all.\n\nThis GET binds a JSON body. OpenAPI 3.0 API explorers cannot reliably send it. Use the cURL example.\n\n| Body field | Type | Meaning |\n|---|---|---|\n| FilterValues | array | Explicit keyword values to match. Omitting the body or sending an empty collection triggers a generated search value; default LIKE normally returns no matches. Negative operators can behave differently. |\n| FilterOperator | string | Keyword comparison operator. |\n| MatchType | string | Combine keyword comparisons using ALL or ANY. |\n\nBody schema: `KeywordSearchInput`.\n\nReference: https://atrs.readme.io/reference/singleschedulegetallpost\n\nConfigure atrs_search_keywords_json, atrs_search_operator and atrs_search_match_type.\n\nThis collection requires nonblank atrs_search_keywords_json values. Missing filters in the API return an unfiltered list."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "const payload = {FilterValues:JSON.parse(requiredValue(\"atrs_search_keywords_json\")),FilterOperator:requiredValue(\"atrs_search_operator\"),MatchType:requiredValue(\"atrs_search_match_type\")};",
                  "if (!Array.isArray(payload.FilterValues) || !payload.FilterValues.length || payload.FilterValues.some(v => typeof v !== \"string\" || !v.trim())) throw new Error(\"Supply nonempty explicit keyword strings\");",
                  "if (![\"=\",\"<>\",\"LIKE\",\"NOT LIKE\"].includes(String(payload.FilterOperator).trim().toUpperCase())) throw new Error(\"Unsupported keyword operator\");",
                  "if (![\"ALL\",\"ANY\"].includes(String(payload.MatchType).trim().toUpperCase())) throw new Error(\"Choose ALL or ANY\");",
                  "pm.variables.set(\"atrs_request_body_json\", JSON.stringify(payload));",
                  "requiredValue(\"atrs_search_keywords_json\");",
                  "requiredValue(\"atrs_search_operator\");",
                  "requiredValue(\"atrs_search_match_type\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Update a Tableau schedule",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/SingleSchedule/Update",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "SingleSchedule",
                "Update"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Update a schedule using UniqueId and the complete intended SingleScheduleModel. Supply ClientRenderingSettings, parameters, recurrence and both complete destination arrays, retaining destination IDs. Omitted destinations can be deleted; use [] for an unused destination type. Supply valid schedule dates, including EndDate. A successful response has no body. Retrieve the schedule to check the saved settings. See [Create a Schedule from a Working Template](/docs/create-and-update-single-schedules).\n\nReference: https://atrs.readme.io/reference/singlescheduleupdate\n\nConfigure: atrs_single_update_json."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "const payload = JSON.parse(requiredValue(\"atrs_single_update_json\"));",
                  "if (!payload || Array.isArray(payload) || typeof payload !== \"object\") throw new Error(\"Supply a complete schedule object\");",
                  "for (const name of [\"ScheduleName\",\"FolderPath\",\"ReportUrl\",\"TableauAccountId\",\"Schedule\",\"ClientRenderingSettings\"]) if (payload[name] === null || payload[name] === undefined || payload[name] === \"\") throw new Error(\"Schedule definition needs \" + name);",
                  "if (!Array.isArray(payload.EmailDestinations) || !Array.isArray(payload.DiskDestinations) || payload.EmailDestinations.length + payload.DiskDestinations.length === 0) throw new Error(\"Supply complete destination arrays and at least one destination\");",
                  "if (payload.Schedule.Enabled !== false) throw new Error(\"Keep test recurrence disabled in the intended definition\");",
                  "if (!/^\\d{4}-\\d{2}-\\d{2}$/.test(String(payload.Schedule.EndDate || \"\"))) throw new Error(\"Supply a valid yyyy-MM-dd EndDate even without an end date\");",
                  "if (!Number.isSafeInteger(payload.UniqueId) || payload.UniqueId <= 0) throw new Error(\"Update requires a positive UniqueId\");",
                  "function validDate(value) { if (typeof value !== \"string\" || !/^\\d{4}-\\d{2}-\\d{2}$/.test(value)) return false; const d = new Date(value + \"T00:00:00Z\"); return Number.isFinite(d.getTime()) && d.toISOString().slice(0,10) === value; }",
                  "if (!validDate(payload.Schedule.StartDate) || !validDate(payload.Schedule.EndDate)) throw new Error(\"Supply real yyyy-MM-dd schedule dates\");",
                  "if (payload.Schedule.Frequency === \"Weekly\" && (!payload.Schedule.WeeklyOptions || !Array.isArray(payload.Schedule.WeeklyOptions.SelectedDaysOfWeek))) throw new Error(\"Supply weekly options\");",
                  "if (payload.Schedule.Frequency === \"Monthly\" && (!payload.Schedule.MonthlyOptions || !Array.isArray(payload.Schedule.MonthlyOptions.SelectedMonthsOfyear))) throw new Error(\"Supply monthly options\");",
                  "for (const d of payload.DiskDestinations) if (!d || typeof d.OutputPath !== \"string\" || !d.OutputPath.trim()) throw new Error(\"Supply every disk output path\");",
                  "for (const d of payload.EmailDestinations) { if (!d || [\"To\",\"Cc\",\"Bcc\"].some(k => !Array.isArray(d[k])) || d.To.length+d.Cc.length+d.Bcc.length===0) throw new Error(\"Supply all recipient arrays and at least one recipient\"); }",
                  "if (payload.IsDataDriven === true && (!payload.DataDriver || typeof payload.DataDriver !== \"object\")) throw new Error(\"Supply the data-driver definition\");",
                  "pm.variables.set(\"atrs_request_body_json\", JSON.stringify(payload));",
                  "requiredValue(\"atrs_single_update_json\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Delete an email destination",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/SingleSchedule/DeleteEmailDestination?destinationId={{atrs_destination_id}}",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "SingleSchedule",
                "DeleteEmailDestination"
              ],
              "query": [
                {
                  "key": "destinationId",
                  "value": "{{atrs_destination_id}}"
                }
              ]
            },
            "description": "Delete a destination by destinationId. Returns a message and the identifier on success; a failed delete can return HTTP 400.\n\nReference: https://atrs.readme.io/reference/singlescheduledeleteemaildestination"
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "  const origin = String(pm.variables.get(\"atrs_base_url\") || \"\");",
                  "  if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Set atrs_base_url to the API origin without /api or a trailing slash\");",
                  "  if (!String(pm.variables.get(\"atrs_token\") || \"\").trim()) throw new Error(\"Authenticate before sending this request\");",
                  "  const id = String(pm.variables.get(\"atrs_destination_id\") || \"\");",
                  "  if (!/^[1-9]\\d*$/.test(id) || !Number.isSafeInteger(Number(id))) throw new Error(\"Set atrs_destination_id to a positive integer\");",
                  "} catch (error) {",
                  "  console.error(error.message);",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Update an email destination",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/SingleSchedule/UpdateEmailDestination",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "SingleSchedule",
                "UpdateEmailDestination"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Selectively update an email destination by DestinationId. A nonempty To array replaces To recipients; null or an empty To array preserves them. For Cc and Bcc, null preserves existing recipients and an empty array clears them. Omitting Cc or Bcc initializes an empty array and can therefore clear recipients. Nonempty Subject, Body, BodyFormat, CustomSenderName and CustomerSenderAddress replace their stored values; null or empty strings preserve them. Omitted BodyFormat defaults to TEXT, so send null to preserve the stored format. Output, naming, enabled and embedding settings are not changed by this operation.\n\nReference: https://atrs.readme.io/reference/singlescheduleupdateemaildestination\n\nSet atrs_singlescheduleupdateemaildestination_json to the complete JSON request shown in the reference."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "  const origin = String(pm.variables.get(\"atrs_base_url\") || \"\");",
                  "  if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Set atrs_base_url to the API origin without /api or a trailing slash\");",
                  "  if (!String(pm.variables.get(\"atrs_token\") || \"\").trim()) throw new Error(\"Authenticate before sending this request\");",
                  "  const raw = pm.variables.get(\"atrs_singlescheduleupdateemaildestination_json\");",
                  "  if (!String(raw || \"\").trim()) throw new Error(\"Set atrs_singlescheduleupdateemaildestination_json to the complete request JSON\");",
                  "  const body = JSON.parse(raw);",
                  "  if (!body || typeof body !== \"object\" || Array.isArray(body)) throw new Error(\"Use a JSON object\");",
                  "  pm.variables.set(\"atrs_request_body_json\", JSON.stringify(body));",
                  "} catch (error) {",
                  "  console.error(error.message);",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Get a serialized sample definition",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/SingleSchedule/GetSample",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "SingleSchedule",
                "GetSample"
              ]
            },
            "description": "Return a sample definition encoded as a JSON string. Replace example values with settings for your installation, and supply the ClientRenderingSettings and destination settings required for creation. Use [Create a Schedule from a Working Template](/docs/create-and-update-single-schedules) for a complete creation workflow.\n\nReference: https://atrs.readme.io/reference/singleschedulegetsample"
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "  const origin = String(pm.variables.get(\"atrs_base_url\") || \"\");",
                  "  if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Set atrs_base_url to the API origin without /api or a trailing slash\");",
                  "  if (!String(pm.variables.get(\"atrs_token\") || \"\").trim()) throw new Error(\"Authenticate before sending this request\");",
                  "} catch (error) {",
                  "  console.error(error.message);",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "SystemMonitor",
      "item": [
        {
          "name": "List due schedules",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/SystemMonitor/AllDue",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "SystemMonitor",
                "AllDue"
              ]
            },
            "description": "Return due schedule summaries sorted by NextRunEpoch. This operation returns the Due Today - All monitor view; this is not the API execution queue.\n\nReference: https://atrs.readme.io/reference/systemmonitoralldue\n\nConfigure: atrs_base_url."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "List currently executing schedules",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/SystemMonitor/GetCurrentlyExecuting",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "SystemMonitor",
                "GetCurrentlyExecuting"
              ]
            },
            "description": "Read the task monitor for currently executing schedules. Records contain process identifiers and server names, distinct from API queue ExecutionId records.\n\nReference: https://atrs.readme.io/reference/systemmonitorgetcurrentlyexecuting\n\nConfigure: atrs_base_url."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "TableauAccount",
      "item": [
        {
          "name": "List Tableau accounts",
          "response": [],
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/TableauAccount/GetAccounts",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "TableauAccount",
                "GetAccounts"
              ]
            },
            "description": "Discover Tableau resources available through the selected ATRS account. Returns the Tableau accounts available to the authenticated user.\n\nReference: https://atrs.readme.io/reference/tableauaccountgetaccounts\n\nConfigure: atrs_base_url."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code !== 200) throw new Error(\"Request failed; inspect the response\");",
                  "const data = pm.response.json();",
                  "if (!Array.isArray(data)) throw new Error(\"Expected a Tableau account array\");"
                ]
              }
            }
          ]
        },
        {
          "name": "List Tableau projects",
          "response": [],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/TableauAccount/GetProjects",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "TableauAccount",
                "GetProjects"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "List Tableau projects available through the selected ATRS account. Supply accountId. Leave parentId empty for root projects, or supply a project ID to list its direct children. Omit itemType.\n\nReference: https://atrs.readme.io/reference/tableauaccountgetprojects\n\nConfigure: atrs_tableau_account_id."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "const payload = {accountId:requiredValue(\"atrs_tableau_account_id\"),parentId:String(pm.variables.get(\"atrs_tableau_parent_project_id\") || \"\")};",
                  "pm.variables.set(\"atrs_request_body_json\", JSON.stringify(payload));",
                  "requiredValue(\"atrs_tableau_account_id\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "List Tableau views",
          "response": [],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/TableauAccount/GetViews",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "TableauAccount",
                "GetViews"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "List Tableau views in a workbook. Supply accountId and set parentId to the Tableau workbook ID. Leave parentId empty to request all views. Omit itemType.\n\nReference: https://atrs.readme.io/reference/tableauaccountgetviews\n\nConfigure: atrs_tableau_account_id, atrs_tableau_workbook_id."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "const payload = {accountId:requiredValue(\"atrs_tableau_account_id\"),parentId:requiredValue(\"atrs_tableau_workbook_id\")};",
                  "pm.variables.set(\"atrs_request_body_json\", JSON.stringify(payload));",
                  "requiredValue(\"atrs_tableau_account_id\");",
                  "requiredValue(\"atrs_tableau_workbook_id\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "List Tableau workbooks",
          "response": [],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/TableauAccount/GetWorkbooks",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "TableauAccount",
                "GetWorkbooks"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "List Tableau workbooks in a project. Supply accountId and set parentId to the Tableau project ID. Omit itemType.\n\nReference: https://atrs.readme.io/reference/tableauaccountgetworkbooks\n\nConfigure: atrs_tableau_account_id, atrs_tableau_project_id."
          },
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "const payload = {accountId:requiredValue(\"atrs_tableau_account_id\"),parentId:requiredValue(\"atrs_tableau_project_id\")};",
                  "pm.variables.set(\"atrs_request_body_json\", JSON.stringify(payload));",
                  "requiredValue(\"atrs_tableau_account_id\");",
                  "requiredValue(\"atrs_tableau_project_id\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "UserGroups",
      "item": [
        {
          "name": "List user groups",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/UserGroups/Get",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "UserGroups",
                "Get"
              ]
            },
            "description": "Return user-group summaries. Requires the User Manager group permission; an authenticated caller without it receives an empty HTTP 403.\n\nReference: https://atrs.readme.io/reference/usergroupsget\n\nConfigure: atrs_base_url."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "function requiredValue(name) { const value = pm.variables.get(name); if (value === undefined || value === null || String(value).trim() === \"\") throw new Error(\"Set \" + name + \" before sending this request\"); return value; }",
                  "function positiveInteger(name) { const value = String(requiredValue(name)); if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error(name + \" must be a positive integer\"); }",
                  "function scheduleFamily() { if (![\"report\", \"package\"].includes(String(requiredValue(\"atrs_schedule_type\")))) throw new Error(\"Choose report or package for atrs_schedule_type\"); }",
                  "const origin = String(requiredValue(\"atrs_base_url\"));",
                  "if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Use an ATRS origin with protocol and port, without /api or a trailing slash\");",
                  "requiredValue(\"atrs_token\");",
                  "",
                  "} catch (error) {",
                  "  console.error(\"Request skipped: check the required input variables in the request description.\");",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "List custom-task categories",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/UserGroups/GetCustomTaskTypes",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "UserGroups",
                "GetCustomTaskTypes"
              ]
            },
            "description": "Return categories usable in the user-group permission interface. This catalogue does not imply that public APIs exist to create every task type. Requires User Manager permission.\n\nReference: https://atrs.readme.io/reference/usergroupsgetcustomtasktypes"
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "  const origin = String(pm.variables.get(\"atrs_base_url\") || \"\");",
                  "  if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Set atrs_base_url to the API origin without /api or a trailing slash\");",
                  "  if (!String(pm.variables.get(\"atrs_token\") || \"\").trim()) throw new Error(\"Authenticate before sending this request\");",
                  "} catch (error) {",
                  "  console.error(error.message);",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "List destination categories",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/UserGroups/GetDestinationTypes",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "UserGroups",
                "GetDestinationTypes"
              ]
            },
            "description": "Return destination categories for permission configuration. This list does not establish a public creation endpoint or request model for every category. Requires User Manager permission.\n\nReference: https://atrs.readme.io/reference/usergroupsgetdestinationtypes"
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "  const origin = String(pm.variables.get(\"atrs_base_url\") || \"\");",
                  "  if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Set atrs_base_url to the API origin without /api or a trailing slash\");",
                  "  if (!String(pm.variables.get(\"atrs_token\") || \"\").trim()) throw new Error(\"Authenticate before sending this request\");",
                  "} catch (error) {",
                  "  console.error(error.message);",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "UserManager",
      "item": [
        {
          "name": "Share a schedule with users",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{atrs_base_url}}/api/UserManager/ShareSchedulesToUsers",
              "host": [
                "{{atrs_base_url}}"
              ],
              "path": [
                "api",
                "UserManager",
                "ShareSchedulesToUsers"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{{atrs_request_body_json}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Share a schedule with the listed ATRS users. Type must identify the schedule family. This is schedule sharing, not user provisioning or group administration.\n\nReference: https://atrs.readme.io/reference/usermanagershareschedulestousers\n\nSet atrs_usermanagershareschedulestousers_json to the complete JSON request shown in the reference."
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.variables.unset(\"atrs_request_body_json\");",
                  "try {",
                  "  const origin = String(pm.variables.get(\"atrs_base_url\") || \"\");",
                  "  if (!/^https?:\\/\\/[^/?#]+$/.test(origin)) throw new Error(\"Set atrs_base_url to the API origin without /api or a trailing slash\");",
                  "  if (!String(pm.variables.get(\"atrs_token\") || \"\").trim()) throw new Error(\"Authenticate before sending this request\");",
                  "  const raw = pm.variables.get(\"atrs_usermanagershareschedulestousers_json\");",
                  "  if (!String(raw || \"\").trim()) throw new Error(\"Set atrs_usermanagershareschedulestousers_json to the complete request JSON\");",
                  "  const body = JSON.parse(raw);",
                  "  if (!body || typeof body !== \"object\" || Array.isArray(body)) throw new Error(\"Use a JSON object\");",
                  "  pm.variables.set(\"atrs_request_body_json\", JSON.stringify(body));",
                  "} catch (error) {",
                  "  console.error(error.message);",
                  "  pm.execution.skipRequest();",
                  "}"
                ]
              }
            }
          ]
        }
      ]
    }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "type": "string",
        "value": "{{atrs_token}}"
      }
    ]
  }
}
