Set Photos library folders
PUT
/api/v1/photos/library-roots
const url = 'https://example.com/api/v1/photos/library-roots';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"library_roots":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/v1/photos/library-roots \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "library_roots": [ "example" ] }'Requires a signed-in User. It sets the relative Home folders included in Photos and starts a library refresh. It returns 400 for invalid folders or 409 when settings changed. Route: /api/v1/photos/library-roots. Inputs: . Do not automatically replay this operation after an uncertain result.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
library_roots
required
Array<string>
Examplegenerated
{ "library_roots": [ "example" ]}Responses
Section titled “Responses”Media typeapplication/json
object
library_roots
required
Array<string>
Examplegenerated
{ "library_roots": [ "example" ]}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}