Projects
Rename Project Data Definition Tag
Rename one of the project’s data definition tags. Definitions carrying the tag keep it.
PATCH
/
v1
/
projects
/
{project_id}
/
data-definition-tags
/
{tag_id}
Rename Project Data Definition Tag
curl --request PATCH \
--url https://platform-us.mixpanel.com/v1/projects/{project_id}/data-definition-tags/{tag_id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'import requests
url = "https://platform-us.mixpanel.com/v1/projects/{project_id}/data-definition-tags/{tag_id}"
payload = { "name": "<string>" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://platform-us.mixpanel.com/v1/projects/{project_id}/data-definition-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://platform-us.mixpanel.com/v1/projects/{project_id}/data-definition-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([
'name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://platform-us.mixpanel.com/v1/projects/{project_id}/data-definition-tags/{tag_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.patch("https://platform-us.mixpanel.com/v1/projects/{project_id}/data-definition-tags/{tag_id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform-us.mixpanel.com/v1/projects/{project_id}/data-definition-tags/{tag_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"entity_count": 123
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"instance": "<string>",
"detail": "<string>",
"error_id": "<string>",
"errors": [
{
"type": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"ctx": {}
}
]
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"instance": "<string>",
"detail": "<string>",
"error_id": "<string>"
}Closed Beta
Available to a limited set of invited customers. Contact your account team to join. The request and response contract may change before general availability (GA).
Available to a limited set of invited customers. Contact your account team to join. The request and response contract may change before general availability (GA).
Permissions
The permissions required to access this endpoint. See Permissions Reference for what each role grants.
Required Permissions: write_data_definitions
Granted By Role: Owner Admin
Authorizations
This endpoint uses Service Account authentication.
Headers
Optional date-based API version pin.
If omitted, the request is served by the latest API version, and the caller accepts that a future release may introduce a breaking change to the response contract. If set to a supported version date, that version's contract is honored and will not receive a breaking change.
Body
application/json
The tag's new name. Unique within the project.
Required string length:
1 - 175Was this page helpful?
Rename Project Data Definition Tag
curl --request PATCH \
--url https://platform-us.mixpanel.com/v1/projects/{project_id}/data-definition-tags/{tag_id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'import requests
url = "https://platform-us.mixpanel.com/v1/projects/{project_id}/data-definition-tags/{tag_id}"
payload = { "name": "<string>" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://platform-us.mixpanel.com/v1/projects/{project_id}/data-definition-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://platform-us.mixpanel.com/v1/projects/{project_id}/data-definition-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([
'name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://platform-us.mixpanel.com/v1/projects/{project_id}/data-definition-tags/{tag_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.patch("https://platform-us.mixpanel.com/v1/projects/{project_id}/data-definition-tags/{tag_id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform-us.mixpanel.com/v1/projects/{project_id}/data-definition-tags/{tag_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"entity_count": 123
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"instance": "<string>",
"detail": "<string>",
"error_id": "<string>",
"errors": [
{
"type": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"ctx": {}
}
]
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"instance": "<string>",
"detail": "<string>",
"error_id": "<string>"
}