Short answer
The field namespace
is the identifier of the stack. Calling api/stacks/my_namespace
will get the desired stack.
How I found this
After fiddling a bit with the documentation and the api, I realized that the stacks
resource is just another collection that can be selected using its identifier.
When you invoke api/stacks
you'll receive a collection of stacks looking like this:
[
{
"namespace": "my_awesome_namespace_1",
"services": []
...
"namespace": "my_awesome_namespace_2",
"services": []
...
}
]
I simply tried api/stacks/my_awesome_namespace_1
and received the desired object in json format.
And beyond
I believe the most important thing to this answer is that this method could be generalized to any UCP resource.
- fetch all resources of a given resource type
- try to determine which field is the identifier
- try calling
my_awesome_resource/my_awesome_resource_identifier
- cheer up :)