Update dataset item
curl --request PUT \
--url https://app.azalt.co/api/v1/dataset-items/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"data": {},
"year": 123,
"description": "<string>",
"link": "<string>",
"metadata": {},
"tags": [
"<string>"
],
"inputUnitId": "<string>"
}
'import requests
url = "https://app.azalt.co/api/v1/dataset-items/{id}"
payload = {
"name": "<string>",
"data": {},
"year": 123,
"description": "<string>",
"link": "<string>",
"metadata": {},
"tags": ["<string>"],
"inputUnitId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
data: {},
year: 123,
description: '<string>',
link: '<string>',
metadata: {},
tags: ['<string>'],
inputUnitId: '<string>'
})
};
fetch('https://app.azalt.co/api/v1/dataset-items/{id}', 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.azalt.co/api/v1/dataset-items/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'data' => [
],
'year' => 123,
'description' => '<string>',
'link' => '<string>',
'metadata' => [
],
'tags' => [
'<string>'
],
'inputUnitId' => '<string>'
]),
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://app.azalt.co/api/v1/dataset-items/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"data\": {},\n \"year\": 123,\n \"description\": \"<string>\",\n \"link\": \"<string>\",\n \"metadata\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"inputUnitId\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.azalt.co/api/v1/dataset-items/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"data\": {},\n \"year\": 123,\n \"description\": \"<string>\",\n \"link\": \"<string>\",\n \"metadata\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"inputUnitId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.azalt.co/api/v1/dataset-items/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"data\": {},\n \"year\": 123,\n \"description\": \"<string>\",\n \"link\": \"<string>\",\n \"metadata\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"inputUnitId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"link": "<string>",
"year": 123,
"tags": [
"<string>"
],
"data": "<unknown>",
"metadata": "<unknown>",
"inputUnitId": "<string>"
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}DatasetItem
Update dataset item
Update an existing coefficient value in a dataset. Requires owner permissions.
What you can update:
label: Human-readable namekey: Unique identifier (must stay unique)value: The coefficient numberunit: Measurement unitmetadata: Extra details and categorization
⚠️ Important warnings:
- Changing the
keymay break calculations that use this coefficient - Updating
valueaffects all future calculations with this coefficient - Changes to metadata are safe and don’t affect calculations
Best practices:
- Test your calculations after changing coefficient values
- Consider creating new dataset versions for major changes
- Document why you made changes in the metadata
- Check if historical reports need to be recalculated
PUT
/
dataset-items
/
{id}
Update dataset item
curl --request PUT \
--url https://app.azalt.co/api/v1/dataset-items/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"data": {},
"year": 123,
"description": "<string>",
"link": "<string>",
"metadata": {},
"tags": [
"<string>"
],
"inputUnitId": "<string>"
}
'import requests
url = "https://app.azalt.co/api/v1/dataset-items/{id}"
payload = {
"name": "<string>",
"data": {},
"year": 123,
"description": "<string>",
"link": "<string>",
"metadata": {},
"tags": ["<string>"],
"inputUnitId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
data: {},
year: 123,
description: '<string>',
link: '<string>',
metadata: {},
tags: ['<string>'],
inputUnitId: '<string>'
})
};
fetch('https://app.azalt.co/api/v1/dataset-items/{id}', 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.azalt.co/api/v1/dataset-items/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'data' => [
],
'year' => 123,
'description' => '<string>',
'link' => '<string>',
'metadata' => [
],
'tags' => [
'<string>'
],
'inputUnitId' => '<string>'
]),
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://app.azalt.co/api/v1/dataset-items/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"data\": {},\n \"year\": 123,\n \"description\": \"<string>\",\n \"link\": \"<string>\",\n \"metadata\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"inputUnitId\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.azalt.co/api/v1/dataset-items/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"data\": {},\n \"year\": 123,\n \"description\": \"<string>\",\n \"link\": \"<string>\",\n \"metadata\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"inputUnitId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.azalt.co/api/v1/dataset-items/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"data\": {},\n \"year\": 123,\n \"description\": \"<string>\",\n \"link\": \"<string>\",\n \"metadata\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"inputUnitId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"link": "<string>",
"year": 123,
"tags": [
"<string>"
],
"data": "<unknown>",
"metadata": "<unknown>",
"inputUnitId": "<string>"
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
⌘I

