The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Is it possible to automate export of some object type tables in csv, for example - after updating information in one object?
Or is it possible to make export of some object type in csv, for example, once per hour?
Hi, Alexander!
I tried to use GET Method: http://sd.dev.fxclub.org:8080/rest/insight/1.0/objecttype/798/export , where 798 is ID of objecttype PC/Laptop in my ObjectSchema, but i have received error(500 Internal Server Error). Code of error can be seen here: https://pastebin.com/gASM5fzn.
Can you help me?
Hi Artem,
You are missing parameters on the URL,
I have attached an example from using restlet client that you can use to build up the query parameters. They are mentioned earlier in this questions.
Basically you are missing the following section after 798/export in the URL (which of course needs adjustment to your instance:
?searchParams={"iqlSearch":true,"iqlParams":{"objectTypeId":"{1} ","attributesToDisplay":{"attributesToDisplayIds":[ 3587,3593,3594,3598,3603]},"page":1,"asc":1,"resultsPerPage":25,"includeAttributes":false,"objectSchemaId":"{9}","iql":""},"objectSchemaId":"{9}"}&delimiterValue=COLON&charEncoder=UTF8&importable=1
We were using the rest/insight/1.0/objectschema/export/server endpoint to schedule an automatic export however once we upgraded to version 8.6 this stopped working - status code is 403.
Has this been intentionally removed or has the url changed?
Does the export endpoint still exist in version 8.6?
I just get "Something went wrong. Contact administrator"
The endpoint has recently been changed to:
/rest/insight/1.0/objectschemaexport/export/server
with POST /rest/insight/1.0/objectschemaexport/export/server I get status code 404.
what about GET /rest/insight/1.0/objecttype/{id}/export ? has that changed? and are these changes documented?
Hello!
My script for backup:
https://github.com/TerAnYu/jira/blob/master/insight_backup.sh
need command-line JSON processor: https://stedolan.github.io/jq/
The actual version is only on the github!
#!/bin/sh # version: 20190611 # Writer: TerAnYu # need: command-line JSON processor # wget https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 -O jq && chmod +x jq # curl with libssl url=http://127.0.0.1:8080 listreq=/rest/insight/1.0/objectschema/list exportreq=/rest/insight/1.0/objectschema/export/server username="localuser" password="localpassword" archpwd=123456 date=`date +"%Y%m%d_%H%M%S"` data=`curl -s \ --connect-timeout 5 \ -u "${username}":"${password}" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -X GET ${url}${listreq}` ids=`echo ${data} | ./jq -r '.objectschemas[].id'` cnt=0 for i in $ids; do name=`echo ${data} | ./jq -r ".objectschemas[${cnt}].name"` countobj=`echo ${data} | ./jq -r ".objectschemas[${cnt}].objectCount"` # echo output: "${cnt}; ${date}; ${i}; ${name}; ${countobj}" cnt=$((cnt+1)) param(){ cat <<EOF { "fileName":"${date}_${name}.zip", "objectSchemaId":"${i}", "includeObjects":"true", "password":"${archpwd}", "objectSchemaName":"${name}", "totalObjectsInExport":"${countobj}" } EOF } status_code=$( curl -s -u ${username}:${password} \ -H "Content-Type: application/json" \ --write-out %{http_code} \ --silent \ --connect-timeout 5 \ -X POST \ --output "/dev/null" \ --data "$(param)" \ "${url}${exportreq}" ) if [ $status_code -ne 200 ] ; then echo "Site bad status (${date}_${name}.zip): $status_code" else echo "Site good status (${date}_${name}.zip): $status_code" fi done exit
Hello everyone! We are very excited to announce some much needed changes to the issue create experience in JSM (the blue "create" button) at the top of the screen. We have just starte...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events