Patch: update GET job list to API v2 #175
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR updates the GET job list API call to use v2 endpoint. Old v1 endpoint will be removed soon from the API server.
Additionally, adds the new
--archived
flag tocloudos job list
to be able to retrieve archived jobs list.Jira
https://lifebit.atlassian.net/browse/LIF-1348
Changes
--archived
option. When used, only archived jobs list are retrieved.Note
Getting a single job by ID is still using v1 in the platform so does not need to be updated.
Tests
Using docker image:
Global variables:
Get job list --help:
Get job list, default options: first page, last 30 jobs:
Get archived job list, default options: first page, last 30 jobs:
Get job list, options: second page (30 jobs):
Note
Each page contains 10 jobs, so with this we are effectively getting page 2, 3, and 4
Get job list, options: json output
Get job list, options: --last-n-jobs 100:
Get job list, options: --last-n-jobs all:
Get archived job list, options: --last-n-jobs all: