Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jobs list does not support json format output to file #564

Open
jimr6007 opened this issue Nov 20, 2024 · 1 comment
Open

jobs list does not support json format output to file #564

jimr6007 opened this issue Nov 20, 2024 · 1 comment
Labels

Comments

@jimr6007
Copy link

rd-cli 2.0.8

rd jobs list --project my-project -J < ...the job id... > -f ./bro.json -F json

Error: The format is not valid: json
[code: api.error.item.unsupported-format; APIv50]
Request failed: 406 Not Acceptable

yaml and of course xml no problem but not json

direct call to api via curl works fine:
https://docs.rundeck.com/docs/api/#getting-a-job-definition

curl --insecure -Ss -X GET https://localhost:4443/api/47/job/$job_id
--header 'X-Rundeck-Auth-Token:'"$TOKEN" --header 'Accept: application/json'

@gschueler gschueler added the bug label Nov 20, 2024
@gschueler
Copy link
Member

the default api version used is 29 currently, and json format requires API version 44+. Can you try specifying the API version in your RD_URL , e.g:

export RD_URL=https://localhost:4443/api/47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants