Update Preset
This endpoint allows you to update an existing preset's details. Only the fields you provide will be modified, while others remain unchanged.
🔹 Endpoint Details
PUT /api/v1/presets/{presetId}
🔒 Authentication
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | Must be application/json |
| Authorization | Yes | Format: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature |
📝 Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| presetId | string | Yes | ID of the preset to update |
📝 Updatable Fields
| Field | Type | Description | Example |
|---|---|---|---|
title | string | Title of the preset | "Updated Streaming Preset" |
description | string | Detailed description | "Enhanced preset for video streaming" |
logo | string | URL to preset logo | "https://example.com/new-logo.png" |
image | string | URL to preset cover image | "https://example.com/new-cover.png" |
assetIds | array of strings | IDs of existing assets | ["123e4567-e89b-12d3-a456-426614174003"] |
assets | array of objects | New assets to create | See example |
products | array of strings | Product identifiers | ["product1", "product2"] |
effectId | string | ID of effect | "effect123" |
🧩 Request Example
curl -X PUT "https://openapi.onlive.site/api/v1/presets/123e4567-e89b-12d3-a456-426614174001" \
-H "Content-Type: application/json" \
-H "Authorization: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature" \
-d '{
"title": "Updated Streaming Preset",
"description": "Enhanced preset for video streaming",
"logo": "https://example.com/new-logo.png",
"image": "https://example.com/new-cover.png",
"assetIds": [
"123e4567-e89b-12d3-a456-426614174003"
],
"assets": [
{
"name": "New Asset",
"app": {
"source": {
"url": "https://example.com/app-source",
"security": "token"
},
"resource": "resource-id",
"args": "app-arguments"
},
"url": "string",
"format": "string",
"description": "string",
"size": 0,
"duration": 0,
"status": "string",
"environment": {},
"coverVideo": {
"id": "string",
"url": "string",
"size": 0,
"format": "string",
"duration": 0
},
"options": {
"usePixelStreaming": true,
"timeout": 0,
"showBooking": true,
"showRegister": true
}
}
],
"products": [
"product1",
"product2"
],
"effectId": "effect123"
}'
📥 Response
Success Response (200 OK)
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier for the preset |
| organizationId | string | Organization ID that owns this preset |
| title | string | The title of the preset |
| description | string | A detailed description of the preset |
| logo | string | URL to the preset logo |
| image | string | URL to the preset cover image |
| assets | array of strings | IDs of multimedia assets associated with this preset |
| products | array of strings | Product identifiers associated with this preset |
| effectId | string | ID of the effect applied to this preset |
| createdAt | string (ISO 8601) | Creation timestamp |
| updatedAt | string (ISO 8601) | Last update timestamp |
Response Example
{
"id": "123e4567-e89b-12d3-a456-426614174001",
"organizationId": "123e4567-e89b-12d3-a456-426614174002",
"title": "Updated Streaming Preset",
"description": "Enhanced preset for video streaming",
"logo": "https://example.com/new-logo.png",
"image": "https://example.com/new-cover.png",
"assets": [
"123e4567-e89b-12d3-a456-426614174003",
"123e4567-e89b-12d3-a456-426614174007"
],
"products": ["product1", "product2"],
"effectId": "effect123",
"createdAt": "2025-05-28T10:15:30Z",
"updatedAt": "2025-05-28T11:22:45Z"
}
❌ Error Responses
This endpoint follows the standard error format.
🔍 Validation Rules
-
Title Validation
- Title must not be empty if provided
- Title must be unique within your organization
- Maximum length is 255 characters
-
Asset Updates
- New asset references must be valid UUIDs
- Assets must be accessible by your organization
- New assets must comply with multimedia format requirements
-
Product Updates
- Product references must be valid
- Products must be accessible by your organization
-
Effect Updates
- Effect ID must reference a valid effect
- Effect must be compatible with the associated assets
✅ Common Use Cases
- 🔄 Configuration Updates: Modify preset settings as requirements change
- 🎮 Effect Changes: Apply different visual effects to preset assets
- 🔗 Product Association: Update linked products for marketing or distribution
- 📝 Metadata Updates: Keep preset descriptions and titles current
- 🖼️ Visual Refresh: Update logos and cover images
💡 Best Practices
-
Update Strategy
- Only include fields that need to be updated
- Test updated presets before deploying to production
-
Asset Management
- Maintain asset relationships when updating presets
- Consider impact on dependent systems when changing assets
-
Documentation
- Document the reason for significant updates
- Keep track of major version changes
- Notify dependent systems about breaking changes
📘 Notes
- Only the fields included in the request will be updated
- Omitted fields retain their current values
- The
updatedAttimestamp is automatically updated - When updating assets, you can add new assets or reference existing ones
- To remove assets, don't include them in the
assetIdsarray - You must have the appropriate permissions to update the preset
- The unique constraint for preset titles is scoped to your organization