Update App Custom Data
curl --request PUT \
--url https://api.pulze.ai/v1/apps/custom-data/{app_id}/files/{file_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file_name": "<string>",
"active": true,
"labels": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.pulze.ai/v1/apps/custom-data/{app_id}/files/{file_id}"
payload = {
"file_name": "<string>",
"active": True,
"labels": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
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({
file_name: '<string>',
active: true,
labels: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://api.pulze.ai/v1/apps/custom-data/{app_id}/files/{file_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.pulze.ai/v1/apps/custom-data/{app_id}/files/{file_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([
'file_name' => '<string>',
'active' => true,
'labels' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
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://api.pulze.ai/v1/apps/custom-data/{app_id}/files/{file_id}"
payload := strings.NewReader("{\n \"file_name\": \"<string>\",\n \"active\": true,\n \"labels\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\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://api.pulze.ai/v1/apps/custom-data/{app_id}/files/{file_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"file_name\": \"<string>\",\n \"active\": true,\n \"labels\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pulze.ai/v1/apps/custom-data/{app_id}/files/{file_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 \"file_name\": \"<string>\",\n \"active\": true,\n \"labels\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"file_name": "<string>",
"data_type": "file",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"app_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"carbon_object_id": "<string>",
"carbon_data_source_type": "<string>",
"carbon_last_synced_on": "2023-11-07T05:31:56Z",
"file_mime": "<string>",
"file_size": 123,
"external_url": "<string>",
"active": true,
"state": "PENDING",
"labels": [
{
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"color": "<string>"
}
],
"added_on": "2023-11-07T05:31:56Z",
"modified_on": "2023-11-07T05:31:56Z",
"deleted_on": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Data
Update App Custom Data
PUT
/
v1
/
apps
/
custom-data
/
{app_id}
/
files
/
{file_id}
Update App Custom Data
curl --request PUT \
--url https://api.pulze.ai/v1/apps/custom-data/{app_id}/files/{file_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file_name": "<string>",
"active": true,
"labels": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.pulze.ai/v1/apps/custom-data/{app_id}/files/{file_id}"
payload = {
"file_name": "<string>",
"active": True,
"labels": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
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({
file_name: '<string>',
active: true,
labels: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://api.pulze.ai/v1/apps/custom-data/{app_id}/files/{file_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.pulze.ai/v1/apps/custom-data/{app_id}/files/{file_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([
'file_name' => '<string>',
'active' => true,
'labels' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
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://api.pulze.ai/v1/apps/custom-data/{app_id}/files/{file_id}"
payload := strings.NewReader("{\n \"file_name\": \"<string>\",\n \"active\": true,\n \"labels\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\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://api.pulze.ai/v1/apps/custom-data/{app_id}/files/{file_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"file_name\": \"<string>\",\n \"active\": true,\n \"labels\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pulze.ai/v1/apps/custom-data/{app_id}/files/{file_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 \"file_name\": \"<string>\",\n \"active\": true,\n \"labels\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"file_name": "<string>",
"data_type": "file",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"app_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"carbon_object_id": "<string>",
"carbon_data_source_type": "<string>",
"carbon_last_synced_on": "2023-11-07T05:31:56Z",
"file_mime": "<string>",
"file_size": 123,
"external_url": "<string>",
"active": true,
"state": "PENDING",
"labels": [
{
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"color": "<string>"
}
],
"added_on": "2023-11-07T05:31:56Z",
"modified_on": "2023-11-07T05:31:56Z",
"deleted_on": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
Successful Response
The ID of the tenant to store this data in
The name of the file
Required string length:
1 - 2083The type of custom data (file, url, ...)
Available options:
file, url The ID
The ID of the app to store this data in
The ID of the object in Carbon
The type of the data source in Carbon
The timestamp the file was last synced from Carbon
The mimetype of the file
The size of the file in Bytes
The external URL to the file
Required string length:
1 - 2083Indicates if the data source will be included in queries
The state of the file
Available options:
CREATED, PENDING, QUEUED, QUEUED_FOR_RECONCILIATION, SYNC_FAILED, FAILED, INDEXED, DELETING The labels associated with the file
Show child attributes
Show child attributes
The timestamp the file was added
The timestamp the file was last modified
The timestamp the file was added
Was this page helpful?
