If you're referring to the API, then the general steps are:
- Call the
list
method for whatever object you are searching for.
- Loop through the results to find the ID of the object.
- Call the
read
method on the object.
Here's a Python example to get the details of an app named foo
:
import requests
# create an API token at https://my.opalstack.com/tokens
# then use that token value in the next line
OPAL_TOKEN = 'XXXXXXXX'
OPAL_HEADERS = {
'Authorization': f'Token {OPAL_TOKEN}',
'Content-Type':'application/json'
}
# get the app list
apps = requests.get(
'https://my.opalstack.com/api/v0/app/list/',
headers=OPAL_HEADERS
).json()['apps']
# find ID of an app named 'foo'
appid = [app['id'] for app in apps if app['name'] == 'foo'][0]
# get the app details:
appdetails = requests.get(
f'https://my.opalstack.com/api/v0/app/read/{appid}',
headers=OPAL_HEADERS
).json()
# you now have all of the 'foo' app info info in `appdetails`