Retrieve Stanzas Names
Use this REST call to get the names of all configured stanzas in a specific context class.
This can be done by leveraging the /get_stanzas_names REST endpoint.
In order to do so, first of all, users must have an authorization token for their account.
More info on generating a token here.
Once users have their accessToken they can add it to their authorization and send a POST request with the context_class name as an arg
curl --location --request POST 'https://api{YOUR-USER-ID}.monalabs.io/get_stanzas_names' \
--header 'Authorization: Bearer {YOUR-ACCESS-TOKEN}' \
--header 'Content-Type: application/json' \
--data-raw '{
"context_class": "LOAN_APPLICATION"
}'
import requests
import json
url = "https://api{YOUR-USER-ID}.monalabs.io/get_stanzas_names"
payload = json.dumps({
"context_class": "LOAN_APPLICATION"
})
headers = {
'Authorization': 'Bearer {YOUR-ACCESS-TOKEN}',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
The response is a JSON with the names of all the configures stanza in the chosen context class
{
"response_data": [
"stanza_1",
"stanza_2",
"stanza_3"
],
"partial_data": false
}
Updated 7 days ago