Create folder
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', parentId: '<string>'})
};
fetch('https://api.example.com/v1/regions/global/organizations/folders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/regions/global/organizations/folders"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"parentId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}curl --request POST \
--url https://api.example.com/v1/regions/global/organizations/folders \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"parentId": "<string>"
}
'import requests
url = "https://api.example.com/v1/regions/global/organizations/folders"
payload = {
"name": "<string>",
"parentId": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"name": "<string>",
"organizationId": "<string>",
"parentId": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
}Folders
Create folder
Create a new folder for organizing projects. Note: Folder hierarchy structure is TBD.
POST
/
v1
/
regions
/
global
/
organizations
/
folders
Create folder
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', parentId: '<string>'})
};
fetch('https://api.example.com/v1/regions/global/organizations/folders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/regions/global/organizations/folders"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"parentId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}curl --request POST \
--url https://api.example.com/v1/regions/global/organizations/folders \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"parentId": "<string>"
}
'import requests
url = "https://api.example.com/v1/regions/global/organizations/folders"
payload = {
"name": "<string>",
"parentId": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"name": "<string>",
"organizationId": "<string>",
"parentId": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
}Was this page helpful?