{"openapi":"3.1.0","info":{"title":"Image Portal Search API","description":"API for searching images in the Image Portal","version":"1.0.0"},"servers":[{"url":"https://search.api.im.test.ntb.dev","description":"Server URL in Test environment"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Media Search","description":"Search for media in the Image Portal"},{"name":"Media Download","description":"Download media in the Image Portal"},{"name":"Frontpage Layout","description":"Manage the frontpage layout configuration per tenant"}],"paths":{"/api/v1/album/{albumId}":{"get":{"tags":["Album"],"summary":"Get an album in the Image Portal","description":"Get album using album ID.","operationId":"getAlbum","parameters":[{"name":"albumId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlbumMediaResponse"}}}}}},"put":{"tags":["Album"],"summary":"Update an album in the Image Portal","description":"Update album using album ID.","operationId":"updateAlbum","parameters":[{"name":"albumId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlbumRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlbumMediaResponse"}}}}}},"delete":{"tags":["Album"],"summary":"Delete an album in the Image Portal","description":"Delete album using album ID.","operationId":"deleteAlbum","parameters":[{"name":"albumId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}}}}},"/api/v1/frontpage-layout":{"get":{"tags":["Frontpage Layout"],"summary":"Get active frontpage layout (public)","description":"Returns the active frontpage layout config for the tenant that owns the requesting domain. No authentication is required.","operationId":"getActiveLayout","responses":{"400":{"description":"Origin header is missing or cannot be parsed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No tenant or no active layout found for the requesting domain","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Active layout returned successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseFrontpageLayoutResponse"}}}}}},"post":{"tags":["Frontpage Layout"],"summary":"Save frontpage layout configuration","description":"Stores a new frontpage layout JSON config for the authenticated user's tenant. The new config becomes the sole active layout; all previous configs are deactivated.","operationId":"saveLayout","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrontpageLayoutRequest"}}},"required":true},"responses":{"400":{"description":"Invalid request body, or the authenticated user carries no tenant","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Authorization failed – the principal is not a portal user, or the tenant could not be resolved","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Layout saved and activated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseFrontpageLayoutResponse"}}}}}}},"/api/v1/album":{"post":{"tags":["Album"],"summary":"Create an album in the Image Portal","description":"Create album using album name.","operationId":"createAlbum","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlbumRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlbumMediaResponse"}}}}}}},"/api/v1/album/{sourceAlbumId}/media/move":{"post":{"tags":["Album"],"summary":"Move media from one album to another in the Image Portal","description":"Move media from one album to another using album ID.","operationId":"moveMedia","parameters":[{"name":"sourceAlbumId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlbumMediaOperationRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlbumMediaOperationResponse"}}}}}}},"/api/v1/album/{sourceAlbumId}/media/copy":{"post":{"tags":["Album"],"summary":"Copy media from one album to another in the Image Portal","description":"Copy media from one album to another using album ID.","operationId":"copyMedia","parameters":[{"name":"sourceAlbumId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlbumMediaOperationRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlbumMediaOperationResponse"}}}}}}},"/api/v1/album/{albumId}/media/remove":{"post":{"tags":["Album"],"summary":"Remove media from an album in the Image Portal","description":"Remove media from album using album ID.","operationId":"removeMediaFromAlbum","parameters":[{"name":"albumId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlbumMediaRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlbumMediaOperationResponse"}}}}}}},"/api/v1/album/{albumId}/media/add":{"post":{"tags":["Album"],"summary":"Add media to an album in the Image Portal","description":"Add media to album using album ID.","operationId":"addMediaToAlbum","parameters":[{"name":"albumId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlbumMediaRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlbumMediaOperationResponse"}}}}}}},"/lang-version":{"get":{"tags":["search-application"],"operationId":"getLangVersion","responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/api/v1/media/{mediaId}":{"get":{"tags":["Media Search"],"summary":"Get media by ID","description":"Get media by ID from the Image Portal.","operationId":"getMedia","parameters":[{"name":"mediaId","in":"path","required":true,"schema":{"type":"string"}},{"name":"archive","in":"query","description":"Media archive","required":false,"schema":{"type":"string","default":"sdl","enum":["sdl","shutterStock"]}},{"name":"mediaType","in":"query","description":"Media type","required":true,"schema":{"type":"string","enum":["image","video"]}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponseMediaObject"}}}}}}},"/api/v1/media/search":{"get":{"tags":["Media Search"],"summary":"Search for media in the Image Portal","description":"Search for media in the Image Portal using the provided search criteria.","operationId":"searchMedia","parameters":[{"name":"archive","in":"query","description":"Media archive to search. Default is sdl.","required":true,"schema":{"type":"string","enum":["sdl","shutterStock"]},"example":"sdl"},{"name":"mediaFamily","in":"query","description":"Media family to search for. Default is editorial.","required":true,"schema":{"type":"string","enum":["editorial","creative"]},"example":"editorial"},{"name":"mediaType","in":"query","description":"Media type to search for. Default is image.","required":true,"schema":{"type":"string","enum":["all","image","video"]},"example":"image"},{"name":"searchString","in":"query","description":"Search query","required":false,"schema":{"type":"string"},"example":"oslo"},{"name":"offset","in":"query","description":"Start results from this point which you want to start showing the search results","required":false,"schema":{"type":"integer","format":"int32","minimum":0},"example":0},{"name":"searchSize","in":"query","description":"Number of search results to return. Default is 50. Max is 200.","required":true,"schema":{"type":"integer","format":"int32","maximum":200,"minimum":0},"example":50},{"name":"searchAfter","in":"query","description":"View results after this point of the list","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"giveAggregation","in":"query","description":"Give aggregation result. Default is false.","required":false,"schema":{"type":"boolean"}},{"name":"sortField","in":"query","description":"SortField is the sort options available for the search result. Default is relevance.","required":false,"schema":{"type":"string","enum":["relevance","dateArchived","dateCreated"]},"example":"relevance"},{"name":"sortFieldOrder","in":"query","description":"SortFieldOrder can be set with sortField option. Default is descending.","required":false,"schema":{"type":"string","enum":["asc","desc"]},"example":"desc"},{"name":"orientation","in":"query","description":"Orientation can be set with sortField option. Default is descending.","required":false,"schema":{"type":"string","enum":["portrait","landscape","square"]},"example":"landscape"},{"name":"dateField","in":"query","description":"Date field name used for date range filter. Default is dateArchived. Shutterstock only accept dateArchived.","required":false,"schema":{"type":"string","enum":["dateArchived","dateCreated"]},"example":"dateArchived"},{"name":"startDate","in":"query","description":"Start date for date range filter. Format is yyyy-MM-dd","required":false,"schema":{"type":"string","format":"date"},"example":"2022-05-01"},{"name":"endDate","in":"query","description":"End date for date range filter. Format is yyyy-MM-dd","required":false,"schema":{"type":"string","format":"date"},"example":"2023-05-01"},{"name":"distributor","in":"query","description":"Distributor name for filtering out search result.","required":false,"schema":{"type":"string"},"example":"NTB"}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}}}}},"/api/v1/media/download/{mediaId}":{"get":{"tags":["Media Download"],"summary":"Download media by ID","description":"Download media by ID from the Image Portal.","operationId":"downloadSingle","parameters":[{"name":"mediaId","in":"path","description":"Media ID","required":true,"schema":{"type":"string"},"example":"04HGmnXGYPY"},{"name":"archive","in":"query","description":"Media archive","required":false,"schema":{"type":"string","default":"sdl","enum":["sdl","shutterStock"]}},{"name":"mediaType","in":"query","description":"Media type","required":true,"schema":{"type":"string","enum":["image","video"]}},{"name":"customerGroupId","in":"query","description":"Customer group id","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"licenseId","in":"query","description":"License the user picked","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK"}}}},"/api/v1/album/{albumId}/media":{"get":{"tags":["Album"],"summary":"Fetch media from an album","description":"Fetch media from album using album ID.","operationId":"fetchMediaFromAlbum","parameters":[{"name":"albumId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0,"minimum":0}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":50,"maximum":100,"minimum":1}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlbumMediaResponse"}}}}}}},"/api/v1/album/search":{"get":{"tags":["Album"],"summary":"Search for albums in the Image Portal","description":"Search for albums in the Image Portal using the provided search criteria.","operationId":"searchAlbum","parameters":[{"name":"query","in":"query","description":"The search query for searching albums.","required":false,"schema":{"type":"string"},"example":"Photography Fest 2024"},{"name":"offset","in":"query","description":"Search offset.","required":false,"schema":{"type":"integer","format":"int32"},"example":0},{"name":"limit","in":"query","description":"Size of the album list sent in each request.","required":false,"schema":{"type":"integer","format":"int32"},"example":20},{"name":"sort","in":"query","description":"Sort field must be one of the following: isPinned, name, type, created, updated","required":false,"schema":{"type":"string","pattern":"^isPinned$|^name$|^type$|^created$|^updated$"},"example":"isPinned"},{"name":"sortOrder","in":"query","description":"Sort order for the search results.","required":false,"schema":{"type":"string","enum":["asc","desc"]},"example":"asc"}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlbumSearchResult"}}}}}}}},"components":{"schemas":{"APIFieldError":{"type":"object","properties":{"fieldName":{"type":"string"},"fieldError":{"type":"string"}}},"APIMeta":{"type":"object","properties":{"description":{"type":"string"},"version":{"type":"string"}}},"APIStatusError":{"type":"object","properties":{"message":{"type":"string"},"statusCode":{"type":"integer","format":"int32"},"timestamp":{"type":"string"},"path":{"type":"string"},"success":{"type":"boolean"},"apiFieldErrors":{"type":"array","items":{"$ref":"#/components/schemas/APIFieldError"},"uniqueItems":true}}},"ErrorResponse":{"type":"object","properties":{"_status":{"$ref":"#/components/schemas/APIStatusError"},"_meta":{"$ref":"#/components/schemas/APIMeta"}}},"AlbumRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the album","example":"My album","minLength":1},"description":{"type":"string","description":"The description of the album","example":"My album description"}},"required":["name"]},"APIStatus":{"type":"object","properties":{"timestamp":{"type":"string"},"transactionId":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"integer","format":"int32"},"success":{"type":"boolean"}}},"AlbumMediaData":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"size":{"type":"integer","format":"int64"},"type":{"type":"string","enum":["album","collection"]},"isPinned":{"type":"boolean"},"data":{"type":"object","additionalProperties":{}},"coverPhotos":{"type":"array","items":{"type":"string"}},"mediaAccess":{"type":"array","items":{"type":"string","enum":["read","write","download"]}},"collectionAccess":{"type":"array","items":{"type":"string","enum":["read","write","delete","add","remove"]}},"created":{"type":"string","format":"date-time"},"updated":{"type":"string","format":"date-time"},"mediaItems":{"type":"array","items":{"$ref":"#/components/schemas/MediaObject"}}}},"AlbumMediaResponse":{"type":"object","properties":{"message":{"type":"string","writeOnly":true},"_meta":{"$ref":"#/components/schemas/APIMeta"},"_status":{"$ref":"#/components/schemas/APIStatus"},"_page":{"$ref":"#/components/schemas/Page"},"_data":{"$ref":"#/components/schemas/AlbumMediaData"}}},"Asset":{"type":"object","properties":{"fileType":{"type":"string"},"size":{"$ref":"#/components/schemas/Size"},"fileSize":{"type":"integer","format":"int64"},"mimeType":{"type":"string"},"duration":{"type":"integer","format":"int64"}}},"MediaObject":{"type":"object","properties":{"id":{"type":"string"},"mediaFamily":{"type":"string"},"mediaType":{"type":"string"},"archive":{"type":"string","enum":["sdl","shutterStock"]},"dateArchived":{"type":"string","format":"date-time"},"dateCreated":{"type":"string","format":"date-time"},"headline":{"type":"string"},"description":{"type":"string"},"credit":{"type":"string"},"creator":{"type":"string"},"assets":{"type":"array","items":{"$ref":"#/components/schemas/Asset"},"uniqueItems":true},"distributorName":{"type":"string"},"distributorId":{"type":"string"},"sdlDistributorId":{"type":"integer","format":"int32"},"city":{"type":"string"},"countryName":{"type":"string"},"provinceState":{"type":"string"},"keywords":{"type":"array","items":{"type":"string"},"uniqueItems":true},"datePosted":{"type":"string","format":"date-time"},"owner":{"type":"string"},"category":{"type":"string"},"locationShown":{"type":"array","items":{"type":"string"}},"terms":{"type":"array","items":{"type":"string"}},"persons":{"type":"array","items":{"type":"string"}},"organisations":{"type":"array","items":{"type":"string"}},"events":{"type":"array","items":{"type":"string"}},"jobid":{"type":"string"},"source":{"type":"string"},"instructions":{"type":"string"},"supplementalCategory":{"type":"string"},"supplier":{"type":"string"},"rating":{"type":"number","format":"double"},"usageTerms":{"type":"string"},"imageSupplierImageId":{"type":"string"},"originalFilename":{"type":"string"},"title":{"type":"string"},"orientation":{"type":"string","enum":["portrait","landscape","square"]},"systemInstruction":{"type":"array","items":{"type":"string"}},"previews":{"type":"array","items":{"$ref":"#/components/schemas/Preview"},"uniqueItems":true}}},"Page":{"type":"object","properties":{"offset":{"type":"integer","format":"int32"},"limit":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int64"},"searchAfter":{"type":"array","items":{"type":"string"}}}},"Preview":{"type":"object","properties":{"url":{"type":"string"},"type":{"type":"string","enum":["PREVIEW_256","PREVIEW_512","PREVIEW_1024","VIDEO_PREVIEW_256","VIDEO_PREVIEW_512","HIGHRES_1","VIDEO_HD","VIDEO_SD","VIDEO_4k","VIDEO_WEB","SMALL_JPG","MEDIUM_JPG","HUGE_JPG"]},"width":{"type":"integer","format":"int32"},"height":{"type":"integer","format":"int32"}}},"Size":{"type":"object","properties":{"width":{"type":"integer","format":"int32"},"height":{"type":"integer","format":"int32"}}},"FrontpageLayoutRequest":{"type":"object","properties":{"layoutConfig":{"$ref":"#/components/schemas/JsonNode","description":"The JSON configuration object for the frontpage layout","example":{"sections":[{"type":"hero","items":[]}]}}},"required":["layoutConfig"]},"JsonNode":{"type":"object","properties":{"empty":{"type":"boolean"},"array":{"type":"boolean"},"null":{"type":"boolean"},"object":{"type":"boolean"},"float":{"type":"boolean"},"missingNode":{"type":"boolean"},"nodeType":{"type":"string","enum":["ARRAY","BINARY","BOOLEAN","MISSING","NULL","NUMBER","OBJECT","POJO","STRING"]},"string":{"type":"boolean"},"integralNumber":{"type":"boolean"},"pojo":{"type":"boolean"},"floatingPointNumber":{"type":"boolean"},"short":{"type":"boolean"},"int":{"type":"boolean"},"long":{"type":"boolean"},"double":{"type":"boolean"},"bigDecimal":{"type":"boolean"},"bigInteger":{"type":"boolean"},"textual":{"type":"boolean","deprecated":true},"boolean":{"type":"boolean"},"binary":{"type":"boolean"},"valueNode":{"type":"boolean"},"container":{"type":"boolean"},"number":{"type":"boolean"},"embeddedValue":{"type":"boolean"}}},"FrontpageLayoutResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"layoutConfig":{"$ref":"#/components/schemas/JsonNode"},"active":{"type":"boolean"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"GetResponseFrontpageLayoutResponse":{"type":"object","properties":{"_meta":{"$ref":"#/components/schemas/Meta"},"_data":{"$ref":"#/components/schemas/FrontpageLayoutResponse"}}},"Meta":{"type":"object","properties":{"description":{"type":"string"},"version":{"type":"string"}}},"AlbumMediaOperationRequest":{"type":"object","properties":{"mediaIds":{"type":"array","description":"Media IDs","example":["YCy3KLE98g8","8ubceqGckYw"],"items":{"type":"string"},"minItems":1},"assetData":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AssetData"},"description":"Map of asset data associated with the media IDs.","example":{"YCy3KLE98g8":{"mediaArchive":"sdl","mediaType":"image","mediaFamily":"editorial"},"8ubceqGckYw":{"mediaArchive":"shutterStock","mediaType":"video","mediaFamily":"creative"}}},"destinationAlbumId":{"type":"integer","format":"int32","description":"Destination album ID","example":27886,"minimum":1}},"required":["mediaIds"]},"AssetData":{"type":"object","properties":{"mediaArchive":{"type":"string","enum":["sdl","shutterStock"]},"mediaType":{"type":"string"},"mediaFamily":{"type":"string","enum":["editorial","creative"]}}},"AlbumMediaOperationResponse":{"type":"object","properties":{"message":{"type":"string","writeOnly":true},"_meta":{"$ref":"#/components/schemas/APIMeta"},"_status":{"$ref":"#/components/schemas/APIStatus"},"_data":{"type":"object","additionalProperties":{"type":"string","enum":["SUCCESS","ALREADY_EXISTS","NOT_FOUND_IN_ARCHIVE","FAILED"]}}}},"AlbumMediaRequest":{"type":"object","properties":{"mediaIds":{"type":"array","description":"Media IDs","example":["YCy3KLE98g8","8ubceqGckYw"],"items":{"type":"string"},"minItems":1},"assetData":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AssetData"},"description":"Map of asset data associated with the media IDs.","example":{"YCy3KLE98g8":{"mediaArchive":"sdl","mediaType":"image","mediaFamily":"editorial"},"8ubceqGckYw":{"mediaArchive":"shutterStock","mediaType":"video","mediaFamily":"creative"}}}},"required":["mediaIds"]},"GetResponseMediaObject":{"type":"object","properties":{"_meta":{"$ref":"#/components/schemas/Meta"},"_data":{"$ref":"#/components/schemas/MediaObject"}}},"Aggregation":{"type":"object","properties":{"name":{"type":"string"},"values":{"type":"array","items":{"$ref":"#/components/schemas/Bucket"}}}},"Bucket":{"type":"object","properties":{"value":{"type":"string"},"count":{"type":"integer","format":"int64"}}},"SearchResponse":{"type":"object","properties":{"message":{"type":"string","writeOnly":true},"_meta":{"$ref":"#/components/schemas/APIMeta"},"_status":{"$ref":"#/components/schemas/APIStatus"},"_page":{"$ref":"#/components/schemas/Page"},"_data":{"type":"array","items":{"$ref":"#/components/schemas/MediaObject"}},"_aggregations":{"type":"array","items":{"$ref":"#/components/schemas/Aggregation"}}}},"AlbumSearchResult":{"type":"object","properties":{"message":{"type":"string","writeOnly":true},"_meta":{"$ref":"#/components/schemas/APIMeta"},"_status":{"$ref":"#/components/schemas/APIStatus"},"_page":{"$ref":"#/components/schemas/Page"},"_data":{"type":"array","items":{"$ref":"#/components/schemas/CollectionDetails"}}}},"CollectionDetails":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"size":{"type":"integer","format":"int64"},"type":{"type":"string","enum":["album","collection"]},"isPinned":{"type":"boolean"},"data":{"type":"object","additionalProperties":{}},"coverPhotos":{"type":"array","items":{"type":"string"}},"mediaAccess":{"type":"array","items":{"type":"string","enum":["read","write","download"]}},"collectionAccess":{"type":"array","items":{"type":"string","enum":["read","write","delete","add","remove"]}},"created":{"type":"string","format":"date-time"},"updated":{"type":"string","format":"date-time"}}},"APIResponse":{"type":"object","properties":{"message":{"type":"string","writeOnly":true},"_meta":{"$ref":"#/components/schemas/APIMeta"},"_status":{"$ref":"#/components/schemas/APIStatus"}}}},"securitySchemes":{"bearerAuth":{"type":"http","name":"Authorization","in":"header","scheme":"bearer","bearerFormat":"JWT"}}}}