Update Application
curl --request PUT \
--url https://{host}/api/resources/v1/applications \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"version": "<string>",
"env": {},
"parent": 123,
"application_type": "<string>",
"attributes": {
"kpis": [
{}
],
"asset_declarations": {},
"features": {},
"solver_settings": {},
"command": [
"<string>"
]
}
}
'import requests
url = "https://{host}/api/resources/v1/applications"
payload = {
"name": "<string>",
"version": "<string>",
"env": {},
"parent": 123,
"application_type": "<string>",
"attributes": {
"kpis": [{}],
"asset_declarations": {},
"features": {},
"solver_settings": {},
"command": ["<string>"]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
version: '<string>',
env: {},
parent: 123,
application_type: '<string>',
attributes: {
kpis: [{}],
asset_declarations: {},
features: {},
solver_settings: {},
command: ['<string>']
}
})
};
fetch('https://{host}/api/resources/v1/applications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/api/resources/v1/applications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'version' => '<string>',
'env' => [
],
'parent' => 123,
'application_type' => '<string>',
'attributes' => [
'kpis' => [
[
]
],
'asset_declarations' => [
],
'features' => [
],
'solver_settings' => [
],
'command' => [
'<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/api/resources/v1/applications"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"version\": \"<string>\",\n \"env\": {},\n \"parent\": 123,\n \"application_type\": \"<string>\",\n \"attributes\": {\n \"kpis\": [\n {}\n ],\n \"asset_declarations\": {},\n \"features\": {},\n \"solver_settings\": {},\n \"command\": [\n \"<string>\"\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{host}/api/resources/v1/applications")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"version\": \"<string>\",\n \"env\": {},\n \"parent\": 123,\n \"application_type\": \"<string>\",\n \"attributes\": {\n \"kpis\": [\n {}\n ],\n \"asset_declarations\": {},\n \"features\": {},\n \"solver_settings\": {},\n \"command\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/resources/v1/applications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"version\": \"<string>\",\n \"env\": {},\n \"parent\": 123,\n \"application_type\": \"<string>\",\n \"attributes\": {\n \"kpis\": [\n {}\n ],\n \"asset_declarations\": {},\n \"features\": {},\n \"solver_settings\": {},\n \"command\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_bodyusing RestSharp;
var options = new RestClientOptions("https://{host}/api/resources/v1/applications");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"name\": \"<string>\",\n \"version\": \"<string>\",\n \"env\": {},\n \"parent\": 123,\n \"application_type\": \"<string>\",\n \"attributes\": {\n \"kpis\": [\n {}\n ],\n \"asset_declarations\": {},\n \"features\": {},\n \"solver_settings\": {},\n \"command\": [\n \"<string>\"\n ]\n }\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://{host}/api/resources/v1/applications");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"name\": \"<string>\",\n \"version\": \"<string>\",\n \"env\": {},\n \"parent\": 123,\n \"application_type\": \"<string>\",\n \"attributes\": {\n \"kpis\": [\n {}\n ],\n \"asset_declarations\": {},\n \"features\": {},\n \"solver_settings\": {},\n \"command\": [\n \"<string>\"\n ]\n }\n}");
CURLcode ret = curl_easy_perform(hnd);123{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Update Application
Updates an application.
:param application: The application to update
PUT
/
applications
Update Application
curl --request PUT \
--url https://{host}/api/resources/v1/applications \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"version": "<string>",
"env": {},
"parent": 123,
"application_type": "<string>",
"attributes": {
"kpis": [
{}
],
"asset_declarations": {},
"features": {},
"solver_settings": {},
"command": [
"<string>"
]
}
}
'import requests
url = "https://{host}/api/resources/v1/applications"
payload = {
"name": "<string>",
"version": "<string>",
"env": {},
"parent": 123,
"application_type": "<string>",
"attributes": {
"kpis": [{}],
"asset_declarations": {},
"features": {},
"solver_settings": {},
"command": ["<string>"]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
version: '<string>',
env: {},
parent: 123,
application_type: '<string>',
attributes: {
kpis: [{}],
asset_declarations: {},
features: {},
solver_settings: {},
command: ['<string>']
}
})
};
fetch('https://{host}/api/resources/v1/applications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/api/resources/v1/applications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'version' => '<string>',
'env' => [
],
'parent' => 123,
'application_type' => '<string>',
'attributes' => [
'kpis' => [
[
]
],
'asset_declarations' => [
],
'features' => [
],
'solver_settings' => [
],
'command' => [
'<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/api/resources/v1/applications"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"version\": \"<string>\",\n \"env\": {},\n \"parent\": 123,\n \"application_type\": \"<string>\",\n \"attributes\": {\n \"kpis\": [\n {}\n ],\n \"asset_declarations\": {},\n \"features\": {},\n \"solver_settings\": {},\n \"command\": [\n \"<string>\"\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{host}/api/resources/v1/applications")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"version\": \"<string>\",\n \"env\": {},\n \"parent\": 123,\n \"application_type\": \"<string>\",\n \"attributes\": {\n \"kpis\": [\n {}\n ],\n \"asset_declarations\": {},\n \"features\": {},\n \"solver_settings\": {},\n \"command\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/resources/v1/applications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"version\": \"<string>\",\n \"env\": {},\n \"parent\": 123,\n \"application_type\": \"<string>\",\n \"attributes\": {\n \"kpis\": [\n {}\n ],\n \"asset_declarations\": {},\n \"features\": {},\n \"solver_settings\": {},\n \"command\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_bodyusing RestSharp;
var options = new RestClientOptions("https://{host}/api/resources/v1/applications");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"name\": \"<string>\",\n \"version\": \"<string>\",\n \"env\": {},\n \"parent\": 123,\n \"application_type\": \"<string>\",\n \"attributes\": {\n \"kpis\": [\n {}\n ],\n \"asset_declarations\": {},\n \"features\": {},\n \"solver_settings\": {},\n \"command\": [\n \"<string>\"\n ]\n }\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://{host}/api/resources/v1/applications");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"name\": \"<string>\",\n \"version\": \"<string>\",\n \"env\": {},\n \"parent\": 123,\n \"application_type\": \"<string>\",\n \"attributes\": {\n \"kpis\": [\n {}\n ],\n \"asset_declarations\": {},\n \"features\": {},\n \"solver_settings\": {},\n \"command\": [\n \"<string>\"\n ]\n }\n}");
CURLcode ret = curl_easy_perform(hnd);123{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Body
application/json
Response
Successful Response
The response is of type integer.
Was this page helpful?