Replace exact word timings without processing or charging credits
curl --request PUT \
--url https://api.youka.io/api/v1/projects/{projectId}/alignments/{alignmentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"alignment": {
"items": [
{
"line": 4503599627370495,
"word": 4503599627370495,
"subword": 4503599627370495,
"start": 1,
"end": 1,
"text": "<string>",
"id": "<string>",
"singer": 4503599627370495,
"translations": {}
}
]
},
"expectedRevision": "<string>",
"select": true,
"expectedSelectionRevision": "<string>"
}
'import requests
url = "https://api.youka.io/api/v1/projects/{projectId}/alignments/{alignmentId}"
payload = {
"alignment": { "items": [
{
"line": 4503599627370495,
"word": 4503599627370495,
"subword": 4503599627370495,
"start": 1,
"end": 1,
"text": "<string>",
"id": "<string>",
"singer": 4503599627370495,
"translations": {}
}
] },
"expectedRevision": "<string>",
"select": True,
"expectedSelectionRevision": "<string>"
}
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({
alignment: {
items: [
{
line: 4503599627370495,
word: 4503599627370495,
subword: 4503599627370495,
start: 1,
end: 1,
text: '<string>',
id: '<string>',
singer: 4503599627370495,
translations: {}
}
]
},
expectedRevision: '<string>',
select: true,
expectedSelectionRevision: '<string>'
})
};
fetch('https://api.youka.io/api/v1/projects/{projectId}/alignments/{alignmentId}', 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.youka.io/api/v1/projects/{projectId}/alignments/{alignmentId}",
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([
'alignment' => [
'items' => [
[
'line' => 4503599627370495,
'word' => 4503599627370495,
'subword' => 4503599627370495,
'start' => 1,
'end' => 1,
'text' => '<string>',
'id' => '<string>',
'singer' => 4503599627370495,
'translations' => [
]
]
]
],
'expectedRevision' => '<string>',
'select' => true,
'expectedSelectionRevision' => '<string>'
]),
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.youka.io/api/v1/projects/{projectId}/alignments/{alignmentId}"
payload := strings.NewReader("{\n \"alignment\": {\n \"items\": [\n {\n \"line\": 4503599627370495,\n \"word\": 4503599627370495,\n \"subword\": 4503599627370495,\n \"start\": 1,\n \"end\": 1,\n \"text\": \"<string>\",\n \"id\": \"<string>\",\n \"singer\": 4503599627370495,\n \"translations\": {}\n }\n ]\n },\n \"expectedRevision\": \"<string>\",\n \"select\": true,\n \"expectedSelectionRevision\": \"<string>\"\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.youka.io/api/v1/projects/{projectId}/alignments/{alignmentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"alignment\": {\n \"items\": [\n {\n \"line\": 4503599627370495,\n \"word\": 4503599627370495,\n \"subword\": 4503599627370495,\n \"start\": 1,\n \"end\": 1,\n \"text\": \"<string>\",\n \"id\": \"<string>\",\n \"singer\": 4503599627370495,\n \"translations\": {}\n }\n ]\n },\n \"expectedRevision\": \"<string>\",\n \"select\": true,\n \"expectedSelectionRevision\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.youka.io/api/v1/projects/{projectId}/alignments/{alignmentId}")
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 \"alignment\": {\n \"items\": [\n {\n \"line\": 4503599627370495,\n \"word\": 4503599627370495,\n \"subword\": 4503599627370495,\n \"start\": 1,\n \"end\": 1,\n \"text\": \"<string>\",\n \"id\": \"<string>\",\n \"singer\": 4503599627370495,\n \"translations\": {}\n }\n ]\n },\n \"expectedRevision\": \"<string>\",\n \"select\": true,\n \"expectedSelectionRevision\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"model": "<string>",
"alignment": {
"items": [
{
"line": 123,
"word": 123,
"subword": 123,
"start": 123,
"end": 123,
"text": "<string>",
"id": "<string>",
"singer": 123,
"translations": {}
}
]
},
"createdAt": "<string>",
"revision": "<string>",
"selected": true,
"selectionRevision": "<string>",
"name": "<string>"
}Projects
Replace exact word timings without processing or charging credits
PUT
/
projects
/
{projectId}
/
alignments
/
{alignmentId}
Replace exact word timings without processing or charging credits
curl --request PUT \
--url https://api.youka.io/api/v1/projects/{projectId}/alignments/{alignmentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"alignment": {
"items": [
{
"line": 4503599627370495,
"word": 4503599627370495,
"subword": 4503599627370495,
"start": 1,
"end": 1,
"text": "<string>",
"id": "<string>",
"singer": 4503599627370495,
"translations": {}
}
]
},
"expectedRevision": "<string>",
"select": true,
"expectedSelectionRevision": "<string>"
}
'import requests
url = "https://api.youka.io/api/v1/projects/{projectId}/alignments/{alignmentId}"
payload = {
"alignment": { "items": [
{
"line": 4503599627370495,
"word": 4503599627370495,
"subword": 4503599627370495,
"start": 1,
"end": 1,
"text": "<string>",
"id": "<string>",
"singer": 4503599627370495,
"translations": {}
}
] },
"expectedRevision": "<string>",
"select": True,
"expectedSelectionRevision": "<string>"
}
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({
alignment: {
items: [
{
line: 4503599627370495,
word: 4503599627370495,
subword: 4503599627370495,
start: 1,
end: 1,
text: '<string>',
id: '<string>',
singer: 4503599627370495,
translations: {}
}
]
},
expectedRevision: '<string>',
select: true,
expectedSelectionRevision: '<string>'
})
};
fetch('https://api.youka.io/api/v1/projects/{projectId}/alignments/{alignmentId}', 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.youka.io/api/v1/projects/{projectId}/alignments/{alignmentId}",
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([
'alignment' => [
'items' => [
[
'line' => 4503599627370495,
'word' => 4503599627370495,
'subword' => 4503599627370495,
'start' => 1,
'end' => 1,
'text' => '<string>',
'id' => '<string>',
'singer' => 4503599627370495,
'translations' => [
]
]
]
],
'expectedRevision' => '<string>',
'select' => true,
'expectedSelectionRevision' => '<string>'
]),
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.youka.io/api/v1/projects/{projectId}/alignments/{alignmentId}"
payload := strings.NewReader("{\n \"alignment\": {\n \"items\": [\n {\n \"line\": 4503599627370495,\n \"word\": 4503599627370495,\n \"subword\": 4503599627370495,\n \"start\": 1,\n \"end\": 1,\n \"text\": \"<string>\",\n \"id\": \"<string>\",\n \"singer\": 4503599627370495,\n \"translations\": {}\n }\n ]\n },\n \"expectedRevision\": \"<string>\",\n \"select\": true,\n \"expectedSelectionRevision\": \"<string>\"\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.youka.io/api/v1/projects/{projectId}/alignments/{alignmentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"alignment\": {\n \"items\": [\n {\n \"line\": 4503599627370495,\n \"word\": 4503599627370495,\n \"subword\": 4503599627370495,\n \"start\": 1,\n \"end\": 1,\n \"text\": \"<string>\",\n \"id\": \"<string>\",\n \"singer\": 4503599627370495,\n \"translations\": {}\n }\n ]\n },\n \"expectedRevision\": \"<string>\",\n \"select\": true,\n \"expectedSelectionRevision\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.youka.io/api/v1/projects/{projectId}/alignments/{alignmentId}")
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 \"alignment\": {\n \"items\": [\n {\n \"line\": 4503599627370495,\n \"word\": 4503599627370495,\n \"subword\": 4503599627370495,\n \"start\": 1,\n \"end\": 1,\n \"text\": \"<string>\",\n \"id\": \"<string>\",\n \"singer\": 4503599627370495,\n \"translations\": {}\n }\n ]\n },\n \"expectedRevision\": \"<string>\",\n \"select\": true,\n \"expectedSelectionRevision\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"model": "<string>",
"alignment": {
"items": [
{
"line": 123,
"word": 123,
"subword": 123,
"start": 123,
"end": 123,
"text": "<string>",
"id": "<string>",
"singer": 123,
"translations": {}
}
]
},
"createdAt": "<string>",
"revision": "<string>",
"selected": true,
"selectionRevision": "<string>",
"name": "<string>"
}Ủy quyền
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Tiêu đề
Nội dung
application/json
Trang này có hữu ích không?
