curl --request PUT \
--url https://api.usedatabrain.com/api/v2/data-app \
--header 'Authorization: Bearer service_token_xyz...' \
--header 'Content-Type: application/json' \
--data '{
"name": "Customer Analytics",
"updateName": "Updated Customer Analytics"
}'
const response = await fetch('https://api.usedatabrain.com/api/v2/data-app', {
method: 'PUT',
headers: {
'Authorization': 'Bearer service_token_xyz...',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Customer Analytics',
updateName: 'Updated Customer Analytics'
})
});
const data = await response.json();
console.log('Updated Data App:', data.name);
import requests
url = "https://api.usedatabrain.com/api/v2/data-app"
headers = {
"Authorization": "Bearer service_token_xyz...",
"Content-Type": "application/json"
}
payload = {
"name": "Customer Analytics",
"updateName": "Updated Customer Analytics"
}
response = requests.put(url, headers=headers, json=payload)
data = response.json()
print(f"Updated Data App: {data['name']}")
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
public class UpdateDataApp {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
String requestBody = """
{
"name": "Customer Analytics",
"updateName": "Updated Customer Analytics"
}""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.usedatabrain.com/api/v2/data-app"))
.header("Authorization", "Bearer service_token_xyz...")
.header("Content-Type", "application/json")
.PUT(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println("Response: " + response.body());
}
}
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
type UpdateDataAppRequest struct {
Name string `json:"name"`
UpdateName string `json:"updateName"`
}
type UpdateDataAppResponse struct {
Name string `json:"name"`
Error interface{} `json:"error"`
}
func main() {
requestBody := UpdateDataAppRequest{
Name: "Customer Analytics",
UpdateName: "Updated Customer Analytics",
}
jsonData, _ := json.Marshal(requestBody)
req, _ := http.NewRequest("PUT", "https://api.usedatabrain.com/api/v2/data-app", bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer service_token_xyz...")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
var result UpdateDataAppResponse
json.NewDecoder(resp.Body).Decode(&result)
fmt.Printf("Updated Data App: %s\n", result.Name)
}
<?php
$curl = curl_init();
$data = [
'name' => 'Customer Analytics',
'updateName' => 'Updated Customer Analytics'
];
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.usedatabrain.com/api/v2/data-app',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => json_encode($data),
CURLOPT_HTTPHEADER => [
'Authorization: Bearer service_token_xyz...',
'Content-Type: application/json'
],
]);
$response = curl_exec($curl);
curl_close($curl);
$result = json_decode($response, true);
echo 'Updated Data App: ' . $result['name'];
?>
require 'net/http'
require 'json'
uri = URI('https://api.usedatabrain.com/api/v2/data-app')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Put.new(uri)
request['Authorization'] = 'Bearer service_token_xyz...'
request['Content-Type'] = 'application/json'
request.body = {
name: 'Customer Analytics',
updateName: 'Updated Customer Analytics'
}.to_json
response = http.request(request)
result = JSON.parse(response.body)
puts "Updated Data App: #{result['name']}"
{
"name": "Updated Customer Analytics"
}
{
"error": {
"code": "INVALID_REQUEST_BODY",
"message": "\"updateName\" is required"
}
}
{
"error": {
"code": "DATA_APP_NOT_FOUND",
"message": "Data app not found"
}
}
{
"error": {
"code": "AUTHENTICATION_ERROR",
"message": "Invalid Service Token"
}
}
{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "INTERNAL_SERVER_ERROR"
}
}
curl --request PUT \
--url https://api.usedatabrain.com/api/v2/data-app \
--header 'Authorization: Bearer service_token_xyz...' \
--header 'Content-Type: application/json' \
--data '{
"name": "Customer Analytics",
"updateName": "Updated Customer Analytics"
}'
const response = await fetch('https://api.usedatabrain.com/api/v2/data-app', {
method: 'PUT',
headers: {
'Authorization': 'Bearer service_token_xyz...',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Customer Analytics',
updateName: 'Updated Customer Analytics'
})
});
const data = await response.json();
console.log('Updated Data App:', data.name);
import requests
url = "https://api.usedatabrain.com/api/v2/data-app"
headers = {
"Authorization": "Bearer service_token_xyz...",
"Content-Type": "application/json"
}
payload = {
"name": "Customer Analytics",
"updateName": "Updated Customer Analytics"
}
response = requests.put(url, headers=headers, json=payload)
data = response.json()
print(f"Updated Data App: {data['name']}")
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
public class UpdateDataApp {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
String requestBody = """
{
"name": "Customer Analytics",
"updateName": "Updated Customer Analytics"
}""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.usedatabrain.com/api/v2/data-app"))
.header("Authorization", "Bearer service_token_xyz...")
.header("Content-Type", "application/json")
.PUT(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println("Response: " + response.body());
}
}
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
type UpdateDataAppRequest struct {
Name string `json:"name"`
UpdateName string `json:"updateName"`
}
type UpdateDataAppResponse struct {
Name string `json:"name"`
Error interface{} `json:"error"`
}
func main() {
requestBody := UpdateDataAppRequest{
Name: "Customer Analytics",
UpdateName: "Updated Customer Analytics",
}
jsonData, _ := json.Marshal(requestBody)
req, _ := http.NewRequest("PUT", "https://api.usedatabrain.com/api/v2/data-app", bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer service_token_xyz...")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
var result UpdateDataAppResponse
json.NewDecoder(resp.Body).Decode(&result)
fmt.Printf("Updated Data App: %s\n", result.Name)
}
<?php
$curl = curl_init();
$data = [
'name' => 'Customer Analytics',
'updateName' => 'Updated Customer Analytics'
];
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.usedatabrain.com/api/v2/data-app',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => json_encode($data),
CURLOPT_HTTPHEADER => [
'Authorization: Bearer service_token_xyz...',
'Content-Type: application/json'
],
]);
$response = curl_exec($curl);
curl_close($curl);
$result = json_decode($response, true);
echo 'Updated Data App: ' . $result['name'];
?>
require 'net/http'
require 'json'
uri = URI('https://api.usedatabrain.com/api/v2/data-app')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Put.new(uri)
request['Authorization'] = 'Bearer service_token_xyz...'
request['Content-Type'] = 'application/json'
request.body = {
name: 'Customer Analytics',
updateName: 'Updated Customer Analytics'
}.to_json
response = http.request(request)
result = JSON.parse(response.body)
puts "Updated Data App: #{result['name']}"
{
"name": "Updated Customer Analytics"
}
{
"error": {
"code": "INVALID_REQUEST_BODY",
"message": "\"updateName\" is required"
}
}
{
"error": {
"code": "DATA_APP_NOT_FOUND",
"message": "Data app not found"
}
}
{
"error": {
"code": "AUTHENTICATION_ERROR",
"message": "Invalid Service Token"
}
}
{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "INTERNAL_SERVER_ERROR"
}
}
Data App CRUD
Update Data App
Update the name and settings of an existing Data App.
curl --request PUT \
--url https://api.usedatabrain.com/api/v2/data-app \
--header 'Authorization: Bearer service_token_xyz...' \
--header 'Content-Type: application/json' \
--data '{
"name": "Customer Analytics",
"updateName": "Updated Customer Analytics"
}'
const response = await fetch('https://api.usedatabrain.com/api/v2/data-app', {
method: 'PUT',
headers: {
'Authorization': 'Bearer service_token_xyz...',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Customer Analytics',
updateName: 'Updated Customer Analytics'
})
});
const data = await response.json();
console.log('Updated Data App:', data.name);
import requests
url = "https://api.usedatabrain.com/api/v2/data-app"
headers = {
"Authorization": "Bearer service_token_xyz...",
"Content-Type": "application/json"
}
payload = {
"name": "Customer Analytics",
"updateName": "Updated Customer Analytics"
}
response = requests.put(url, headers=headers, json=payload)
data = response.json()
print(f"Updated Data App: {data['name']}")
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
public class UpdateDataApp {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
String requestBody = """
{
"name": "Customer Analytics",
"updateName": "Updated Customer Analytics"
}""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.usedatabrain.com/api/v2/data-app"))
.header("Authorization", "Bearer service_token_xyz...")
.header("Content-Type", "application/json")
.PUT(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println("Response: " + response.body());
}
}
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
type UpdateDataAppRequest struct {
Name string `json:"name"`
UpdateName string `json:"updateName"`
}
type UpdateDataAppResponse struct {
Name string `json:"name"`
Error interface{} `json:"error"`
}
func main() {
requestBody := UpdateDataAppRequest{
Name: "Customer Analytics",
UpdateName: "Updated Customer Analytics",
}
jsonData, _ := json.Marshal(requestBody)
req, _ := http.NewRequest("PUT", "https://api.usedatabrain.com/api/v2/data-app", bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer service_token_xyz...")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
var result UpdateDataAppResponse
json.NewDecoder(resp.Body).Decode(&result)
fmt.Printf("Updated Data App: %s\n", result.Name)
}
<?php
$curl = curl_init();
$data = [
'name' => 'Customer Analytics',
'updateName' => 'Updated Customer Analytics'
];
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.usedatabrain.com/api/v2/data-app',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => json_encode($data),
CURLOPT_HTTPHEADER => [
'Authorization: Bearer service_token_xyz...',
'Content-Type: application/json'
],
]);
$response = curl_exec($curl);
curl_close($curl);
$result = json_decode($response, true);
echo 'Updated Data App: ' . $result['name'];
?>
require 'net/http'
require 'json'
uri = URI('https://api.usedatabrain.com/api/v2/data-app')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Put.new(uri)
request['Authorization'] = 'Bearer service_token_xyz...'
request['Content-Type'] = 'application/json'
request.body = {
name: 'Customer Analytics',
updateName: 'Updated Customer Analytics'
}.to_json
response = http.request(request)
result = JSON.parse(response.body)
puts "Updated Data App: #{result['name']}"
{
"name": "Updated Customer Analytics"
}
{
"error": {
"code": "INVALID_REQUEST_BODY",
"message": "\"updateName\" is required"
}
}
{
"error": {
"code": "DATA_APP_NOT_FOUND",
"message": "Data app not found"
}
}
{
"error": {
"code": "AUTHENTICATION_ERROR",
"message": "Invalid Service Token"
}
}
{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "INTERNAL_SERVER_ERROR"
}
}
PUT
/
api
/
v2
/
data-app
curl --request PUT \
--url https://api.usedatabrain.com/api/v2/data-app \
--header 'Authorization: Bearer service_token_xyz...' \
--header 'Content-Type: application/json' \
--data '{
"name": "Customer Analytics",
"updateName": "Updated Customer Analytics"
}'
const response = await fetch('https://api.usedatabrain.com/api/v2/data-app', {
method: 'PUT',
headers: {
'Authorization': 'Bearer service_token_xyz...',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Customer Analytics',
updateName: 'Updated Customer Analytics'
})
});
const data = await response.json();
console.log('Updated Data App:', data.name);
import requests
url = "https://api.usedatabrain.com/api/v2/data-app"
headers = {
"Authorization": "Bearer service_token_xyz...",
"Content-Type": "application/json"
}
payload = {
"name": "Customer Analytics",
"updateName": "Updated Customer Analytics"
}
response = requests.put(url, headers=headers, json=payload)
data = response.json()
print(f"Updated Data App: {data['name']}")
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
public class UpdateDataApp {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
String requestBody = """
{
"name": "Customer Analytics",
"updateName": "Updated Customer Analytics"
}""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.usedatabrain.com/api/v2/data-app"))
.header("Authorization", "Bearer service_token_xyz...")
.header("Content-Type", "application/json")
.PUT(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println("Response: " + response.body());
}
}
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
type UpdateDataAppRequest struct {
Name string `json:"name"`
UpdateName string `json:"updateName"`
}
type UpdateDataAppResponse struct {
Name string `json:"name"`
Error interface{} `json:"error"`
}
func main() {
requestBody := UpdateDataAppRequest{
Name: "Customer Analytics",
UpdateName: "Updated Customer Analytics",
}
jsonData, _ := json.Marshal(requestBody)
req, _ := http.NewRequest("PUT", "https://api.usedatabrain.com/api/v2/data-app", bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer service_token_xyz...")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
var result UpdateDataAppResponse
json.NewDecoder(resp.Body).Decode(&result)
fmt.Printf("Updated Data App: %s\n", result.Name)
}
<?php
$curl = curl_init();
$data = [
'name' => 'Customer Analytics',
'updateName' => 'Updated Customer Analytics'
];
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.usedatabrain.com/api/v2/data-app',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => json_encode($data),
CURLOPT_HTTPHEADER => [
'Authorization: Bearer service_token_xyz...',
'Content-Type: application/json'
],
]);
$response = curl_exec($curl);
curl_close($curl);
$result = json_decode($response, true);
echo 'Updated Data App: ' . $result['name'];
?>
require 'net/http'
require 'json'
uri = URI('https://api.usedatabrain.com/api/v2/data-app')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Put.new(uri)
request['Authorization'] = 'Bearer service_token_xyz...'
request['Content-Type'] = 'application/json'
request.body = {
name: 'Customer Analytics',
updateName: 'Updated Customer Analytics'
}.to_json
response = http.request(request)
result = JSON.parse(response.body)
puts "Updated Data App: #{result['name']}"
{
"name": "Updated Customer Analytics"
}
{
"error": {
"code": "INVALID_REQUEST_BODY",
"message": "\"updateName\" is required"
}
}
{
"error": {
"code": "DATA_APP_NOT_FOUND",
"message": "Data app not found"
}
}
{
"error": {
"code": "AUTHENTICATION_ERROR",
"message": "Invalid Service Token"
}
}
{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "INTERNAL_SERVER_ERROR"
}
}
Update the name and configuration of an existing Data App. This is useful for renaming Data Apps or updating their settings.
Use this endpoint for all new integrations. This is the recommended endpoint format.This endpoint still works but will be deprecated. Please migrate to the new endpoint format.
Updating a Data App name will not affect existing embed configurations or API tokens. They will continue to work with the renamed Data App.
Authentication Requirement: This endpoint requires a service token (not a data app API key). Service tokens have elevated permissions to manage Data Apps across your organization.
Endpoint Formats
- New Endpoint (Recommended)
- Legacy Endpoint (Deprecated Soon)
PUT https://api.usedatabrain.com/api/v2/data-app
PUT https://api.usedatabrain.com/api/v2/dataApp
Authentication
This endpoint requires a service token in the Authorization header. Service tokens differ from data app API keys and provide organization-level permissions. To access your service token:- In Settings page, navigate to the Service Tokens section.
- Click the “Generate Token” button to create a new service token if you don’t have one already.
Headers
Bearer token for API authentication. Use your service token (not data app API key).
Authorization: Bearer service_token_xyz...
Must be set to
application/json for all requests.Content-Type: application/json
Request Body
The current name of the Data App to update. This must exactly match an existing Data App name.
Show Finding Data App names
Show Finding Data App names
- Use the List Data Apps API to get all Data App names
- Check your Databrain dashboard for Data App configurations
- The name is case-sensitive
The new name for the Data App. This name must be unique within your organization.
Show Naming guidelines
Show Naming guidelines
- Names must be unique within your organization
- Use descriptive names that indicate the purpose (e.g., “Customer Portal Analytics”, “Partner Dashboard”)
- Avoid special characters that might cause URL encoding issues
Response
The updated name of the Data App.
Examples
HTTP Status Code Summary
| Status Code | Description |
|---|---|
200 | OK - Data App updated successfully |
400 | Bad Request - Invalid request parameters |
500 | Internal Server Error - Server error occurred |
Possible Errors
| Error Code | HTTP Status | Description |
|---|---|---|
INVALID_REQUEST_BODY | 400 | Missing or invalid parameters |
DATA_APP_NOT_FOUND | 400 | Data App with specified name not found |
AUTHENTICATION_ERROR | 400 | Invalid or missing service token |
INTERNAL_SERVER_ERROR | 500 | Server error |
Quick Start Guide
Get your service token
In Settings page, navigate to the Service Tokens section. Click the “Generate Token” button to create a new service token if you don’t have one already.
Identify the Data App
Use the List Data Apps API to verify the current Data App configuration:
curl --request GET \
--url 'https://api.usedatabrain.com/api/v2/data-app' \
--header 'Authorization: Bearer service_token_xyz...'
Update the Data App
Make a PUT request with the current name and the new name:
curl --request PUT \
--url https://api.usedatabrain.com/api/v2/data-app \
--header 'Authorization: Bearer service_token_xyz...' \
--header 'Content-Type: application/json' \
--data '{
"name": "Current Data App Name",
"updateName": "New Data App Name"
}'
Next Steps
List Data Apps
View all Data Apps in your organization
Create Data App
Create new Data Apps for your organization
Delete Data App
Remove Data Apps you no longer need
Create API Token
Generate API tokens for your Data Apps
⌘I

