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

User mapping should use the accounts API rather than a hard-coded table #10

Open
alexiswl opened this issue Jun 9, 2021 · 3 comments
Open

Comments

@alexiswl
Copy link
Member

alexiswl commented Jun 9, 2021

Illumina JS:
https://github.com/umccr/illumination/blob/master/utils/illumina.js#L8

See: https://ica-docs.readme.io/reference#accounts

@alexiswl alexiswl changed the title User mapping should use the accounts API rather than a hard-link table User mapping should use the accounts API rather than a hard-coded table Jun 9, 2021
@pdiakumis
Copy link
Member

Hm, @alexiswl what is the accountId here? It's not the createdBy ID, right?

@alexiswl
Copy link
Member Author

alexiswl commented Nov 29, 2021

Yep it's the createdBy attribute.

Login

ica-context-switcher --scope admin --project-name development
account_id="$(ica workflows runs get -o json wfr.ebd5b5cdc5334efeb7a2ab0e88baeeb0 | jq -r '.createdBy')"

Get the account name from the id

curl --silent --location --request GET --header "Authorization: Bearer ${ICA_ACCESS_TOKEN}" --header 'Accept: application/json' "https://aps2.platform.illumina.com/v1/accounts/${account_id}" | jq -r '.name'
ICA Service

@pdiakumis
Copy link
Member

Ha, thank you, for some reason in my test last night I had a silly token in the endpoint path and wasn't getting anything. Okay, will add a translation function but I think illumination is going into the dumpster anyhow (though might still be useful for others out there).

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