Links

Update Project

Update project with specified id.
patch
https://environment.lvis.io
/api/v2/projects/:project_id
Update Project

Example

Request
Response
cURL
// PATCH /api/v2/projects/951a951e-07de-457f-99c8-f1307fad4eeb
// Host: environment.lvis.io
// Authorization: Bearer JmsmU5gZb6xNVUgQGoKcQLvQjRhKAUSb
// Content-Type: application/vnd.api+json
{
"data": {
"type": "projects",
"id": "951a951e-07de-457f-99c8-f1307fad4eeb",
"attributes": {
"name": "NEW Project Name"
}
}
}
// Response: 204 No Content
curl --request PATCH \
--url https://environment.lvis.io/api/v2/projects/951a951e-07de-457f-99c8-f1307fad4eeb \
--header 'Authorization: Bearer JmsmU5gZb6xNVUgQGoKcQLvQjRhKAUSb' \
--header 'Content-Type: application/vnd.api+json' \
--data '{
"data": {
"type": "projects",
"id": "951a951e-07de-457f-99c8-f1307fad4eeb",
"attributes": {
"name": "NEW Project Name"
}
}
}'

App Setup settings

List of fields of App Setup. Each field is updated separately and if present its content is rewritten completely.
Request
Response
cURL
curl --request PATCH \
--url https://environment.lvis.io/api/v2/projects/951a951e-07de-457f-99c8-f1307fad4eeb \
--header 'Authorization: Bearer JmsmU5gZb6xNVUgQGoKcQLvQjRhKAUSb' \
--header 'Content-Type: application/vnd.api+json' \
--data '{
"data": {
"type": "projects",
"id": "951a951e-07de-457f-99c8-f1307fad4eeb",
"attributes": {
"settings": [
{
"key": "logo",
"values": {
"all": "https://monterosa.com/img/logo.png"
}
},
{
"key": "language_selector_position",
"values": {
"all": "left"
}
},
{
"key": "text",
"values": {
"en": "Lorem ipsum dolor"
}
},
{
"key": "number",
"values": {
"all": 42
}
}
]
}
}
}'
// Response: 204 No Content
--url https://environment.lvis.io/api/v2/projects/951a951e-07de-457f-99c8-f1307fad4eeb \
--header 'Authorization: Bearer JmsmU5gZb6xNVUgQGoKcQLvQjRhKAUSb' \
--header 'Content-Type: application/vnd.api+json' \
--data '{
"data": {
"type": "projects",
"id": "951a951e-07de-457f-99c8-f1307fad4eeb",
"attributes": {
"settings": [
{
"key": "logo",
"values": {
"all": "https://monterosa.com/img/logo.png"
}
},
{
"key": "language_selector_position",
"values": {
"all": "left"
}
},
{
"key": "text",
"values": {
"en": "Lorem ipsum dolor"
}
},
{
"key": "number",
"values": {
"all": 42
}
}
]
}
}
}'

Hidden elements

Elements visibility settings are updated by providing hidden_elements attribute and only for provided element types.
Request
Response
cURL
curl --request PATCH \
--url https://environment.lvis.io/api/v2/projects/951a951e-07de-457f-99c8-f1307fad4eeb \
--header 'Authorization: Bearer JmsmU5gZb6xNVUgQGoKcQLvQjRhKAUSb' \
--header 'Content-Type: application/vnd.api+json' \
--data '{
"data": {
"type": "projects",
"id": "951a951e-07de-457f-99c8-f1307fad4eeb",
"attributes": {
"hidden_elements": [
{
"type": "vote",
"hidden": true
},
{
"type": "emote",
"hidden": false
}
]
}
}
}'
// Response: 204 No Content
--url https://environment.lvis.io/api/v2/projects/951a951e-07de-457f-99c8-f1307fad4eeb \
--header 'Authorization: Bearer JmsmU5gZb6xNVUgQGoKcQLvQjRhKAUSb' \
--header 'Content-Type: application/vnd.api+json' \
--data '{
"data": {
"type": "projects",
"id": "951a951e-07de-457f-99c8-f1307fad4eeb",
"attributes": {
"hidden_elements": [
{
"type": "vote",
"hidden": true
},
{
"type": "emote",
"hidden": false
}
]
}
}
}'
In the example above elements of "vote" type is set to be invisible on UI and "emote" is set to be visible. Settings for other element types not changed since hidden_elements attribute contains settings only for "vote" and "emote". It is similar to check "Emote" and uncheck "Vote" on Elements tab on Project Settings page.