Update Data
curl --request POST \
--url https://{resource_uuid}.api.seahorse.dnotitia.ai/v2/data/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"update_condition": "id = '1000'",
"update_values": "text = 'changed_text'"
}
EOFimport requests
url = "https://{resource_uuid}.api.seahorse.dnotitia.ai/v2/data/update"
payload = {
"update_condition": "id = '1000'",
"update_values": "text = 'changed_text'"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({update_condition: 'id = \'1000\'', update_values: 'text = \'changed_text\''})
};
fetch('https://{resource_uuid}.api.seahorse.dnotitia.ai/v2/data/update', 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://{resource_uuid}.api.seahorse.dnotitia.ai/v2/data/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'update_condition' => 'id = \'1000\'',
'update_values' => 'text = \'changed_text\''
]),
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://{resource_uuid}.api.seahorse.dnotitia.ai/v2/data/update"
payload := strings.NewReader("{\n \"update_condition\": \"id = '1000'\",\n \"update_values\": \"text = 'changed_text'\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://{resource_uuid}.api.seahorse.dnotitia.ai/v2/data/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"update_condition\": \"id = '1000'\",\n \"update_values\": \"text = 'changed_text'\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{resource_uuid}.api.seahorse.dnotitia.ai/v2/data/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"update_condition\": \"id = '1000'\",\n \"update_values\": \"text = 'changed_text'\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {},
"exception": null,
"success": true
}{
"code": 400,
"data": null,
"exception": {
"error_code": 400001,
"error_message": "Bad Request: "
},
"success": false
}{
"code": 500,
"data": null,
"exception": {
"error_code": 500001,
"error_message": "Arrow error: "
},
"success": false
}테이블 (Table)
Update Data
Update data in the specified table based on the provided update condition and values.
POST
/
v2
/
data
/
update
Update Data
curl --request POST \
--url https://{resource_uuid}.api.seahorse.dnotitia.ai/v2/data/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"update_condition": "id = '1000'",
"update_values": "text = 'changed_text'"
}
EOFimport requests
url = "https://{resource_uuid}.api.seahorse.dnotitia.ai/v2/data/update"
payload = {
"update_condition": "id = '1000'",
"update_values": "text = 'changed_text'"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({update_condition: 'id = \'1000\'', update_values: 'text = \'changed_text\''})
};
fetch('https://{resource_uuid}.api.seahorse.dnotitia.ai/v2/data/update', 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://{resource_uuid}.api.seahorse.dnotitia.ai/v2/data/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'update_condition' => 'id = \'1000\'',
'update_values' => 'text = \'changed_text\''
]),
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://{resource_uuid}.api.seahorse.dnotitia.ai/v2/data/update"
payload := strings.NewReader("{\n \"update_condition\": \"id = '1000'\",\n \"update_values\": \"text = 'changed_text'\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://{resource_uuid}.api.seahorse.dnotitia.ai/v2/data/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"update_condition\": \"id = '1000'\",\n \"update_values\": \"text = 'changed_text'\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{resource_uuid}.api.seahorse.dnotitia.ai/v2/data/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"update_condition\": \"id = '1000'\",\n \"update_values\": \"text = 'changed_text'\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {},
"exception": null,
"success": true
}{
"code": 400,
"data": null,
"exception": {
"error_code": 400001,
"error_message": "Bad Request: "
},
"success": false
}{
"code": 500,
"data": null,
"exception": {
"error_code": 500001,
"error_message": "Arrow error: "
},
"success": false
}Authorizations
bearerAuthapiKeyAuth
Bearer token authentication. Include the token in the Authorization header as 'Bearer '
Body
application/json
The update condition and values
Values to update in SQL SET clause format (e.g. "column = value"). Multiple assignments can be separated by commas.
Example:
"video_title = changed_title, category = 100"
SQL WHERE clause to filter which rows to update. If not provided, all rows will be updated.
Example:
"video_id = 1000"