---
title: "POST /api/asrun"
method: POST
path: "/api/asrun"
tags: ["asrun"]
---

# POST /api/asrun

`POST /api/asrun`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Authorization`
  - API key in cookie `sessionid`

A historic log over what was sent through playout.

## Request body

- AsRunRequest: One entry in the playout log: a video or a named programme, and when it went to air.
  - `video` integer, nullable: Points to the Video which was played if there is one. Can be empty if something other than a video was played. The field is mutually exclusive with `programName`.
  - `programName` string: A free form text input saying what was played. If `video` is set, this field should not be set. Examples of where you'd use this field is e.g. when broadcasting live. Defaults to the empty string.
  - `playout` string: The playout this entry corresponds with. This will almost always be 'main' which it defaults to.
  - `playedAt` string, date-time: Time when the playout started. Defaults to now.
  - `inMs` integer: The inpoint where the video/stream was started at. In milliseconds. Normally 0 which it defaults to.
  - `outMs` integer, nullable: The outpoint where the video/stream stopped. This would often be the duration of the video, or how long we live streamed a particular URL. Can be null (None) if this is 'currently happening'.

## Response `201`

- AsRun: One entry in the playout log: a video or a named programme, and when it went to air.
  - `id` integer, required
  - `video` integer, nullable: Points to the Video which was played if there is one. Can be empty if something other than a video was played. The field is mutually exclusive with `programName`.
  - `programName` string: A free form text input saying what was played. If `video` is set, this field should not be set. Examples of where you'd use this field is e.g. when broadcasting live. Defaults to the empty string.
  - `playout` string: The playout this entry corresponds with. This will almost always be 'main' which it defaults to.
  - `playedAt` string, date-time: Time when the playout started. Defaults to now.
  - `inMs` integer: The inpoint where the video/stream was started at. In milliseconds. Normally 0 which it defaults to.
  - `outMs` integer, nullable: The outpoint where the video/stream stopped. This would often be the duration of the video, or how long we live streamed a particular URL. Can be null (None) if this is 'currently happening'.

## Other responses

- `400`
- `401`
- `403`
- `404`
- `405`
- `406`
- `415`
- `500`

## Changes

- **2026-08-19** `2bacf53705f7`: 1 breaking, 1 info
  - api path removed without deprecation
  - endpoint added
- **2026-08-15** `9164f6763019`: 1 info
  - added the non-success response with the status `404`
- **2025-08-17** `14b27b584fd2`: 7 info
  - added the non-success response with the status `400`
  - added the non-success response with the status `401`
  - added the non-success response with the status `403`
  - added the non-success response with the status `405`
  - …3 more
- **2025-07-09** `391b0262e68c`: 2 breaking, 8 warning, 8 info
  - removed the media type `application/x-www-form-urlencoded` from the request body
  - removed the media type `multipart/form-data` from the request body
  - removed the request property `in_ms`
  - removed the request property `out_ms`
  - …14 more
- **2025-05-31** `174284f5fd79`: 8 warning, 10 info
  - removed the request property `inMs`
  - removed the request property `outMs`
  - removed the request property `playedAt`
  - removed the request property `programName`
  - …14 more

[Operation history](https://skmtc.dev/frikanalen/apis/frikanalen-django-api/changes/api/asrun/post.md)

---

[API](https://skmtc.dev/frikanalen/apis/frikanalen-django-api.md) - [All operations](https://skmtc.dev/frikanalen/apis/frikanalen-django-api/llms.txt) - [OpenAPI document](https://skmtc.dev/frikanalen/apis/frikanalen-django-api/revisions/ebd4175e41fe?raw)
