Python (SDK)
import latitudesh_python_sdk
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.tags.update(tag_id="tag_XBlke2r5RyiyVpG9LPK8tWjalLL", data={
"id": "tag_XBlke2r5RyiyVpG9LPK8tWjalLL",
"type": latitudesh_python_sdk.UpdateTagTagsType.TAGS,
"attributes": {
"name": "Tag Name",
},
})
# Handle response
print(res)package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"github.com/latitudesh/latitudesh-go-sdk/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.Tags.Update(ctx, "tag_XBlke2r5RyiyVpG9LPK8tWjalLL", operations.UpdateTagTagsRequestBody{
Data: &operations.UpdateTagTagsData{
ID: latitudeshgosdk.Pointer("tag_XBlke2r5RyiyVpG9LPK8tWjalLL"),
Type: operations.UpdateTagTagsTypeTags.ToPointer(),
Attributes: &operations.UpdateTagTagsAttributes{
Name: latitudeshgosdk.Pointer("Tag Name"),
},
},
})
if err != nil {
log.Fatal(err)
}
if res.CustomTag != nil {
// handle response
}
}import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.tags.update({
tagId: "tag_XBlke2r5RyiyVpG9LPK8tWjalLL",
requestBody: {
data: {
id: "tag_XBlke2r5RyiyVpG9LPK8tWjalLL",
type: "tags",
attributes: {
name: "Tag Name",
},
},
},
});
console.log(result);
}
run();curl --request PATCH \
--url https://api.latitude.sh/tags/{tag_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"id": "tag_XBlke2r5RyiyVpG9LPK8tWjalLL",
"type": "tags",
"attributes": {
"name": "Tag Name"
}
}
}
'const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
id: 'tag_XBlke2r5RyiyVpG9LPK8tWjalLL',
type: 'tags',
attributes: {name: 'Tag Name'}
}
})
};
fetch('https://api.latitude.sh/tags/{tag_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://api.latitude.sh/tags/{tag_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'id' => 'tag_XBlke2r5RyiyVpG9LPK8tWjalLL',
'type' => 'tags',
'attributes' => [
'name' => 'Tag Name'
]
]
]),
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;
}HttpResponse<String> response = Unirest.patch("https://api.latitude.sh/tags/{tag_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"id\": \"tag_XBlke2r5RyiyVpG9LPK8tWjalLL\",\n \"type\": \"tags\",\n \"attributes\": {\n \"name\": \"Tag Name\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.latitude.sh/tags/{tag_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"id\": \"tag_XBlke2r5RyiyVpG9LPK8tWjalLL\",\n \"type\": \"tags\",\n \"attributes\": {\n \"name\": \"Tag Name\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "tag_XBlke2r5RyiyVpG9LPK8tWjalLL",
"type": "tags",
"attributes": {
"name": "Tag Name",
"slug": "tag-name",
"description": "Aliquam ducimus atque et.",
"color": "#73ba73",
"team": {
"id": "team_GplL3jvZnNS2BXLAmWQpf8z354ll",
"name": "633 Team",
"slug": "633-team",
"description": "633 Team",
"address": "2092 Loreta Summit, West Hershelmouth, WY 97161-6201",
"status": "verified",
"currency": {
"id": "cur_AW6Q2D9lqKLpr",
"code": "BRL",
"name": "Brazilian Real",
"currency_id": null
}
}
}
}
}Tags
Update tag
Update a Tag in the team.
PATCH
/
tags
/
{tag_id}
Python (SDK)
import latitudesh_python_sdk
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.tags.update(tag_id="tag_XBlke2r5RyiyVpG9LPK8tWjalLL", data={
"id": "tag_XBlke2r5RyiyVpG9LPK8tWjalLL",
"type": latitudesh_python_sdk.UpdateTagTagsType.TAGS,
"attributes": {
"name": "Tag Name",
},
})
# Handle response
print(res)package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"github.com/latitudesh/latitudesh-go-sdk/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.Tags.Update(ctx, "tag_XBlke2r5RyiyVpG9LPK8tWjalLL", operations.UpdateTagTagsRequestBody{
Data: &operations.UpdateTagTagsData{
ID: latitudeshgosdk.Pointer("tag_XBlke2r5RyiyVpG9LPK8tWjalLL"),
Type: operations.UpdateTagTagsTypeTags.ToPointer(),
Attributes: &operations.UpdateTagTagsAttributes{
Name: latitudeshgosdk.Pointer("Tag Name"),
},
},
})
if err != nil {
log.Fatal(err)
}
if res.CustomTag != nil {
// handle response
}
}import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.tags.update({
tagId: "tag_XBlke2r5RyiyVpG9LPK8tWjalLL",
requestBody: {
data: {
id: "tag_XBlke2r5RyiyVpG9LPK8tWjalLL",
type: "tags",
attributes: {
name: "Tag Name",
},
},
},
});
console.log(result);
}
run();curl --request PATCH \
--url https://api.latitude.sh/tags/{tag_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"id": "tag_XBlke2r5RyiyVpG9LPK8tWjalLL",
"type": "tags",
"attributes": {
"name": "Tag Name"
}
}
}
'const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
id: 'tag_XBlke2r5RyiyVpG9LPK8tWjalLL',
type: 'tags',
attributes: {name: 'Tag Name'}
}
})
};
fetch('https://api.latitude.sh/tags/{tag_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://api.latitude.sh/tags/{tag_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'id' => 'tag_XBlke2r5RyiyVpG9LPK8tWjalLL',
'type' => 'tags',
'attributes' => [
'name' => 'Tag Name'
]
]
]),
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;
}HttpResponse<String> response = Unirest.patch("https://api.latitude.sh/tags/{tag_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"id\": \"tag_XBlke2r5RyiyVpG9LPK8tWjalLL\",\n \"type\": \"tags\",\n \"attributes\": {\n \"name\": \"Tag Name\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.latitude.sh/tags/{tag_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"id\": \"tag_XBlke2r5RyiyVpG9LPK8tWjalLL\",\n \"type\": \"tags\",\n \"attributes\": {\n \"name\": \"Tag Name\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "tag_XBlke2r5RyiyVpG9LPK8tWjalLL",
"type": "tags",
"attributes": {
"name": "Tag Name",
"slug": "tag-name",
"description": "Aliquam ducimus atque et.",
"color": "#73ba73",
"team": {
"id": "team_GplL3jvZnNS2BXLAmWQpf8z354ll",
"name": "633 Team",
"slug": "633-team",
"description": "633 Team",
"address": "2092 Loreta Summit, West Hershelmouth, WY 97161-6201",
"status": "verified",
"currency": {
"id": "cur_AW6Q2D9lqKLpr",
"code": "BRL",
"name": "Brazilian Real",
"currency_id": null
}
}
}
}
}Was this page helpful?
⌘I