create an app secret
curl --request POST \
--url https://api.nuon.co/v1/apps/{app_id}/secret \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"value": "<string>"
}
'import requests
url = "https://api.nuon.co/v1/apps/{app_id}/secret"
payload = {
"name": "<string>",
"value": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', value: '<string>'})
};
fetch('https://api.nuon.co/v1/apps/{app_id}/secret', 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://api.nuon.co/v1/apps/{app_id}/secret",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'value' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.nuon.co/v1/apps/{app_id}/secret"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.post("https://api.nuon.co/v1/apps/{app_id}/secret")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nuon.co/v1/apps/{app_id}/secret")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"app_id": "<string>",
"created_at": "<string>",
"created_by_id": "<string>",
"id": "<string>",
"length": 123,
"name": "<string>",
"org_id": "<string>",
"updated_at": "<string>"
}{
"description": "<string>",
"error": "<string>",
"user_error": true
}{
"description": "<string>",
"error": "<string>",
"user_error": true
}{
"description": "<string>",
"error": "<string>",
"user_error": true
}{
"description": "<string>",
"error": "<string>",
"user_error": true
}{
"description": "<string>",
"error": "<string>",
"user_error": true
}{
"description": "<string>",
"error": "<string>",
"user_error": true
}create an app secret
deprecated
Create an app secret that can be used to configure components. To reference an app secret, use .nuon.secrets.<secret_name>.
NOTE secrets can only be written, or deleted, not read.
POST
/
v1
/
apps
/
{app_id}
/
secret
create an app secret
curl --request POST \
--url https://api.nuon.co/v1/apps/{app_id}/secret \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"value": "<string>"
}
'import requests
url = "https://api.nuon.co/v1/apps/{app_id}/secret"
payload = {
"name": "<string>",
"value": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', value: '<string>'})
};
fetch('https://api.nuon.co/v1/apps/{app_id}/secret', 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://api.nuon.co/v1/apps/{app_id}/secret",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'value' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.nuon.co/v1/apps/{app_id}/secret"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.post("https://api.nuon.co/v1/apps/{app_id}/secret")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nuon.co/v1/apps/{app_id}/secret")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"app_id": "<string>",
"created_at": "<string>",
"created_by_id": "<string>",
"id": "<string>",
"length": 123,
"name": "<string>",
"org_id": "<string>",
"updated_at": "<string>"
}{
"description": "<string>",
"error": "<string>",
"user_error": true
}{
"description": "<string>",
"error": "<string>",
"user_error": true
}{
"description": "<string>",
"error": "<string>",
"user_error": true
}{
"description": "<string>",
"error": "<string>",
"user_error": true
}{
"description": "<string>",
"error": "<string>",
"user_error": true
}{
"description": "<string>",
"error": "<string>",
"user_error": true
}Authorizations
APIKeyOrgID
Type "Bearer" followed by a space and token.
Path Parameters
app ID
⌘I