Application¶
An application is a basic TE entity can serves as a container for metrics, alerts and other entities. It also can be used to group a bunch of users.
Creating an Application¶
You can create an Application in ThirdEye using 2 ways: 1. ThirdEye Admin 2. Using the API
From ThirdEye Admin UI¶
In order to create an application, follow the steps below.
- Go to the
thirdeye-admin
page. http://localhost:1426/thirdeye-admin - Click the
Entity Editor
tab - Choose
Application
fromSelect config type
. - In the
Select Entity to Edit
menu, selectCreate New
- Copy paste the json block below into the textbox on the right and click
load to editor
{
"application": "myApp",
"recipients": "myapp_owner@company.com"
}
- Click
Submit
on the bottom left to create an application.
From API¶
Here are the steps to create an Application from the terminal.
1. Obtain an authentication token. By default, TE auth is disabled, so the credentials are ignored. Feel free to modify the values in the script below.
function tetoken {
curl -s --location --request POST --cookie-jar - 'http://localhost:1426/auth/authenticate' \
--header 'Authorization: Bearer temp' \
--header 'Content-Type: application/json' \
--data-raw '{
"principal": "1",
"password": "1"
}' | grep te_auth | awk '{print $NF}'
}
token=$(tetoken)
- Create the application using the command below. Feel free to update the inline json as per your needs.
function create_te_app {
token=$1
curl --location --request POST 'http://localhost:1426/thirdeye/entity?entityType=APPLICATION' \
--header "Authorization: Bearer ${token}" \
--header 'Content-Type: application/json' \
--header "Cookie: te_auth=${token}" \
--data-raw '{
"application": "MyApp",
"recipients": "myapp_owner@company.com"
}'
}
create_te_app token