Bulk edit book metadata
PUT
/api/v1/books/bulk-edit-metadata
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");curl_easy_setopt(hnd, CURLOPT_URL, "http://127.0.0.1:58259/api/v1/books/bulk-edit-metadata");
struct curl_slist *headers = NULL;headers = curl_slist_append(headers, "Content-Type: application/json");curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{ \"bookIds\": [ 1 ], \"authors\": [ \"example\" ], \"clearAuthors\": true, \"publisher\": \"example\", \"clearPublisher\": true, \"language\": \"example\", \"clearLanguage\": true, \"seriesName\": \"example\", \"clearSeriesName\": true, \"seriesTotal\": 1, \"clearSeriesTotal\": true, \"publishedDate\": \"2026-04-15\", \"clearPublishedDate\": true, \"genres\": [ \"example\" ], \"clearGenres\": true, \"moods\": [ \"example\" ], \"clearMoods\": true, \"tags\": [ \"example\" ], \"clearTags\": true, \"mergeCategories\": true, \"mergeMoods\": true, \"mergeTags\": true, \"ageRating\": 1, \"clearAgeRating\": true, \"contentRating\": \"example\", \"clearContentRating\": true }");
CURLcode ret = curl_easy_perform(hnd);using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Put, RequestUri = new Uri("http://127.0.0.1:58259/api/v1/books/bulk-edit-metadata"), Content = new StringContent("{ \"bookIds\": [ 1 ], \"authors\": [ \"example\" ], \"clearAuthors\": true, \"publisher\": \"example\", \"clearPublisher\": true, \"language\": \"example\", \"clearLanguage\": true, \"seriesName\": \"example\", \"clearSeriesName\": true, \"seriesTotal\": 1, \"clearSeriesTotal\": true, \"publishedDate\": \"2026-04-15\", \"clearPublishedDate\": true, \"genres\": [ \"example\" ], \"clearGenres\": true, \"moods\": [ \"example\" ], \"clearMoods\": true, \"tags\": [ \"example\" ], \"clearTags\": true, \"mergeCategories\": true, \"mergeMoods\": true, \"mergeTags\": true, \"ageRating\": 1, \"clearAgeRating\": true, \"contentRating\": \"example\", \"clearContentRating\": true }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "http://127.0.0.1:58259/api/v1/books/bulk-edit-metadata"
payload := strings.NewReader("{ \"bookIds\": [ 1 ], \"authors\": [ \"example\" ], \"clearAuthors\": true, \"publisher\": \"example\", \"clearPublisher\": true, \"language\": \"example\", \"clearLanguage\": true, \"seriesName\": \"example\", \"clearSeriesName\": true, \"seriesTotal\": 1, \"clearSeriesTotal\": true, \"publishedDate\": \"2026-04-15\", \"clearPublishedDate\": true, \"genres\": [ \"example\" ], \"clearGenres\": true, \"moods\": [ \"example\" ], \"clearMoods\": true, \"tags\": [ \"example\" ], \"clearTags\": true, \"mergeCategories\": true, \"mergeMoods\": true, \"mergeTags\": true, \"ageRating\": 1, \"clearAgeRating\": true, \"contentRating\": \"example\", \"clearContentRating\": true }")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("http://127.0.0.1:58259/api/v1/books/bulk-edit-metadata")) .header("Content-Type", "application/json") .method("PUT", HttpRequest.BodyPublishers.ofString("{ \"bookIds\": [ 1 ], \"authors\": [ \"example\" ], \"clearAuthors\": true, \"publisher\": \"example\", \"clearPublisher\": true, \"language\": \"example\", \"clearLanguage\": true, \"seriesName\": \"example\", \"clearSeriesName\": true, \"seriesTotal\": 1, \"clearSeriesTotal\": true, \"publishedDate\": \"2026-04-15\", \"clearPublishedDate\": true, \"genres\": [ \"example\" ], \"clearGenres\": true, \"moods\": [ \"example\" ], \"clearMoods\": true, \"tags\": [ \"example\" ], \"clearTags\": true, \"mergeCategories\": true, \"mergeMoods\": true, \"mergeTags\": true, \"ageRating\": 1, \"clearAgeRating\": true, \"contentRating\": \"example\", \"clearContentRating\": true }")) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");RequestBody body = RequestBody.create(mediaType, "{ \"bookIds\": [ 1 ], \"authors\": [ \"example\" ], \"clearAuthors\": true, \"publisher\": \"example\", \"clearPublisher\": true, \"language\": \"example\", \"clearLanguage\": true, \"seriesName\": \"example\", \"clearSeriesName\": true, \"seriesTotal\": 1, \"clearSeriesTotal\": true, \"publishedDate\": \"2026-04-15\", \"clearPublishedDate\": true, \"genres\": [ \"example\" ], \"clearGenres\": true, \"moods\": [ \"example\" ], \"clearMoods\": true, \"tags\": [ \"example\" ], \"clearTags\": true, \"mergeCategories\": true, \"mergeMoods\": true, \"mergeTags\": true, \"ageRating\": 1, \"clearAgeRating\": true, \"contentRating\": \"example\", \"clearContentRating\": true }");Request request = new Request.Builder() .url("http://127.0.0.1:58259/api/v1/books/bulk-edit-metadata") .put(body) .addHeader("Content-Type", "application/json") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'PUT', url: 'http://127.0.0.1:58259/api/v1/books/bulk-edit-metadata', headers: {'Content-Type': 'application/json'}, data: { bookIds: [1], authors: ['example'], clearAuthors: true, publisher: 'example', clearPublisher: true, language: 'example', clearLanguage: true, seriesName: 'example', clearSeriesName: true, seriesTotal: 1, clearSeriesTotal: true, publishedDate: '2026-04-15', clearPublishedDate: true, genres: ['example'], clearGenres: true, moods: ['example'], clearMoods: true, tags: ['example'], clearTags: true, mergeCategories: true, mergeMoods: true, mergeTags: true, ageRating: 1, clearAgeRating: true, contentRating: 'example', clearContentRating: true }};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'http://127.0.0.1:58259/api/v1/books/bulk-edit-metadata';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"bookIds":[1],"authors":["example"],"clearAuthors":true,"publisher":"example","clearPublisher":true,"language":"example","clearLanguage":true,"seriesName":"example","clearSeriesName":true,"seriesTotal":1,"clearSeriesTotal":true,"publishedDate":"2026-04-15","clearPublishedDate":true,"genres":["example"],"clearGenres":true,"moods":["example"],"clearMoods":true,"tags":["example"],"clearTags":true,"mergeCategories":true,"mergeMoods":true,"mergeTags":true,"ageRating":1,"clearAgeRating":true,"contentRating":"example","clearContentRating":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")val body = RequestBody.create(mediaType, "{ \"bookIds\": [ 1 ], \"authors\": [ \"example\" ], \"clearAuthors\": true, \"publisher\": \"example\", \"clearPublisher\": true, \"language\": \"example\", \"clearLanguage\": true, \"seriesName\": \"example\", \"clearSeriesName\": true, \"seriesTotal\": 1, \"clearSeriesTotal\": true, \"publishedDate\": \"2026-04-15\", \"clearPublishedDate\": true, \"genres\": [ \"example\" ], \"clearGenres\": true, \"moods\": [ \"example\" ], \"clearMoods\": true, \"tags\": [ \"example\" ], \"clearTags\": true, \"mergeCategories\": true, \"mergeMoods\": true, \"mergeTags\": true, \"ageRating\": 1, \"clearAgeRating\": true, \"contentRating\": \"example\", \"clearContentRating\": true }")val request = Request.Builder() .url("http://127.0.0.1:58259/api/v1/books/bulk-edit-metadata") .put(body) .addHeader("Content-Type", "application/json") .build()
val response = client.newCall(request).execute()use std::str::FromStr;use serde_json::json;use reqwest;
#[tokio::main]pub async fn main() { let url = "http://127.0.0.1:58259/api/v1/books/bulk-edit-metadata";
let payload = json!({ "bookIds": (1), "authors": ("example"), "clearAuthors": true, "publisher": "example", "clearPublisher": true, "language": "example", "clearLanguage": true, "seriesName": "example", "clearSeriesName": true, "seriesTotal": 1, "clearSeriesTotal": true, "publishedDate": "2026-04-15", "clearPublishedDate": true, "genres": ("example"), "clearGenres": true, "moods": ("example"), "clearMoods": true, "tags": ("example"), "clearTags": true, "mergeCategories": true, "mergeMoods": true, "mergeTags": true, "ageRating": 1, "clearAgeRating": true, "contentRating": "example", "clearContentRating": true });
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Content-Type", "application/json".parse().unwrap());
let client = reqwest::Client::new(); let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url) .headers(headers) .json(&payload) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request PUT \ --url http://127.0.0.1:58259/api/v1/books/bulk-edit-metadata \ --header 'Content-Type: application/json' \ --data '{ "bookIds": [ 1 ], "authors": [ "example" ], "clearAuthors": true, "publisher": "example", "clearPublisher": true, "language": "example", "clearLanguage": true, "seriesName": "example", "clearSeriesName": true, "seriesTotal": 1, "clearSeriesTotal": true, "publishedDate": "2026-04-15", "clearPublishedDate": true, "genres": [ "example" ], "clearGenres": true, "moods": [ "example" ], "clearMoods": true, "tags": [ "example" ], "clearTags": true, "mergeCategories": true, "mergeMoods": true, "mergeTags": true, "ageRating": 1, "clearAgeRating": true, "contentRating": "example", "clearContentRating": true }'wget --quiet \ --method PUT \ --header 'Content-Type: application/json' \ --body-data '{ "bookIds": [ 1 ], "authors": [ "example" ], "clearAuthors": true, "publisher": "example", "clearPublisher": true, "language": "example", "clearLanguage": true, "seriesName": "example", "clearSeriesName": true, "seriesTotal": 1, "clearSeriesTotal": true, "publishedDate": "2026-04-15", "clearPublishedDate": true, "genres": [ "example" ], "clearGenres": true, "moods": [ "example" ], "clearMoods": true, "tags": [ "example" ], "clearTags": true, "mergeCategories": true, "mergeMoods": true, "mergeTags": true, "ageRating": 1, "clearAgeRating": true, "contentRating": "example", "clearContentRating": true }' \ --output-document \ - http://127.0.0.1:58259/api/v1/books/bulk-edit-metadataBulk update metadata for multiple books. Requires metadata edit permission or admin.
Request Body required
Section titled “Request Body required ” Media type application/json
Bulk metadata update request
object
bookIds
Array<integer>
authors
Array<string>
clearAuthors
boolean
publisher
string
clearPublisher
boolean
language
string
clearLanguage
boolean
seriesName
string
clearSeriesName
boolean
seriesTotal
integer format: int32
clearSeriesTotal
boolean
publishedDate
string format: date
clearPublishedDate
boolean
genres
Array<string>
clearGenres
boolean
moods
Array<string>
clearMoods
boolean
tags
Array<string>
clearTags
boolean
mergeCategories
boolean
mergeMoods
boolean
mergeTags
boolean
ageRating
integer format: int32
clearAgeRating
boolean
contentRating
string
clearContentRating
boolean
Example generated
{ "bookIds": [ 1 ], "authors": [ "example" ], "clearAuthors": true, "publisher": "example", "clearPublisher": true, "language": "example", "clearLanguage": true, "seriesName": "example", "clearSeriesName": true, "seriesTotal": 1, "clearSeriesTotal": true, "publishedDate": "2026-04-15", "clearPublishedDate": true, "genres": [ "example" ], "clearGenres": true, "moods": [ "example" ], "clearMoods": true, "tags": [ "example" ], "clearTags": true, "mergeCategories": true, "mergeMoods": true, "mergeTags": true, "ageRating": 1, "clearAgeRating": true, "contentRating": "example", "clearContentRating": true}Responses
Section titled “ Responses ”Bulk metadata updated successfully