Add/modify a project
curl --request POST \
--url https://api.altera.co/company/projects \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"tagId": 1,
"name": "Marketing",
"enabled": false,
"color": 4286963618
}
'import requests
url = "https://api.altera.co/company/projects"
payload = {
"tagId": 1,
"name": "Marketing",
"enabled": False,
"color": 4286963618
}
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({tagId: 1, name: 'Marketing', enabled: false, color: 4286963618})
};
fetch('https://api.altera.co/company/projects', 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.altera.co/company/projects",
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([
'tagId' => 1,
'name' => 'Marketing',
'enabled' => false,
'color' => 4286963618
]),
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.altera.co/company/projects"
payload := strings.NewReader("{\n \"tagId\": 1,\n \"name\": \"Marketing\",\n \"enabled\": false,\n \"color\": 4286963618\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.altera.co/company/projects")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tagId\": 1,\n \"name\": \"Marketing\",\n \"enabled\": false,\n \"color\": 4286963618\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.altera.co/company/projects")
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 \"tagId\": 1,\n \"name\": \"Marketing\",\n \"enabled\": false,\n \"color\": 4286963618\n}"
response = http.request(request)
puts response.read_body{
"result": "OK",
"data": [
{
"tagId": 1,
"name": "Marketing",
"color": 4286963618,
"enabled": false
},
{
"tagId": 2,
"name": "IT",
"color": 4294933887,
"enabled": false
},
{
"tagId": 3,
"name": "new",
"color": 4281667055,
"enabled": true
},
{
"tagId": 4,
"name": "new 2",
"color": 4281667055,
"enabled": true
},
{
"tagId": 5,
"name": "new3",
"color": 4284816155,
"enabled": true
},
{
"tagId": 9,
"name": "Testttt",
"color": 4281954268,
"enabled": true
},
{
"tagId": 10,
"name": "Nowy test",
"color": 4278430196,
"enabled": true
},
{
"tagId": 11,
"name": "Test 2",
"color": 4288423856,
"enabled": true
},
{
"tagId": 12,
"name": "Haha test 3",
"color": 4288423856,
"enabled": true
},
{
"tagId": 23,
"name": "Analfabeta",
"color": 4293467747,
"enabled": true
},
{
"tagId": 26,
"name": "Test odświeżania",
"color": 4280391411,
"enabled": true
},
{
"tagId": 27,
"name": "Test odświeżania 2",
"color": 4284513675,
"enabled": true
},
{
"tagId": 28,
"name": "Test odświeżania 3",
"color": 4280391411,
"enabled": true
},
{
"tagId": 161,
"name": "Bardzo długa nazwa projektu",
"color": 4294961979,
"enabled": true
}
]
}Configuration
Add/modify a project
POST
/
company
/
projects
Add/modify a project
curl --request POST \
--url https://api.altera.co/company/projects \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"tagId": 1,
"name": "Marketing",
"enabled": false,
"color": 4286963618
}
'import requests
url = "https://api.altera.co/company/projects"
payload = {
"tagId": 1,
"name": "Marketing",
"enabled": False,
"color": 4286963618
}
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({tagId: 1, name: 'Marketing', enabled: false, color: 4286963618})
};
fetch('https://api.altera.co/company/projects', 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.altera.co/company/projects",
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([
'tagId' => 1,
'name' => 'Marketing',
'enabled' => false,
'color' => 4286963618
]),
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.altera.co/company/projects"
payload := strings.NewReader("{\n \"tagId\": 1,\n \"name\": \"Marketing\",\n \"enabled\": false,\n \"color\": 4286963618\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.altera.co/company/projects")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tagId\": 1,\n \"name\": \"Marketing\",\n \"enabled\": false,\n \"color\": 4286963618\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.altera.co/company/projects")
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 \"tagId\": 1,\n \"name\": \"Marketing\",\n \"enabled\": false,\n \"color\": 4286963618\n}"
response = http.request(request)
puts response.read_body{
"result": "OK",
"data": [
{
"tagId": 1,
"name": "Marketing",
"color": 4286963618,
"enabled": false
},
{
"tagId": 2,
"name": "IT",
"color": 4294933887,
"enabled": false
},
{
"tagId": 3,
"name": "new",
"color": 4281667055,
"enabled": true
},
{
"tagId": 4,
"name": "new 2",
"color": 4281667055,
"enabled": true
},
{
"tagId": 5,
"name": "new3",
"color": 4284816155,
"enabled": true
},
{
"tagId": 9,
"name": "Testttt",
"color": 4281954268,
"enabled": true
},
{
"tagId": 10,
"name": "Nowy test",
"color": 4278430196,
"enabled": true
},
{
"tagId": 11,
"name": "Test 2",
"color": 4288423856,
"enabled": true
},
{
"tagId": 12,
"name": "Haha test 3",
"color": 4288423856,
"enabled": true
},
{
"tagId": 23,
"name": "Analfabeta",
"color": 4293467747,
"enabled": true
},
{
"tagId": 26,
"name": "Test odświeżania",
"color": 4280391411,
"enabled": true
},
{
"tagId": 27,
"name": "Test odświeżania 2",
"color": 4284513675,
"enabled": true
},
{
"tagId": 28,
"name": "Test odświeżania 3",
"color": 4280391411,
"enabled": true
},
{
"tagId": 161,
"name": "Bardzo długa nazwa projektu",
"color": 4294961979,
"enabled": true
}
]
}Was this page helpful?
⌘I

