Getting Started
The Continue Watching Service is an open source REST API that tracks the watch position for users across an OTT or video-on-demand platform. Built on Redis-compatible storage, it records what a user was watching and at what position, so your application can offer a seamless "resume from where you left off" experience. Available as an open web service in Eyevinn Open Source Cloud.
Prerequisites
- If you have not already done so, sign up for an Eyevinn OSC account
Step 1: Create a Valkey instance
The Continue Watching Service uses a Redis-compatible store (Valkey) to persist watch state. Navigate to the Valkey service in the Eyevinn OSC web console. Click Create valkey, enter a name (e.g. continuestore), and click Create. Wait for the instance status to turn green.
Once running, open the instance and note the External IP and External Port.
Step 2: Create the Continue Watching Service instance
Navigate to the Continue Watching Service. Click Create continue-watching-api and fill in:
- Name: a name for your instance (alphanumeric only, e.g.
mywatchtracker) - RedisHost: the external IP of your Valkey instance
- RedisPort: the external port (optional — defaults to
6379)
Leave RedisUsername and RedisPassword empty unless your Valkey instance has authentication configured.
Click Create and wait for the instance to reach running status.
Step 3: Use the API
The service exposes a simple REST API. Your application POSTs a watch event when a user pauses or navigates away, and GETs the last position when a user returns to content.
Record a watch position
curl -X PUT https://<your-instance-url>/api/v1/users/<userId>/progress/<contentId> \
-H "Content-Type: application/json" \
-d '{"position": 1234}'
userId— unique identifier for the usercontentId— unique identifier for the content item (e.g. episode ID)position— playback position in seconds
Retrieve the last watch position
curl https://<your-instance-url>/api/v1/users/<userId>/progress/<contentId>
Example response:
{
"userId": "user-abc",
"contentId": "episode-42",
"position": 1234
}
List all watched content for a user
curl https://<your-instance-url>/api/v1/users/<userId>/progress
Returns a list of all content items the user has watched with their last recorded positions.
Using the CLI
# Create a Valkey instance
osc create valkey-io-valkey continuestore
# Get the Valkey instance details to find the host and port
osc describe valkey-io-valkey continuestore
# Create the Continue Watching Service
osc create eyevinn-continue-watching-api mywatchtracker \
-o RedisHost="<external-ip>" \
-o RedisPort="<external-port>"
Resources
- Continue Watching API on GitHub
- Valkey — Redis-compatible storage used by this service