Keystone Developers
Open Keystone
API reference

Internal API

Media

8 endpoints.

GET/api/v1/internal/media/businesses

Businesses with >=1 live photo — media-service bulk-backfill enumeration (internal)

Parameters

NameInTypeDescription
cursorquerystring | null
limitqueryintegerdefault 100
x-internal-api-keyheaderstring | null

Responses

200Successful Response
application/jsonInternalMediaBusinessListData
FieldTypeDescription
businessesrequiredInternalMediaBusinessItem[]
InternalMediaBusinessItem[] fields
FieldTypeDescription
business_idrequiredstring
photo_countrequiredinteger
next_cursorstring | null
  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

GET/api/v1/internal/media/businesses/{business_id}/members/{user_id}

Is this heimdal user a member of this business? — media-service tenant check (internal)

Parameters

NameInTypeDescription
business_idrequiredpathstring (uuid)
user_idrequiredpathstring (uuid)
x-internal-api-keyheaderstring | null

Responses

200Successful Response
application/jsonBusinessMembershipData
FieldTypeDescription
business_idrequiredstring (uuid)
user_idrequiredstring (uuid)
is_memberrequiredboolean
  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

GET/api/v1/internal/media/photos

Paged photo list for media-service ingest/backfill/sweep (internal)

Parameters

NameInTypeDescription
business_idrequiredquerystring (uuid)
cursorquerystring | null
limitqueryintegerdefault 100
include_deletedquerybooleandefault false
updated_afterquerystring | null
x-internal-api-keyheaderstring | null

Responses

200Successful Response
application/jsonInternalMediaPhotoListData
FieldTypeDescription
itemsrequiredInternalMediaPhotoItem[]
InternalMediaPhotoItem[] fields
FieldTypeDescription
asset_idrequiredstring
business_idrequiredstring
photo_sourcerequiredstring
public_urlstring | null
storageMediaStorageRef | null
MediaStorageRef fields

MediaStorageRef (not expanded)

externalMediaExternalRef | null
MediaExternalRef fields

MediaExternalRef (not expanded)

mime_typestring | null
width_pxinteger | null
height_pxinteger | null
is_deletedbooleandefault false
created_atstring | null
updated_atstring | null
next_cursorstring | null
  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

GET/api/v1/internal/media/photos/{photo_id}/bytes

Stream one photo's blob (internal); 410 when an external URL expired

Parameters

NameInTypeDescription
photo_idrequiredpathstring (uuid)
x-internal-api-keyheaderstring | null

Responses

200Successful Response
application/jsonany
  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

GET/api/v1/internal/media/photos/{photo_id}/usages

Delete-guard cross-check: modules referencing this photo (internal)

Parameters

NameInTypeDescription
photo_idrequiredpathstring (uuid)
x-internal-api-keyheaderstring | null

Responses

200Successful Response
application/jsonPhotoUsagesData
FieldTypeDescription
asset_idrequiredstring
in_userequiredboolean
usagesrequiredPhotoUsageItem[]
PhotoUsageItem[] fields
FieldTypeDescription
modulerequiredstring
labelrequiredstring
countrequiredinteger
  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

POST/api/v1/internal/media/photos/import-derivative

Write an edited image back as a first-class derived photo (internal)

Parameters

NameInTypeDescription
x-internal-api-keyheaderstring | null

Request bodyrequired

multipart/form-dataBody_import_media_derivative_api_v1_internal_media_photos_import_derivative_post
FieldTypeDescription
filerequiredstring
metarequiredstring

Responses

201Successful Response
application/jsonImportDerivativeData
FieldTypeDescription
asset_idrequiredstring
public_urlstring | null
photo_sourcestringdefault "derived"
  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.