Clone Default Settings
curl --request POST \
--url https://api.royalti.io/defaultsettings/clone \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceEntityType": "artist",
"sourceEntityId": "660e8400-e29b-41d4-a716-446655440001",
"targetEntityType": "artist",
"targetEntityId": "770e8400-e29b-41d4-a716-446655440002"
}
'import requests
url = "https://api.royalti.io/defaultsettings/clone"
payload = {
"sourceEntityType": "artist",
"sourceEntityId": "660e8400-e29b-41d4-a716-446655440001",
"targetEntityType": "artist",
"targetEntityId": "770e8400-e29b-41d4-a716-446655440002"
}
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({
sourceEntityType: 'artist',
sourceEntityId: '660e8400-e29b-41d4-a716-446655440001',
targetEntityType: 'artist',
targetEntityId: '770e8400-e29b-41d4-a716-446655440002'
})
};
fetch('https://api.royalti.io/defaultsettings/clone', 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.royalti.io/defaultsettings/clone",
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([
'sourceEntityType' => 'artist',
'sourceEntityId' => '660e8400-e29b-41d4-a716-446655440001',
'targetEntityType' => 'artist',
'targetEntityId' => '770e8400-e29b-41d4-a716-446655440002'
]),
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.royalti.io/defaultsettings/clone"
payload := strings.NewReader("{\n \"sourceEntityType\": \"artist\",\n \"sourceEntityId\": \"660e8400-e29b-41d4-a716-446655440001\",\n \"targetEntityType\": \"artist\",\n \"targetEntityId\": \"770e8400-e29b-41d4-a716-446655440002\"\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://api.royalti.io/defaultsettings/clone")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sourceEntityType\": \"artist\",\n \"sourceEntityId\": \"660e8400-e29b-41d4-a716-446655440001\",\n \"targetEntityType\": \"artist\",\n \"targetEntityId\": \"770e8400-e29b-41d4-a716-446655440002\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/defaultsettings/clone")
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 \"sourceEntityType\": \"artist\",\n \"sourceEntityId\": \"660e8400-e29b-41d4-a716-446655440001\",\n \"targetEntityType\": \"artist\",\n \"targetEntityId\": \"770e8400-e29b-41d4-a716-446655440002\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Default settings cloned successfully",
"data": {
"cloned": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"TenantId": 123,
"settings": {
"content": {
"version": "<string>",
"language": "<string>",
"mainGenre": [
"<string>"
],
"subGenre": [
"<string>"
],
"contributors": {}
},
"business": {
"label": "<string>",
"copyright": "<string>",
"publisher": "<string>",
"copyrightOwner": "<string>",
"distribution": "<string>"
},
"ddex": {
"enableDDEX": true,
"labelName": "<string>",
"resourceReference": "<string>",
"grid": "<string>",
"icpn": "<string>"
},
"validation": {
"requireGenre": true,
"requireLyrics": true,
"requireDescription": true,
"minimumTrackCount": 1,
"maximumTrackCount": 2
}
},
"entityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isActive": true,
"priority": 0,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"skipped": 123
}
}{
"status": "error",
"message": "Invalid request parameters"
}{
"status": "error",
"message": "Unauthorized"
}{
"status": "error",
"message": "Resource not found"
}{
"status": "error",
"message": "Internal server error"
}Default Settings
Clone Default Settings
POST /defaultsettings/clone
POST
/
defaultsettings
/
clone
Clone Default Settings
curl --request POST \
--url https://api.royalti.io/defaultsettings/clone \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceEntityType": "artist",
"sourceEntityId": "660e8400-e29b-41d4-a716-446655440001",
"targetEntityType": "artist",
"targetEntityId": "770e8400-e29b-41d4-a716-446655440002"
}
'import requests
url = "https://api.royalti.io/defaultsettings/clone"
payload = {
"sourceEntityType": "artist",
"sourceEntityId": "660e8400-e29b-41d4-a716-446655440001",
"targetEntityType": "artist",
"targetEntityId": "770e8400-e29b-41d4-a716-446655440002"
}
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({
sourceEntityType: 'artist',
sourceEntityId: '660e8400-e29b-41d4-a716-446655440001',
targetEntityType: 'artist',
targetEntityId: '770e8400-e29b-41d4-a716-446655440002'
})
};
fetch('https://api.royalti.io/defaultsettings/clone', 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.royalti.io/defaultsettings/clone",
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([
'sourceEntityType' => 'artist',
'sourceEntityId' => '660e8400-e29b-41d4-a716-446655440001',
'targetEntityType' => 'artist',
'targetEntityId' => '770e8400-e29b-41d4-a716-446655440002'
]),
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.royalti.io/defaultsettings/clone"
payload := strings.NewReader("{\n \"sourceEntityType\": \"artist\",\n \"sourceEntityId\": \"660e8400-e29b-41d4-a716-446655440001\",\n \"targetEntityType\": \"artist\",\n \"targetEntityId\": \"770e8400-e29b-41d4-a716-446655440002\"\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://api.royalti.io/defaultsettings/clone")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sourceEntityType\": \"artist\",\n \"sourceEntityId\": \"660e8400-e29b-41d4-a716-446655440001\",\n \"targetEntityType\": \"artist\",\n \"targetEntityId\": \"770e8400-e29b-41d4-a716-446655440002\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/defaultsettings/clone")
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 \"sourceEntityType\": \"artist\",\n \"sourceEntityId\": \"660e8400-e29b-41d4-a716-446655440001\",\n \"targetEntityType\": \"artist\",\n \"targetEntityId\": \"770e8400-e29b-41d4-a716-446655440002\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Default settings cloned successfully",
"data": {
"cloned": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"TenantId": 123,
"settings": {
"content": {
"version": "<string>",
"language": "<string>",
"mainGenre": [
"<string>"
],
"subGenre": [
"<string>"
],
"contributors": {}
},
"business": {
"label": "<string>",
"copyright": "<string>",
"publisher": "<string>",
"copyrightOwner": "<string>",
"distribution": "<string>"
},
"ddex": {
"enableDDEX": true,
"labelName": "<string>",
"resourceReference": "<string>",
"grid": "<string>",
"icpn": "<string>"
},
"validation": {
"requireGenre": true,
"requireLyrics": true,
"requireDescription": true,
"minimumTrackCount": 1,
"maximumTrackCount": 2
}
},
"entityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isActive": true,
"priority": 0,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"skipped": 123
}
}{
"status": "error",
"message": "Invalid request parameters"
}{
"status": "error",
"message": "Unauthorized"
}{
"status": "error",
"message": "Resource not found"
}{
"status": "error",
"message": "Internal server error"
}Description
POST /defaultsettings/clone Description: Clone all active default settings from one entity to another. This is useful for duplicating configurations when creating similar entities (e.g., copying artist defaults to a new artist in the same label). Authorization:- Required role:
adminor higher
POST
Request Body:
| Parameter | Type | Description | Required |
|---|---|---|---|
| sourceEntityType | string | Source entity type | Yes |
| sourceEntityId | uuid | Source entity ID (optional for tenant/catalog) | Conditional |
| targetEntityType | string | Target entity type | Yes |
| targetEntityId | uuid | Target entity ID (optional for tenant/catalog) | Conditional |
Code Examples
const response = await fetch('https://api.royalti.io/defaultsettings/clone', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"sourceEntityType": "sample-sourceEntityType",
"sourceEntityId": "sample-sourceEntityId",
"targetEntityType": "sample-targetEntityType",
"targetEntityId": "sample-targetEntityId"
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://api.royalti.io/defaultsettings/clone',
json={"sourceEntityType":"sample-sourceEntityType","sourceEntityId":"sample-sourceEntityId","targetEntityType":"sample-targetEntityType","targetEntityId":"sample-targetEntityId"}
)
data = response.json()
print(data)
curl -X POST https://api.royalti.io/defaultsettings/clone \
-H "Content-Type: application/json" \
-d '{"sourceEntityType":"sample-sourceEntityType","sourceEntityId":"sample-sourceEntityId","targetEntityType":"sample-targetEntityType","targetEntityId":"sample-targetEntityId"}'
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Body
application/json
⌘I