User App¶
Endpoints
GET /user_apps
GET /user_apps/:id
POST /user_apps
POST /user_apps/:link_uid/link_uid
PUT /user_apps/:id
PUT /user_apps/:id/partial
DELETE /user_apps/:id
DELETE /user_apps
A user app is a custom application deployed within the Everysk platform.
Not bound to a workspace
User apps are scoped to the account, not to a workspace. Every workspace in the account sees the same user apps.
The user app object¶
What a user app object looks like?
{
"id": "uapp_Kj3mNpQxLo7TrW2sJfGvBe4cD",
"name": "My First App",
"description": "This is my first user app",
"tags": ["first", "app", "20210622"],
"data": "UEsDBBQAAAAIAA...",
"env_vars": {},
"link_uid": null,
"created": 1625598288,
"updated": 1625598288
}
| Property | Description |
|---|---|
id string |
Unique identifier (UID) for the user app. |
created timestamp |
Time at which the object was created. Measured in seconds since the Unix epoch. |
updated timestamp |
Time at which the object was updated. Measured in seconds since the Unix epoch. |
name string |
The name of the user app. |
description string |
An arbitrary string attached to the user app. Default is "". |
tags array |
A list of strings. Up to 32 tags. Use them to find the user app with a query. |
data string |
The application data, encoded in base64. Lists leave it out unless you send with_data=true. |
env_vars object |
Environment variables available to the user app at runtime. |
link_uid string |
An identifier you set to link the user app to an external system. Default is null. |
version string |
Indicates the user app's current version. |
List all user apps¶
Returns a list of user apps you've previously created. The user apps are returned in sorted order, with the most recent appearing first.
To list all user apps, run the following:
The above call returns the following JSON object:
{
"user_apps": [
{
"id": "uapp_Kj3mNpQxLo7TrW2sJfGvBe4cD",
"name": "My First App",
"description": "This is my first user app",
"tags": ["first", "app", "20210622"],
"env_vars": {},
"created": 1625598288,
"updated": 1625598288
},
...
],
"next_page_token": null
}
HTTP Request
GET /user_apps
HTTP Parameters
| Parameter | Description |
|---|---|
query string |
optional, default is null Request a list of user apps filtering it by name or tag. When using a tag to perform a query, each term must include a hashtag prefix. (e.g: query="#april #sample") See Filter with query. |
page_size integer |
optional, default is 10 Set the number of objects that will be listed per page. |
page_token string |
optional, default is null The next_page_token from the previous response. See the pagination guide. |
with_data boolean |
optional, default is False When True, each user app in the list includes its data. |
start, end, date_time, period_field string |
optional Filter the list by a period. User apps only take period_field=updated_on. See Filter by period. |
Retrieve a user app¶
Retrieves the details of an existing user app by supplying its id.
To retrieve a user app, run the following:
The above call returns the following JSON object:
{
"user_app": {
"id": "uapp_Kj3mNpQxLo7TrW2sJfGvBe4cD",
"name": "My First App",
"description": "This is my first user app",
"tags": ["first", "app", "20210622"],
"data": "UEsDBBQAAAAIAA...",
"env_vars": {},
"created": 1625598288,
"updated": 1625598288
}
}
HTTP Request
GET /user_apps/:id
HTTP Parameters
| Parameter | Description |
|---|---|
id string |
REQUIRED A unique identifier (UID) for a user app. A user app's id will always look like this: uapp_Kj3mNpQx.... |
with_data boolean |
optional, default is True When True, the response includes data. |
Create a user app¶
Creates a user app and then returns it. Only the account owner can create or update a user app. A sub-user gets 403.
To create a user app, run the following:
The call returns the new user app, in the same format as retrieve.
HTTP Request
POST /user_apps
HTTP Parameters
| Parameter | Description |
|---|---|
name string |
REQUIRED The name of the user app. |
data string |
REQUIRED The application data, encoded in base64. |
description string |
optional, default is "" An arbitrary string attached to the user app. |
tags array |
optional, default is [] A list of strings. Up to 32 tags. |
env_vars object |
optional, default is {} Environment variables available to the user app at runtime. |
link_uid string |
optional, default is null An identifier you set to link the user app to an external system. |
with_data boolean |
optional, default is True When True, the response includes data. |
Update a user app¶
Updates a user app and then returns it. Only the fields that you send change. A field that you leave out keeps its current value. Only the account owner can update a user app. A sub-user gets 403.
To update a user app, run the following:
The call returns the updated user app, in the same format as retrieve.
HTTP Request
PUT /user_apps/:id
HTTP Parameters
| Parameter | Description |
|---|---|
id string |
REQUIRED A unique identifier (UID) for a user app. |
name string |
optional The name of the user app. |
data string |
optional The application data, encoded in base64. |
description string |
optional An arbitrary string attached to the user app. |
tags array |
optional A list of strings. Up to 32 tags. |
env_vars object |
optional Environment variables available to the user app at runtime. |
link_uid string |
optional An identifier you set to link the user app to an external system. |
with_data boolean |
optional, default is True When True, the response includes data. |
PUT /user_apps/:id/partial takes the same body but ignores data. Use it to change the other fields without sending the application data again.
Create or update a user app by link_uid¶
Creates or replaces the user app that has a given link_uid. Use it to deploy the same app again and again from an external system. The body is the same as on create.
- If no user app has this
link_uid, the API creates one and responds with HTTP201. - If one has it, the API replaces the most recently updated one and responds with HTTP
200. A field that you leave out goes back to its default value, the same as on create.
If the body has a link_uid that is different from the one in the URL, the API returns 400.
HTTP Request
POST /user_apps/:link_uid/link_uid
Delete a user app¶
Permanently deletes a user app. It cannot be undone. Returns an object with the user app's id, its name and an attribute specifying whether the user app was successfully deleted or not.
To delete a user app, run the following:
The above call returns the following JSON object:
To delete several user apps in one call, use DELETE /user_apps?ids=<id>,<id>. The response has a user_apps array with one {"id", "name", "deleted"} object per id, where name is BATCH_DELETE. deleted is false only when the delete fails. An id that does not exist also gives "deleted": true.
HTTP Request
DELETE /user_apps/:id
DELETE /user_apps
HTTP Parameters
| Parameter | Description |
|---|---|
id string |
REQUIRED for one user app. A unique identifier (UID) for a user app. |
ids string |
REQUIRED for several user apps. The ids, separated by commas. |