Projects
Create a project's configuration
Creates a nexus config for a project. Idempotent - returns 200 if config already exists. Requires the write:project token scope.
POST
/
projects
/
{project_id}
/
nexus_config
Create nexus config
curl --request POST \
--url https://app.gomangrove.com/api/v1/projects/{project_id}/nexus_config \
--header 'Authorization: <api-key>'import requests
url = "https://app.gomangrove.com/api/v1/projects/{project_id}/nexus_config"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://app.gomangrove.com/api/v1/projects/{project_id}/nexus_config', 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://app.gomangrove.com/api/v1/projects/{project_id}/nexus_config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.gomangrove.com/api/v1/projects/{project_id}/nexus_config"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.gomangrove.com/api/v1/projects/{project_id}/nexus_config")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gomangrove.com/api/v1/projects/{project_id}/nexus_config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 1,
"project_id": "prj_aBcD1234eFgH5678",
"event_type_count": 3,
"data_point_type_count": 15,
"ledger_count": 2,
"created_at": "2025-01-15T10:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z",
"ui_url": "https://app.gomangrove.com/nexus/prj_aBcD1234eFgH5678"
}{
"id": 1,
"project_id": "prj_aBcD1234eFgH5678",
"event_type_count": 0,
"data_point_type_count": 0,
"ledger_count": 0,
"created_at": "2025-01-15T10:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z",
"ui_url": "https://app.gomangrove.com/nexus/prj_aBcD1234eFgH5678"
}{
"errors": [
{
"message": "API token has expired"
}
]
}{
"errors": [
{
"message": "You are not authorized to perform this action"
}
]
}{
"errors": [
{
"message": "Record not found"
}
]
}{
"errors": [
{
"message": "Project already has a Nexus config",
"field": "project_id",
"code": "taken"
}
]
}Authorizations
Path Parameters
The project's friendly ID (e.g. prj_aBcD1234eFgH5678).
Response
The project already has a nexus config, which is returned unchanged.
The project's friendly ID (e.g. prj_aBcD1234eFgH5678).
Example:
"prj_aBcD1234eFgH5678"
Link that opens this project in the Mangrove app. The nexus config has no page of its own.
Example:
"https://app.gomangrove.com/nexus/prj_aBcD1234eFgH5678"
⌘I
Create nexus config
curl --request POST \
--url https://app.gomangrove.com/api/v1/projects/{project_id}/nexus_config \
--header 'Authorization: <api-key>'import requests
url = "https://app.gomangrove.com/api/v1/projects/{project_id}/nexus_config"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://app.gomangrove.com/api/v1/projects/{project_id}/nexus_config', 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://app.gomangrove.com/api/v1/projects/{project_id}/nexus_config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.gomangrove.com/api/v1/projects/{project_id}/nexus_config"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.gomangrove.com/api/v1/projects/{project_id}/nexus_config")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gomangrove.com/api/v1/projects/{project_id}/nexus_config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 1,
"project_id": "prj_aBcD1234eFgH5678",
"event_type_count": 3,
"data_point_type_count": 15,
"ledger_count": 2,
"created_at": "2025-01-15T10:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z",
"ui_url": "https://app.gomangrove.com/nexus/prj_aBcD1234eFgH5678"
}{
"id": 1,
"project_id": "prj_aBcD1234eFgH5678",
"event_type_count": 0,
"data_point_type_count": 0,
"ledger_count": 0,
"created_at": "2025-01-15T10:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z",
"ui_url": "https://app.gomangrove.com/nexus/prj_aBcD1234eFgH5678"
}{
"errors": [
{
"message": "API token has expired"
}
]
}{
"errors": [
{
"message": "You are not authorized to perform this action"
}
]
}{
"errors": [
{
"message": "Record not found"
}
]
}{
"errors": [
{
"message": "Project already has a Nexus config",
"field": "project_id",
"code": "taken"
}
]
}