Перейти к основному содержанию
PATCH
/
projects
/
{projectId}
Update project metadata
curl --request PATCH \
  --url https://api.youka.io/api/v1/projects/{projectId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "artists": [
    "<string>"
  ]
}
'
import requests

url = "https://api.youka.io/api/v1/projects/{projectId}"

payload = {
"title": "<string>",
"artists": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: '<string>', artists: ['<string>']})
};

fetch('https://api.youka.io/api/v1/projects/{projectId}', 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}",
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([
'title' => '<string>',
'artists' => [
'<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}"

payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"artists\": [\n \"<string>\"\n ]\n}")

req, _ := http.NewRequest("PATCH", 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.patch("https://api.youka.io/api/v1/projects/{projectId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"artists\": [\n \"<string>\"\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.youka.io/api/v1/projects/{projectId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"artists\": [\n \"<string>\"\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "title": "<string>",
  "artists": [
    "<string>"
  ],
  "stems": [
    {
      "id": "<string>",
      "model": "<string>",
      "url": "<string>",
      "duration": 123
    }
  ],
  "alignments": [
    {
      "id": "<string>",
      "model": "<string>",
      "alignment": "<unknown>",
      "createdAt": "<string>"
    }
  ],
  "exports": [
    {
      "id": "<string>",
      "createdAt": "<string>",
      "updatedAt": "<string>",
      "fileId": "<string>",
      "fileKey": "<string>",
      "fileSize": 123,
      "resolution": "<string>",
      "quality": "<string>",
      "fps": 123,
      "transparent": true
    }
  ],
  "settings": {
    "presetId": "<string>",
    "preset": {
      "aspectRatio": "16:9",
      "layout": {
        "type": "karaoke",
        "autoSplitLongLines": true,
        "linesPerScreen": 2,
        "alignment": "bottom",
        "paddingHorizontal": 0,
        "paddingVertical": 5,
        "languageSpacing": 5,
        "containerHeight": 100,
        "scrollingFadeStrength": 0.5,
        "lineTransition": "fade",
        "anticipationBuffer": 3
      },
      "background": {
        "type": "auto"
      },
      "singerTextStyles": {},
      "overlays": {
        "branding": {
          "logo": {
            "enabled": false,
            "position": "bottom-right",
            "paddingX": 20,
            "paddingY": 20,
            "scale": 0.1,
            "opacity": 1
          },
          "intro": {
            "enabled": false,
            "durationSeconds": 0,
            "effect": "fade",
            "effectDuration": 0.5
          },
          "outro": {
            "enabled": false,
            "durationSeconds": 0,
            "effect": "fade",
            "effectDuration": 0.5
          }
        },
        "titleCard": {
          "enabled": true,
          "duration": 5,
          "autoHideBeforeLyrics": true,
          "titleStyle": {
            "fontFamily": "Arimo",
            "fontSize": 200,
            "fontWeight": 700,
            "textColor": "#2185D0",
            "outlineColor": "#000000",
            "outlineWidth": 30
          },
          "artistStyle": {
            "fontFamily": "Arimo",
            "fontSize": 150,
            "fontWeight": 700,
            "textColor": "#FFFFFF",
            "outlineColor": "#000000",
            "outlineWidth": 30
          }
        },
        "leadIn": {
          "enabled": true,
          "beats": 4,
          "minGap": 3,
          "useNextSingerStyle": true,
          "style": {
            "color": "#2185D0",
            "outlineColor": "#000000",
            "outlineWidth": 3
          },
          "width": 0.2,
          "height": 1,
          "offsetX": -2,
          "offsetY": 0
        },
        "instrumentalBreak": {
          "hideLyrics": true,
          "minGap": 5,
          "displayDuration": 3
        },
        "breakCountdown": {
          "enabled": true,
          "maxDuration": 3,
          "animation": "fade",
          "useNextSingerStyle": false,
          "style": {
            "color": "#FFFFFF",
            "outlineColor": "#000000",
            "outlineWidth": 14.5
          },
          "textSize": 80,
          "hideBeforeEnd": 0
        },
        "breakProgressBar": {
          "enabled": true,
          "maxDuration": 10,
          "useNextSingerStyle": false,
          "style": {
            "color": "#2185D0",
            "outlineColor": "#000000",
            "outlineWidth": 5,
            "backgroundColor": "#FFFFFF",
            "fillColor": "#2185D0"
          },
          "width": 47,
          "height": 7.5,
          "position": "center",
          "cornerRadius": 0,
          "hideBeforeEnd": 0
        }
      },
      "trim": {
        "startSeconds": 0,
        "endSeconds": 0
      },
      "languageTextStyles": {},
      "chordTextStyle": {
        "fontFamily": "Arimo",
        "fontSize": 96,
        "fontWeight": 700,
        "textColor": "#FFFFFF",
        "outlineColor": "#000000",
        "outlineWidth": 20,
        "textEffect": "karaoke",
        "activeLineColor": "#fff09a",
        "effectColor": "#2185D0",
        "backgroundColor": "transparent",
        "letterSpacing": 0,
        "lineSpacing": 1.2,
        "textCase": "none",
        "textDirection": "auto",
        "shadowColor": "rgba(0,0,0,0.5)",
        "shadowBlur": 4,
        "shadowOffsetX": 0,
        "shadowOffsetY": 0,
        "duetPosition": "center",
        "shadowOpacity": 123
      }
    },
    "settings": {
      "style": {
        "aspectRatio": "16:9",
        "layout": {
          "type": "karaoke",
          "autoSplitLongLines": true,
          "linesPerScreen": 2,
          "alignment": "bottom",
          "paddingHorizontal": 0,
          "paddingVertical": 5,
          "languageSpacing": 5,
          "containerHeight": 100,
          "scrollingFadeStrength": 0.5,
          "lineTransition": "fade",
          "anticipationBuffer": 3
        },
        "background": {
          "type": "auto"
        },
        "singerTextStyles": {},
        "overlays": {
          "branding": {
            "logo": {
              "enabled": false,
              "position": "bottom-right",
              "paddingX": 20,
              "paddingY": 20,
              "scale": 0.1,
              "opacity": 1
            },
            "intro": {
              "enabled": false,
              "durationSeconds": 0,
              "effect": "fade",
              "effectDuration": 0.5
            },
            "outro": {
              "enabled": false,
              "durationSeconds": 0,
              "effect": "fade",
              "effectDuration": 0.5
            }
          },
          "titleCard": {
            "enabled": true,
            "duration": 5,
            "autoHideBeforeLyrics": true,
            "titleStyle": {
              "fontFamily": "Arimo",
              "fontSize": 200,
              "fontWeight": 700,
              "textColor": "#2185D0",
              "outlineColor": "#000000",
              "outlineWidth": 30
            },
            "artistStyle": {
              "fontFamily": "Arimo",
              "fontSize": 150,
              "fontWeight": 700,
              "textColor": "#FFFFFF",
              "outlineColor": "#000000",
              "outlineWidth": 30
            }
          },
          "leadIn": {
            "enabled": true,
            "beats": 4,
            "minGap": 3,
            "useNextSingerStyle": true,
            "style": {
              "color": "#2185D0",
              "outlineColor": "#000000",
              "outlineWidth": 3
            },
            "width": 0.2,
            "height": 1,
            "offsetX": -2,
            "offsetY": 0
          },
          "instrumentalBreak": {
            "hideLyrics": true,
            "minGap": 5,
            "displayDuration": 3
          },
          "breakCountdown": {
            "enabled": true,
            "maxDuration": 3,
            "animation": "fade",
            "useNextSingerStyle": false,
            "style": {
              "color": "#FFFFFF",
              "outlineColor": "#000000",
              "outlineWidth": 14.5
            },
            "textSize": 80,
            "hideBeforeEnd": 0
          },
          "breakProgressBar": {
            "enabled": true,
            "maxDuration": 10,
            "useNextSingerStyle": false,
            "style": {
              "color": "#2185D0",
              "outlineColor": "#000000",
              "outlineWidth": 5,
              "backgroundColor": "#FFFFFF",
              "fillColor": "#2185D0"
            },
            "width": 47,
            "height": 7.5,
            "position": "center",
            "cornerRadius": 0,
            "hideBeforeEnd": 0
          }
        },
        "trim": {
          "startSeconds": 0,
          "endSeconds": 0
        },
        "languageTextStyles": {},
        "chordTextStyle": {
          "fontFamily": "Arimo",
          "fontSize": 96,
          "fontWeight": 700,
          "textColor": "#FFFFFF",
          "outlineColor": "#000000",
          "outlineWidth": 20,
          "textEffect": "karaoke",
          "activeLineColor": "#fff09a",
          "effectColor": "#2185D0",
          "backgroundColor": "transparent",
          "letterSpacing": 0,
          "lineSpacing": 1.2,
          "textCase": "none",
          "textDirection": "auto",
          "shadowColor": "rgba(0,0,0,0.5)",
          "shadowBlur": 4,
          "shadowOffsetX": 0,
          "shadowOffsetY": 0,
          "duetPosition": "center",
          "shadowOpacity": 123
        }
      },
      "trim": {
        "startSeconds": 0,
        "endSeconds": 0
      },
      "displayLanguages": [
        "<string>"
      ],
      "chordSettings": {
        "displayMode": "inline",
        "notation": "chord_simple_pop",
        "transpose": 0,
        "capo": 0,
        "showLayer": true
      },
      "duetSingerFilter": {
        "enabled": false,
        "selectedSingerIds": [],
        "includeSharedLines": true
      }
    }
  },
  "lyrics": "<string>",
  "language": "<string>",
  "duration": 123,
  "task": {
    "id": "<string>",
    "error": "<string>"
  }
}

Авторизации

Authorization
string
header
обязательно

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Заголовки

Idempotency-Key
string

Параметры пути

projectId
string
обязательно

Тело

application/json
title
string
Minimum string length: 2
artists
string[]
Minimum string length: 1

Ответ

200 - application/json

Updated project state

id
string
обязательно
title
string
обязательно
artists
string[]
обязательно
stems
object[]
обязательно
alignments
object[]
обязательно
exports
object[]
обязательно
settings
object
обязательно
lyrics
string | null
language
string | null
duration
number | null
task
object | null