Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

API v1 - extract all jobs in a given folder possible?

Is it possible to export all jobs in a give folder to a json file?

Anything like this:
curl -o export.json -X GET -u api_user:api_pwd --insecure "http://127.0.0.1:8080/rest/v1/group/name/[GroupName]/project/name/[ProjectName]/version/name/[VersionName]/folder/name/[FullPathName]/export"

4 Community Answers

Matillion Agent  

Kalyan Arangam —

hi Daniel,

Unfortunately, there are no options to download a folder. You may download the ProjectGroup/Project/Version/Job.

Best
kalyan


Tiago Silva —

Hi,
Isn't there an option not even to get the Job names which are in a folder?

Tiago Silva


Matillion Agent  

Damian Chan —

Hello Tiago,

Unfortunately, there isn’t. However, if you really need this feature, one way around it is to add a key to the description field of the jobs and use the that to export the jobs that you want. For example, you can use the following to return a list of transformation jobs in a group/project/version.

“http://${server}/rest/v1/group/name/${from_group}/project/name/${from_project}/version/name/${from_version}/transformation”

Doing a curl on the above will return a JSON object. The object will contain records which describe your transformation jobs; name, description etc. Now if you have a key in the description field such as “Project A” then you can get all the transformation jobs with “Project A” in the description field. In there you can then grab the individual name of the jobs.

I understand that this isn’t ideal as you may need to use the Python component to interrogate the JSON object and extract what you need before doing another curl to export the relevant jobs. However, it maybe worth trying.

I hope this helps.

Best Regards,
Damian


Tiago Silva —

Hi,
Ok. Thanks.
We solved it with a prefix in the Job name. Not ideal though.
I just wanted to confirm there wasn't a better solution.

/TS

Post Your Community Answer

To add an answer please login