Create a site note
curl --request POST \
--url https://v1.api.altostrat.io/metadata/{siteId}/notes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Installation Instructions",
"body": "### Step 1\nConnect the primary WAN interface."
}
'import requests
url = "https://v1.api.altostrat.io/metadata/{siteId}/notes"
payload = {
"name": "Installation Instructions",
"body": "### Step 1
Connect the primary WAN interface."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Installation Instructions',
body: JSON.stringify('### Step 1\nConnect the primary WAN interface.')
})
};
fetch('https://v1.api.altostrat.io/metadata/{siteId}/notes', 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://v1.api.altostrat.io/metadata/{siteId}/notes",
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' => 'Installation Instructions',
'body' => '### Step 1
Connect the primary WAN interface.'
]),
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://v1.api.altostrat.io/metadata/{siteId}/notes"
payload := strings.NewReader("{\n \"name\": \"Installation Instructions\",\n \"body\": \"### Step 1\\nConnect the primary WAN interface.\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://v1.api.altostrat.io/metadata/{siteId}/notes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Installation Instructions\",\n \"body\": \"### Step 1\\nConnect the primary WAN interface.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.api.altostrat.io/metadata/{siteId}/notes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Installation Instructions\",\n \"body\": \"### Step 1\\nConnect the primary WAN interface.\"\n}"
response = http.request(request)
puts response.read_body{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}Site Files
Create a site note
Creates a new markdown note and attaches it to the specified site.
POST
/
metadata
/
{siteId}
/
notes
Create a site note
curl --request POST \
--url https://v1.api.altostrat.io/metadata/{siteId}/notes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Installation Instructions",
"body": "### Step 1\nConnect the primary WAN interface."
}
'import requests
url = "https://v1.api.altostrat.io/metadata/{siteId}/notes"
payload = {
"name": "Installation Instructions",
"body": "### Step 1
Connect the primary WAN interface."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Installation Instructions',
body: JSON.stringify('### Step 1\nConnect the primary WAN interface.')
})
};
fetch('https://v1.api.altostrat.io/metadata/{siteId}/notes', 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://v1.api.altostrat.io/metadata/{siteId}/notes",
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' => 'Installation Instructions',
'body' => '### Step 1
Connect the primary WAN interface.'
]),
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://v1.api.altostrat.io/metadata/{siteId}/notes"
payload := strings.NewReader("{\n \"name\": \"Installation Instructions\",\n \"body\": \"### Step 1\\nConnect the primary WAN interface.\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://v1.api.altostrat.io/metadata/{siteId}/notes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Installation Instructions\",\n \"body\": \"### Step 1\\nConnect the primary WAN interface.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.api.altostrat.io/metadata/{siteId}/notes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Installation Instructions\",\n \"body\": \"### Step 1\\nConnect the primary WAN interface.\"\n}"
response = http.request(request)
puts response.read_body{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}Authorizations
A bearer token is required for all API requests.
Path Parameters
The unique identifier for the site.
Body
application/json
The content of the note.
Response
The note was created successfully.
Was this page helpful?
⌘I