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

phrase jobs keys_create does not update job keys #158

Open
L4ngu0r opened this issue Dec 30, 2024 · 1 comment
Open

phrase jobs keys_create does not update job keys #158

L4ngu0r opened this issue Dec 30, 2024 · 1 comment
Assignees

Comments

@L4ngu0r
Copy link

L4ngu0r commented Dec 30, 2024

Using latest CLI version (v2.35.4)

https://developers.phrase.com/api/#post-/projects/-project_id-/jobs/-id-/keys

phrase jobs keys_create --access_token ACCESS_TOKEN --project_id PROJEC_ID --data '{ "translations_key_ids": ["7e92008324404a1ce1ffa49d3625a414","cdc0d8d54f23cc00e62c15c6563641ea"] }' --id JOB_ID

Command output correctly with the job details, but the jobs is not updated

I manage to make it work with the API directly:

curl "https://api.phrase.com/v2/projects/PROJECT_ID/jobs/JOB_ID/keys" \
 -u ACCESS_TOKEN \
 -X POST \
 -d '{"translation_key_ids":["7e92008324404a1ce1ffa49d3625a414","cdc0d8d54f23cc00e62c15c6563641ea"]}' \
 -H 'Content-Type: application/json'

With a curl the job is correctly updated

@jablan jablan self-assigned this Jan 2, 2025
@jablan
Copy link

jablan commented Jan 2, 2025

I have trouble reproducing this, for me it's working as intended:

$ ~/Downloads/phrase_linux_amd64 -t [TOKEN] jobs keys_create --project_id 979f47af10146bc8f478a8cfb3abdce8 --id cfdf166ac312dd9565a3c03b57be62b8 --data '{"translation_key_ids":["609796db2481ee1b41f572983623fe7e", "74f316c5dd0853b607c4cedd7afef59c"]}'

adds the two keys to the job.

However, I have problems getting keys_delete to work (i.e. to pass the key IDs list correctly to the API), so I will open an internal ticket for that.

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

No branches or pull requests

2 participants