Neavents Media API (v2.1.0)

Download OpenAPI specification:Download

API for handling media objects (images, videos) within the Neavents ecosystem.

Media

Endpoints for managing media objects.

Initiate a media upload

Starts the process for uploading a new media object. This returns a presigned URL that the client should use to upload the file directly to the storage provider.

Request Body schema: application/json

Details of the file to be uploaded.

fileName
required
string
ownerType
required
string

The type of the entity that owns this media. (e.g., 'Venue', 'User')

mediaType
required
string (MediaType)
Enum: "Image" "Video" "Document"
imageType
string or null (ImageType)
Enum: "Jpeg" "Png" "Tiff" "Webp"
videoType
string or null (VideoType)
Enum: "Mp4" "Mpeg" "Webm"

Responses

Request samples

Content type
application/json
{
  • "fileName": "beyoglu-cafe-entrance.jpg",
  • "ownerType": "Venue",
  • "mediaType": "Image",
  • "imageType": "Jpeg",
  • "videoType": "Mp4"
}

Response samples

Content type
application/json
{}

Get media objects by owner

Retrieves a list of all media objects associated with a specific owner entity (e.g., a user, a venue).

query Parameters
OwnerId
required
string <ulid>

The unique ULID of the owning entity.

RootAggregateType
required
string
Example: RootAggregateType=Venue

The type of the owner entity (e.g., 'Venue', 'User').

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get a specific media object

Retrieves the full details of a single media object by its ULID.

path Parameters
mediaId
required
string <ulid>
Example: 01J4Z4Q4Z4Q4Z4Q4Z4Q4Z4Q4Z4

The unique ULID of the media object.

Responses

Response samples

Content type
application/json
{
  • "mediaObjectId": "string",
  • "type": "Image",
  • "status": "Uploading",
  • "ownerUserId": "string",
  • "originalFileName": "string",
  • "mimeType": "image/jpeg",
  • "fileSizeInBytes": 0,
  • "storageProvider": "BlackblazeB2",
  • "bucketName": "string",
  • "objectKey": "string",
  • "metadata": {
    },
  • "cdnUrl": "http://example.com",
  • "cachePolicy": "Default"
}

Remove a media object

Permanently deletes a media object from the system and storage.

path Parameters
mediaId
required
string <ulid>
Example: 01J4Z4Q4Z4Q4Z4Q4Z4Q4Z4Q4Z4

The unique ULID of the media object.

Responses

Update media object details

Updates the core properties of a media object, such as its filename or storage location. Use this for administrative changes.

path Parameters
mediaId
required
string <ulid>

The unique ULID of the media object to update.

Request Body schema: application/json

The details to update. Only include the fields you want to change.

originalFileName
string or null
fileSizeInBytes
integer or null <int64>
storageProvider
string or null (StorageProvider)
Enum: "BlackblazeB2" "AwsS3" "AzureBlob"
bucketName
string or null
objectKey
string or null
cdnUrl
string or null <uri>
cdnCachePolicy
string or null (CdnCachePolicy)
Enum: "Default" "Short" "Medium" "Long" "Never"

Responses

Request samples

Content type
application/json
{
  • "originalFileName": "string",
  • "fileSizeInBytes": 0,
  • "storageProvider": "BlackblazeB2",
  • "bucketName": "string",
  • "objectKey": "string",
  • "cdnUrl": "http://example.com",
  • "cdnCachePolicy": "Default"
}

Update media object metadata

Updates the descriptive metadata for a media object, such as alt text, caption, or dimensions.

path Parameters
mediaId
required
string <ulid>

The unique ULID of the media object to update.

Request Body schema: application/json

The metadata to update. Only include the fields you want to change.

altText
string or null

Descriptive text for accessibility (screen readers).

caption
string or null

A caption to be displayed with the media.

object or null (Dimensions)
durationInSeconds
integer or null

The duration of the video in seconds.

tags
Array of strings or null

A list of tags associated with the media.

primaryAverageColor
string or null

The dominant color of the image, as a hex string.

secondaryAverageColor
string or null

The second most dominant color of the image, as a hex string.

leastAverageColor
string or null

The least dominant color of the image, as a hex string.

oppositeAverageColor
string or null

A contrasting color to the primary color, as a hex string.

Responses

Request samples

Content type
application/json
{
  • "altText": "string",
  • "caption": "string",
  • "dimensions": {
    },
  • "durationInSeconds": 0,
  • "tags": [
    ],
  • "primaryAverageColor": "#3a6a8a",
  • "secondaryAverageColor": "#a4c2d8",
  • "leastAverageColor": "#f0f0f0",
  • "oppositeAverageColor": "#c59575"
}