Saltar al contenido principal

Get Presets

This section covers endpoints for retrieving both individual presets and lists of presets.

🔹 Get Single Preset

Retrieve detailed information about a specific preset by its ID.

Endpoint Details

GET /api/v1/presets/{presetId}

🔒 Authentication

HeaderRequiredDescription
Content-TypeYesMust be application/json
AuthorizationYesFormat: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature

Path Parameters

ParameterRequiredDescription
presetIdYesUnique identifier of the preset to retrieve

🧩 Request Example

curl -X GET "https://openapi.onlive.site/api/v1/presets/123e4567-e89b-12d3-a456-426614174001" \
-H "Content-Type: application/json" \
-H "Authorization: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature"

📥 Response Format (HTTP 200)

FieldTypeDescription
idstringUnique identifier for the preset
organizationIdstringOrganization ID that owns this preset
titlestringThe title of the preset
descriptionstringA detailed description of the preset
logostringURL to the preset logo
imagestringURL to the preset cover image
assetsarray of stringsIDs of multimedia assets associated with this preset
productsarray of stringsProduct identifiers associated with this preset
effectIdstringID of the effect applied to this preset
createdAtstring (ISO 8601)Creation timestamp
updatedAtstring (ISO 8601)Last update timestamp

Response Example

{
"id": "123e4567-e89b-12d3-a456-426614174001",
"organizationId": "123e4567-e89b-12d3-a456-426614174002",
"title": "My Custom Preset",
"description": "This preset contains settings for video streaming",
"logo": "https://example.com/logo.png",
"image": "https://example.com/cover.png",
"assets": [
"123e4567-e89b-12d3-a456-426614174003",
"123e4567-e89b-12d3-a456-426614174004"
],
"products": [
"product1",
"product2"
],
"effectId": "effect123",
"createdAt": "2025-05-28T10:15:30Z",
"updatedAt": "2025-05-28T10:15:30Z"
}

❌ Error Responses

400 Bad Request

{
"statusCode": 400,
"message": "Invalid preset ID format"
}

401 Unauthorized

{
"statusCode": 401,
"message": "Unauthorized access",
"error": "Unauthorized"
}

403 Forbidden

{
"statusCode": 403,
"message": "Insufficient permissions to access this preset"
}

404 Not Found

{
"statusCode": 404,
"message": "Preset not found",
"error": "Not Found"
}

🔹 List Presets

Retrieve a paginated list of presets with optional filtering.

Endpoint Details

GET /api/v1/presets

🔒 Authentication

HeaderRequiredDescription
Content-TypeYesMust be application/json
AuthorizationYesFormat: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature

Query Parameters

ParameterTypeRequiredDescriptionDefault
titlestringNoFilter presets by exact title match-
searchstringNoSearch presets by title or description-
pagenumberNoPage number for pagination1
limitnumberNoNumber of items per page10

🧩 Request Example

curl -X GET "https://openapi.onlive.site/api/v1/presets?page=1&limit=10&search=streaming" \
-H "Content-Type: application/json" \
-H "Authorization: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature"

📥 Response Format (HTTP 200)

FieldTypeDescription
itemsarrayArray of preset objects
metaobjectPagination metadata
meta.totalItemsnumberTotal number of items matching the query
meta.itemCountnumberNumber of items in the current page
meta.itemsPerPagenumberNumber of items per page
meta.totalPagesnumberTotal number of pages
meta.currentPagenumberCurrent page number

Response Example

{
"items": [
{
"id": "123e4567-e89b-12d3-a456-426614174001",
"organizationId": "123e4567-e89b-12d3-a456-426614174002",
"title": "My Custom Preset",
"description": "This preset contains settings for video streaming",
"logo": "https://example.com/logo.png",
"image": "https://example.com/cover.png",
"assets": [
"123e4567-e89b-12d3-a456-426614174003",
"123e4567-e89b-12d3-a456-426614174004"
],
"products": ["product1", "product2"],
"effectId": "effect123",
"createdAt": "2025-05-28T10:15:30Z",
"updatedAt": "2025-05-28T10:15:30Z"
},
{
"id": "123e4567-e89b-12d3-a456-426614174005",
"organizationId": "123e4567-e89b-12d3-a456-426614174002",
"title": "Advanced Streaming Preset",
"description": "Preset with advanced streaming capabilities",
"logo": "https://example.com/advanced-logo.png",
"image": "https://example.com/advanced-cover.png",
"assets": [
"123e4567-e89b-12d3-a456-426614174006"
],
"products": ["product3"],
"effectId": "effect456",
"createdAt": "2025-05-27T14:22:10Z",
"updatedAt": "2025-05-27T14:22:10Z"
}
],
"meta": {
"totalItems": 24,
"itemCount": 2,
"itemsPerPage": 10,
"totalPages": 3,
"currentPage": 1
}
}

❌ Error Responses

400 Bad Request

{
"statusCode": 400,
"message": "Invalid pagination parameters",
"errors": [
{
"field": "limit",
"message": "limit cannot exceed 100"
}
]
}

401 Unauthorized

{
"statusCode": 401,
"message": "Unauthorized access",
"error": "Unauthorized"
}

403 Forbidden

{
"statusCode": 403,
"message": "Insufficient permissions to list presets"
}

✅ Common Use Cases

  • 🔍 Preset Discovery: Find presets matching specific criteria
  • 📊 Resource Inventory: List all available presets for an organization
  • 🧩 Integration Planning: Identify presets for integration with other systems
  • 📱 Client Applications: Populate dropdown menus or selection interfaces
  • 🔄 Sync Operations: Keep local caches in sync with server-side presets

💡 Best Practices

  1. Performance Optimization

    • Use pagination for large collections
    • Apply specific filters to reduce result sets
  2. Resource Management

    • Retrieve only the presets you need
  3. Search Implementation

    • Use the search parameter for broad matches
    • Use the title parameter for exact matches
    • Combine parameters for more targeted results

📘 Notes

  • Results are paginated with a default limit of 10 items per page
  • Search is case-insensitive and looks for partial matches in both title and description
  • Sorting is by creation date in descending order (newest first)
  • Query parameters can be combined for more specific filtering
  • Only presets belonging to your organization will be returned