There are many references in the API to “owner-id” but no where does it tell you where or how to get your owner ID. Can someone show me how/where?
I tried using the “id” field returned from the “me” API in the “context” API, but that gives me an error of:
“The requested owner does not exist or you don’t have permission to list its contexts”
Which makes no sense coz I am an admin !!
Another frustrating thing is the reference to “owner-slug” without explaining how/where to find that. However through sheer trial and error and guess work (from the doc of “project-slug”), I discovered that it is composed of “{vcs}/{organization}”.
These seem very little things but they can waste someone’s time and they should be defined at the very beginning of a documentation.
Am I wrong or missing something?
Hi @ahmedatgithub ,
The easiest way would be to use the owner-slug
parameter as you have mentioned, which takes the format {vcs}/{orgname}
.
Example: gh/circleci
For owner-id
, you can get it from the following endpoint:
https://circleci.com/api/v1.1/organization/{vcs}/{orgname}/plan
In the response, you will see the owner-id
as the value under "org" > "analytics_id"
(note: the above v1.1 endpoint is being deprecated and subject to be removed in the future)
I agree that the documentation could be more clear, and I will escalate this internally to get it updated.
Best Regards
Thanx Aaron, this is helpful.
Really appreciate the quick response.
hello @aaronclark , am having a similar problem where am trying to update an environment variable in a context, am required to provide the context id, but don’t know how or where to find or locate it, the documentation is not pointing any clues on how to get it, please help anyone?
Best to work on your new thread
https://discuss.circleci.com/t/unable-to-find-context-id/44886/2
1 Like