{"id":84047,"date":"2020-05-22T15:10:00","date_gmt":"2020-05-22T06:10:00","guid":{"rendered":"https:\/\/support.questetra.com\/?p=84047"},"modified":"2026-07-02T13:58:49","modified_gmt":"2026-07-02T04:58:49","slug":"download-process-files-using-the-workflow-api","status":"publish","type":"post","link":"https:\/\/support.questetra.com\/en\/developer-blog\/download-process-files-using-the-workflow-api\/","title":{"rendered":"Download Case Files Using the Workflow API"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"68\" data-attachment-id=\"89190\" data-permalink=\"https:\/\/support.questetra.com\/en\/maintenance\/maintenance-20251117\/attachment\/basic-banner-en\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/06\/basic-banner-en.png?fit=1200%2C68&amp;ssl=1\" data-orig-size=\"1200,68\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"basic-banner-en\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/06\/basic-banner-en.png?fit=1024%2C58&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/06\/basic-banner-en.png?resize=1200%2C68&#038;ssl=1\" alt=\"\" class=\"wp-image-89190\" srcset=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/06\/basic-banner-en.png?w=1200&amp;ssl=1 1200w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/06\/basic-banner-en.png?resize=600%2C34&amp;ssl=1 600w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/06\/basic-banner-en.png?resize=1024%2C58&amp;ssl=1 1024w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/06\/basic-banner-en.png?resize=768%2C44&amp;ssl=1 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Using the Workflow API of Questetra BPM Suite, I will introduce a script that will download all files that have been uploaded in a Case where certain conditions have been met. For example, you can implement the following download conditions:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Files uploaded by <strong>Cases that were started this term<\/strong> in a workflow application<\/li>\n\n\n\n<li>Files uploaded in Cases started by a <strong>specific User<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The general procedure is as follows:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Prepare XML data (criteria) which represents the search conditions<\/li>\n\n\n\n<li>Use the Case retrieval API endpoint to retrieve Case data that matches the conditions<\/li>\n\n\n\n<li>Extract relevant data (e.g. File ID) about files from the acquired Case data<\/li>\n\n\n\n<li>Download the target file using the API endpoint for file downloading<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Required Environment<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Basic Authentication must be valid in Questetra BPM Suite\n<ul class=\"wp-block-list\">\n<li>See <a href=\"https:\/\/support.questetra.com\/en\/developer-blog\/synchronize-users-chapter1\/#basic\">Synchronizing User Information with Local Data (Preparation)<\/a> for the activation method.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">When Using a Shell Script<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a aria-label=\"jq (opens in a new tab)\" href=\"https:\/\/stedolan.github.io\/jq\/\" target=\"_blank\" rel=\"noreferrer noopener\">jq<\/a> command<\/li>\n\n\n\n<li>For Windows, the curl command runs on Windows Subsystem for Linux<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">When Using Python<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Python (3.x series)<\/li>\n\n\n\n<li><a aria-label=\"Requests (opens in a new tab)\" href=\"https:\/\/requests-docs-ja.readthedocs.io\/en\/latest\/\" target=\"_blank\" rel=\"noreferrer noopener\">Requests<\/a> library (edited in Japanese)<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Search for Cases That Match Criteria<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For details on how to search for Cases using the Workflow API or information on preparing criteria XML data that defines the search conditions, Basic Authentication by using the curl command, and API access methods, you can refer to <a href=\"https:\/\/support.questetra.com\/en\/developer-blog\/download-process-data\/\">Downloading Case and Task Lists Using the Workflow API<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The API endpoint that I will use this time is <strong>\/API\/OR\/ProcessInstance\/list<\/strong> (JSON, UTF-8).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Download Files<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The API endpoint for downloading files is <strong>\/API\/OR\/ProcessInstance\/File\/download<\/strong>, but this endpoint takes two parameters.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>id<\/strong>: the ID assigned to the file<\/li>\n\n\n\n<li><strong>processDataInstanceId<\/strong>: the ID assigned to each Data Item of each Case<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">These two parameters can be extracted from the JSON of the Case search results. An example of the result is shown below, so let\u2019s take a look. For clarity, only one Case is written.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Case Search API Response Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>[\n {\n   \"activeTokenNodeName\": null,\n   \"data\": {\n     \"1\": { \u2190 Data Item number (as displayed in Modeler)\n       \"dataType\": \"STRING\", \u2190 character Data Item\n       ...(omitted)...\n     },\n     \"2\": { \u2190 <strong>Data Item number (as displayed in Modeler)<\/strong>\n       <strong>\"dataType\": \"FILE2\", \u2190 File-type Data Item<\/strong>\n       \"id\": 9143, \u2190 same as processDataInstanceId\n       \"processDataDefinitionNumber\": 2,\n       \"subType\": null,\n       \"value\": [\n         {\n           \"contentType\": \"image\/png\",\n           <strong>\"id\": 9149, \u2190 ID assigned to the file<\/strong>\n           \"image\": true,\n           \"length\": 71550,\n           \"lengthText\": \"69.9 KB\",\n           \"name\": \"ques-kun-01.png\", \u2190 File name\n           <strong>\"processDataInstanceId\": 9143 \u2190 ID assigned to each Data Item of each Case<\/strong>\n         },\n         {\n           \"contentType\": \"text\/plain\",\n           <strong>\"id\": 9150, \u2190 ID assigned to the file<\/strong>\n           \"image\": false,\n           \"length\": 1056,\n           \"lengthText\": \"1.1 KB\",\n           \"name\": \"README.txt\", \u2190 File name\n           <strong>\"processDataInstanceId\": 9143 \u2190 ID assigned to each Data Item of each Case<\/strong>\n         }\n       ],\n       \"viewOrder\": 2\n     }\n   },\n   ...,\n   \"processInstanceId\": 183,\n   ...,\n   \"processInstanceTitle\": \"Test\",\n   ...,\n   \"processModelInfoName\": \"For test: file download\",\n   ...\n },\n ...\n]<\/code><\/pre>\n\n\n<div class=\"su-note\"  style=\"border-color:#dbdbdb;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#f5f5f5;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\n<p>To include Data Items in the result, you need to specify their Data Item numbers in <em>criteria<\/em>. If you are to obtain <em>criteria<\/em> following the steps of \u201c<a href=\"https:\/\/support.questetra.com\/en\/developer-blog\/download-process-data\/\">Downloading Case and Task List Using Workflow API<\/a>,\u201d be sure to open the \u201cDisplay items\u201d area on the Case search page in Web UI, check the Data Items to include, and then click the \u201cUpdate\u201d button to get the updated <em>criteria<\/em> (Using the <em>criteria<\/em> obtained with no Data Items checked will return the result of <em>\u201cdata\u201d:null<\/em>).<\/p>\n<\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Data Item objects are stored in a map where the Data Item number is a key.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"216\" data-attachment-id=\"88433\" data-permalink=\"https:\/\/support.questetra.com\/en\/maintenance\/maintenance-20251117\/attachment\/data-item-number-en-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/Data-Item-Number-en-1.png?fit=1452%2C306&amp;ssl=1\" data-orig-size=\"1452,306\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Data-Item-Number-en-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/Data-Item-Number-en-1.png?fit=1024%2C216&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/Data-Item-Number-en-1.png?resize=1024%2C216&#038;ssl=1\" alt=\"\" class=\"wp-image-88433\" srcset=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/Data-Item-Number-en-1.png?resize=1024%2C216&amp;ssl=1 1024w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/Data-Item-Number-en-1.png?resize=600%2C126&amp;ssl=1 600w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/Data-Item-Number-en-1.png?resize=768%2C162&amp;ssl=1 768w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/Data-Item-Number-en-1.png?w=1452&amp;ssl=1 1452w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">An object whose <strong>dataType is FILE2<\/strong> represents a File-type Data Item. You can see that ques-kun-01.png and README.txt are uploaded to the Case. The id and processDataInstanceId are also stored in this object. By parsing the JSON and extracting these two items, the parameters for API access are complete.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Access the File Download API<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">By sending the <strong>id<\/strong> and <strong>processDataInstanceId<\/strong> to the API endpoint, you can download the corresponding file. Only the required parameters are different, but you can access it in the same way as the Case search API. The API response is binary data of a file, so save it as appropriate.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Below is a sample code that performs functions from Case retrieval to file downloading. There are two examples; Shell script and Python. This script downloads all the files which have been uploaded in a Case that matches the search conditions (<em>criteria<\/em>). The files will be stored in a different directory per Case.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"940\" height=\"390\" data-attachment-id=\"83342\" data-permalink=\"https:\/\/support.questetra.com\/en\/developer-blog\/download-process-files-using-the-workflow-api\/attachment\/workflow-api-file-download-finder-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-finder.png?fit=940%2C390&amp;ssl=1\" data-orig-size=\"940,390\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"workflow-api-file-download-finder\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-finder.png?fit=940%2C390&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-finder.png?resize=940%2C390&#038;ssl=1\" alt=\"\" class=\"wp-image-83342\" srcset=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-finder.png?w=940&amp;ssl=1 940w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-finder.png?resize=600%2C249&amp;ssl=1 600w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-finder.png?resize=768%2C319&amp;ssl=1 768w\" sizes=\"auto, (max-width: 940px) 100vw, 940px\" \/><figcaption class=\"wp-element-caption\">The directory name is {Case ID} _ {app name} _ ({subject})<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you need the batch download of attachments from the Case, please refer to the code below!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Shell script code example<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/sh\n# Script for Case search\n# -u: Basic Authentication option\n# Parameter...criteria: search condition XML, start: search result acquisition start position, limit: maximum number of records\nprocess_search=$(curl -u {email address}:{Basic password}\\\n                'https:\/\/example.questetra.net\/API\/OR\/ProcessInstance\/list'\\\n                --data-urlencode criteria@process-criteria.txt\\\n                --data-urlencode 'start=0'\\\n                --data-urlencode 'limit=10')\n \n# From the JSON returned from the Case search API, cut out only the Case data with the attached file\n# tr -d '[:cntrl:]'removes control characters\nprocesses=$(echo $process_search | tr -d '[:cntrl:]' | jq '.processInstances[]' | jq -s)\n# get number of elements for FOR loop\nprocesses_len=$(echo $processes | jq length)\n \n# About each Case\nfor i in $(seq 0 $(($processes_len-1)))\ndo\n   # Check if the file is attached\n   # For each data, extract dataType is FILE2 and value is not null (file type item where file is uploaded)\n   data=$(echo $processes | jq .[$i].data[] | jq 'select(.dataType == \"FILE2\" and .value != null)' | jq -s)\n   # get number of elements for FOR loop\n   data_len=$(echo $data | jq length)\n   # Element count is 0\n   if [ $data_len -eq 0 ] ; then\n       continue\n   fi\n \n   # Create directory name from Case information\n   process_id=$(echo $processes | jq .[$i].processInstanceId)\n   # Remove double quotes around string with sed\n   app_name=$(echo $processes | jq .[$i].processModelInfoName | sed -e \"s\/\\\"\\$\/\/\" | sed -e \"s\/^\\\"\/\/\")\n   process_title=$(echo $processes | jq .[$i].processInstanceTitle | sed -e \"s\/\\\"\\$\/\/\" | sed -e \"s\/^\\\"\/\/\")\n   directory_name=$process_id'_'$process_title'_('$app_name')'\n   # Create directory if it doesn't exist\n   mkdir -p \".\/file\/$directory_name\"\n \n   # About each file type item\n   for j in $(seq 0 $(($data_len-1)))\n   do\n       # Extract information of uploaded file\n       files=$(echo $data | jq .[$j].value[] | jq -s)\n       # get number of elements for FOR loop\n       files_len=$(echo $files | jq length)\n       # About each file\n       for k in $(seq 0 $(($files_len-1)))\n       do\n           # File ID\n           file_id=$(echo $files | jq .[$k].id)\n           # Case data ID\n           process_data_id=$(echo $files | jq .[$k].processDataInstanceId)\n           # file name\n           file_name=$(echo $files | jq .[$k].name | sed -e \"s\/\\\"\\$\/\/\" | sed -e \"s\/^\\\"\/\/\")\n           # Save file\n           file_path='.\/file\/'$directory_name'\/'$file_name\n           # Script for file download\n           # Save the standard output file by connecting with &gt; (overwrite)\n           file_download=$(curl -u {email address}:{Basic password}\\\n                           'https:\/\/example.questetra.net\/API\/OR\/ProcessInstance\/File\/download'\\\n                           --data-urlencode 'id='$file_id\\\n                           --data-urlencode 'processDataInstanceId='$process_data_id &gt; $file_path)\n           echo $file_download\n       done\n   done\ndone<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Python code example<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>import os\nimport requests\nimport json\n \nif __name__ == \"__main__\":\n   # API endpoint\n   process_search_url = 'https:\/\/example.questetra.net\/API\/OR\/ProcessInstance\/list'\n   file_download_url = 'https:\/\/example.questetra.net\/API\/OR\/ProcessInstance\/File\/download'\n \n   # Basic Authentication information\n   auth = (\"{email address}\", \"{Basic password}\")\n \n   # load criteria\n   with open('.\/process-criteria.txt', 'r') as f:\n       criteria = f.read()\n \n   # Parameters for Case search\n   search_params = {\n       'criteria': criteria,\n       'start': 0,\n       'limit': 10,\n   }\n \n   try:\n       # Execute Case search\n       r_search = requests.post(process_search_url, data=search_params, auth=auth) # POST submission\n       r_search.raise_for_status()\n   except requests.exceptions.HTTPError as e:  # catch HTTP errors\n       print('Error')\n       print('Status Code: {0}'.format(r_search.status_code))\n       print(r_search.text)\n   except requests.exceptions.Timeout as e:  # catch timeout\n       print('Timeout')\n \n   # Load JSON returned by Case search API\n   processes = json.loads(r_search.text)['processInstances']\n   # About each Case\n   for process in processes:\n       # About each Data Item\n       for data in process['data'].values():\n           # Continue if not File-type or no uploaded file\n           if data['dataType'] != 'FILE2' or data['value'] is None:\n               continue\n           # Create directory name\n           directory = '.\/file_py\/{0}_{1}_({2})'.format(process['processInstanceId'],\n                                                        process['processModelInfoName'],\n                                                        process['processInstanceTitle'])\n           # Create directory if it doesn't exist\n           os.makedirs(directory, exist_ok=True)\n           # About each file\n           for file_info in data['value']:\n               # Parameters for file download\n               download_params = {\n                   'id': file_info['id'],\n                   'processDataInstanceId': file_info['processDataInstanceId']\n               }\n \n               try:\n                   # Execute file download\n                   r_download = requests.post(file_download_url, data=download_params, auth=auth)\n                   r_download.raise_for_status()\n               except requests.exceptions.HTTPError as e:  # catch HTTP errors\n                   print('Error')\n                   print('Status Code: {0}'.format(r_search.status_code))\n                   print(r_search.text)\n               except requests.exceptions.Timeout as e:  # catch timeout\n                   print('Timeout')\n \n               # Write to file (open in binary mode)\n               with open(directory + '\/' + file_info['name'], 'wb') as f:\n                   f.write(r_download.content)<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Here is a script that searches for a Case that matches the conditions and downloads the file attached to the Case.<\/p>\n","protected":false},"author":30,"featured_media":83350,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_uag_custom_page_level_css":"","advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_seo_schema_type":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false},"categories":[296],"tags":[419],"class_list":["post-84047","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-developer-blog","tag-questetra-workflow-api"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-featured-image.png?fit=1200%2C675&ssl=1","uagb_featured_image_src":{"full":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-featured-image.png?fit=1200%2C675&ssl=1",1200,675,false],"thumbnail":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-featured-image.png?resize=440%2C440&ssl=1",440,440,true],"medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-featured-image.png?fit=560%2C315&ssl=1",560,315,true],"medium_large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-featured-image.png?fit=768%2C432&ssl=1",768,432,true],"large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-featured-image.png?fit=1024%2C576&ssl=1",1024,576,true],"1536x1536":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-featured-image.png?fit=1200%2C675&ssl=1",1200,675,true],"2048x2048":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-featured-image.png?fit=1200%2C675&ssl=1",1200,675,true],"newspack-article-block-landscape-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-featured-image.png?resize=1200%2C675&ssl=1",1200,675,true],"newspack-article-block-portrait-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-featured-image.png?resize=900%2C675&ssl=1",900,675,true],"newspack-article-block-square-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-featured-image.png?resize=1200%2C675&ssl=1",1200,675,true],"newspack-article-block-landscape-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-featured-image.png?resize=800%2C600&ssl=1",800,600,true],"newspack-article-block-portrait-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-featured-image.png?resize=600%2C675&ssl=1",600,675,true],"newspack-article-block-square-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-featured-image.png?resize=800%2C675&ssl=1",800,675,true],"newspack-article-block-landscape-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-featured-image.png?resize=600%2C450&ssl=1",600,450,true],"newspack-article-block-portrait-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-featured-image.png?resize=450%2C600&ssl=1",450,600,true],"newspack-article-block-square-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-featured-image.png?resize=600%2C600&ssl=1",600,600,true],"newspack-article-block-landscape-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-featured-image.png?resize=400%2C300&ssl=1",400,300,true],"newspack-article-block-portrait-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-featured-image.png?resize=300%2C400&ssl=1",300,400,true],"newspack-article-block-square-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-featured-image.png?resize=400%2C400&ssl=1",400,400,true],"newspack-article-block-landscape-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-featured-image.png?resize=200%2C150&ssl=1",200,150,true],"newspack-article-block-portrait-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-featured-image.png?resize=150%2C200&ssl=1",150,200,true],"newspack-article-block-square-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-featured-image.png?resize=200%2C200&ssl=1",200,200,true],"newspack-article-block-uncropped":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/workflow-api-file-download-featured-image.png?fit=1200%2C675&ssl=1",1200,675,true]},"uagb_author_info":{"display_name":"Peter Glover","author_link":"https:\/\/support.questetra.com\/en\/author\/petergloverquestetra\/"},"uagb_comment_info":1,"uagb_excerpt":"Here is a script that searches for a Case that matches the conditions and downloads the file attached to the Case.","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9DiIh-lRB","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":80825,"url":"https:\/\/support.questetra.com\/en\/developer-blog\/google-cloud-vision-api-questetra\/","url_meta":{"origin":84047,"position":0},"title":"Incorporate Optical Character Reading into Workflow (AI-OCR\/BPM Integration)","author":"Tsuyoshi Kusaka","date":"2019-09-04","format":false,"excerpt":"How to link Questetra BPM Suite with Google Cloud Vision API","rel":"","context":"In &quot;Questetra Developers Blog&quot;","block_context":{"text":"Questetra Developers Blog","link":"https:\/\/support.questetra.com\/en\/category\/developer-blog\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/GoogleAPI-Questetra-eyecatch.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/GoogleAPI-Questetra-eyecatch.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/GoogleAPI-Questetra-eyecatch.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/GoogleAPI-Questetra-eyecatch.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/08\/GoogleAPI-Questetra-eyecatch.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":77067,"url":"https:\/\/support.questetra.com\/en\/developer-blog\/download-process-data\/","url_meta":{"origin":84047,"position":1},"title":"Downloading Case and Task Lists Using Workflow API (reportId)","author":"Hirotaka NISHI","date":"2022-01-18","format":false,"excerpt":"Download Case and Task data from Questetra BPM Suite. Introducing examples of scripts using curl command.","rel":"","context":"In &quot;Questetra Developers Blog&quot;","block_context":{"text":"Questetra Developers Blog","link":"https:\/\/support.questetra.com\/en\/category\/developer-blog\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/download-process-task-workflow-api-1200x675-1.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/download-process-task-workflow-api-1200x675-1.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/download-process-task-workflow-api-1200x675-1.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/download-process-task-workflow-api-1200x675-1.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/05\/download-process-task-workflow-api-1200x675-1.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":74618,"url":"https:\/\/support.questetra.com\/en\/developer-blog\/message-start-event-http-python\/","url_meta":{"origin":84047,"position":2},"title":"Starting a Case from Outside of Questetra BPM Suite (Python Chapter)","author":"Hirotaka NISHI","date":"2019-01-28","format":false,"excerpt":"Introducing how to access Message Start Event (HTTP) API from Python script.","rel":"","context":"In &quot;Questetra Developers Blog&quot;","block_context":{"text":"Questetra Developers Blog","link":"https:\/\/support.questetra.com\/en\/category\/developer-blog\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/01\/message-start-event-http-with-python-1200x675-1.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/01\/message-start-event-http-with-python-1200x675-1.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/01\/message-start-event-http-with-python-1200x675-1.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/01\/message-start-event-http-with-python-1200x675-1.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/01\/message-start-event-http-with-python-1200x675-1.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":70260,"url":"https:\/\/support.questetra.com\/en\/developer-blog\/bpms-parent-child-workflows\/","url_meta":{"origin":84047,"position":3},"title":"How to Create a Good Parent-Child Workflow","author":"furuzo","date":"2018-07-17","format":false,"excerpt":"I will show you how to launch child Workflows from a parent Workflow, and advance the parent Workflow according to the situation in child Workflow.","rel":"","context":"In &quot;Questetra Developers Blog&quot;","block_context":{"text":"Questetra Developers Blog","link":"https:\/\/support.questetra.com\/en\/category\/developer-blog\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/parent-child-workflows-1200x675-1.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/parent-child-workflows-1200x675-1.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/parent-child-workflows-1200x675-1.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/parent-child-workflows-1200x675-1.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/parent-child-workflows-1200x675-1.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":76130,"url":"https:\/\/support.questetra.com\/en\/bpmn-icons\/message-start-event-http\/","url_meta":{"origin":84047,"position":4},"title":"Message Start Event (HTTP)","author":"Hirotaka NISHI","date":"2019-04-05","format":false,"excerpt":"Issues a URL that awaits an HTTP request. Starts a new Process automatically when an HTTP request is received. Capable of inserting values accepted as receive parameters to Business Data.","rel":"","context":"In &quot;BPMN Icons&quot;","block_context":{"text":"BPMN Icons","link":"https:\/\/support.questetra.com\/en\/category\/bpmn-icons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/10\/bpmn-icon-message-start-event-http-1200x675.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/10\/bpmn-icon-message-start-event-http-1200x675.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/10\/bpmn-icon-message-start-event-http-1200x675.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/10\/bpmn-icon-message-start-event-http-1200x675.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/10\/bpmn-icon-message-start-event-http-1200x675.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":71241,"url":"https:\/\/support.questetra.com\/en\/developer-blog\/zendesk-add-on\/","url_meta":{"origin":84047,"position":5},"title":"How to Collaborate with Zendesk (Zendesk Ticket Update)","author":"Tsuyoshi Kusaka","date":"2018-09-20","format":false,"excerpt":"Summarized the mutual way of linking between Zendesk support and Questetra BPM Suite","rel":"","context":"In &quot;Questetra Developers Blog&quot;","block_context":{"text":"Questetra Developers Blog","link":"https:\/\/support.questetra.com\/en\/category\/developer-blog\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/zendesk-questetra-1200-675.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/zendesk-questetra-1200-675.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/zendesk-questetra-1200-675.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/zendesk-questetra-1200-675.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/zendesk-questetra-1200-675.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"amp_enabled":false,"_links":{"self":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/84047","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/users\/30"}],"replies":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/comments?post=84047"}],"version-history":[{"count":23,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/84047\/revisions"}],"predecessor-version":[{"id":188660,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/84047\/revisions\/188660"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/media\/83350"}],"wp:attachment":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/media?parent=84047"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/categories?post=84047"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/tags?post=84047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}