# Post URL does not appear to be portable across environments

**URL:** <https://discuss.elastic.co/t/post-url-does-not-appear-to-be-portable-across-environments/269052>\
**Category:** Kibana\
**Created:** [April 1, 2021, 3:50pm UTC](https://discuss.elastic.co/t/post-url-does-not-appear-to-be-portable-across-environments/269052 "2021-04-01T15:50:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eeijlar](https://avatars.discourse-cdn.com/v4/letter/e/96bed5/32.png) [@eeijlar](https://discuss.elastic.co/u/eeijlar)\
**Post date:** [April 1, 2021, 3:50pm UTC](https://discuss.elastic.co/t/post-url-does-not-appear-to-be-portable-across-environments/269052/1 "2021-04-01T15:50:50Z")

</div>

I am using the following snippet to download CSV reports in Kibana:

```auto
                    for filename in ${KIBANA_QUERIES}/*.rison; do
                       echo "Processing query file: $filename"
                       CSV_REPORT=$(basename $filename.csv)
                       REPORT_READY=400 
                       REPORT_PATH=$(curl -s --insecure -u "elastic:${ELASTIC_SECRET_UMS}" -H "kbn-version: ${ELK_VERSION}" -XPOST $(cat $filename) | jq -r '.path')
                       echo "Report path: $REPORT_PATH"

                       if [-z $REPORT_PATH]; then
                       while ["${REPORT_READY}" != "200"]
                       do
                         REPORT_READY=$(curl -I -s --insecure -u "elastic:${ELASTIC_SECRET_UMS}" -H "kbn-xsrf: true" https://${K8S_NODE_IP}:${KIBANA_NODE_PORT}${REPORT_PATH} | grep HTTP | awk '{print $2}')
                         if ["$REPORT_READY" == "404"]; then
                             echo "Exiting on 404"
                             break;
                         fi
                         sleep 1
                         echo "Waiting for report to be ready, status $REPORT_READY"
                       done

                       if ["$REPORT_READY" == 200]; then
                          echo "Report path: $REPORT_PATH"
                          echo "Downloading report to: $CSV_REPORT"
                          curl -s --insecure -u "elastic:${ELASTIC_SECRET_UMS}" -H "kbn-xsrf: true" https://${K8S_NODE_IP}:${KIBANA_NODE_PORT}${REPORT_PATH} --output $HOME/Downloads/$CSV_REPORT
                       fi
                       fi
                    done

```

The 'rison' files (collected Post URLs from Kibana) were collected about a week ago, and there have been multiple re-installs of Kibana into a kubernetes cluster with new underlying data each time. Downloading CSV files with the rison files, results in empty CSV files, they just contain headers. I am wondering if the Post URL contains a timestamp for a data set that no longer exists in the cluster? Can this be changed if it does?

Thanks  
John

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [April 1, 2021, 4:52pm UTC](https://discuss.elastic.co/t/post-url-does-not-appear-to-be-portable-across-environments/269052/2 "2021-04-01T16:52:13Z")

</div>

The post URL includes a saved object id pointing to the saved search. If your Kibana re-install included clearing the kibana index and re-creating saved objects, then that would be a problem. If this is the case, you can export the searches via the saved object API and re-import them.

The post URLs might contain fixed dates, it depends on what you configured in Discover when pulling the post URL - to make them "portable" make sure to keep them relative to the current date, like in this example:

 ![Screenshot 2021-04-01 at 18.47.42](https://us1.discourse-cdn.com/elastic/original/3X/5/4/54db62e16438a123885bebf3bc38e16c6aa79888.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 29, 2021, 4:52pm UTC](https://discuss.elastic.co/t/post-url-does-not-appear-to-be-portable-across-environments/269052/3 "2021-04-29T16:52:27Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
