---
title: "POST flows/segments_added"
method: POST
path: "flows/segments_added"
---

# POST flows/segments_added

`POST flows/segments_added` (webhook)

## Payload

- object — Notification that new Segments have been added to a Flow.
  - `event_timestamp` string, date-time, required — Timestamp at which the most recent Segment in the timerange was added (and the message generated)
  - `event_type` 'flows/segments_added', required
  - `event` object, required
    - `flow_id` string, required — A Universally Unique Identifier (UUID) as defined in [RFC9562](https://www.rfc-editor.org/rfc/rfc9562)
    - `segments` Flowsegment[], required
      - `object_id` string, required — The object store identifier for the Media Object.
      - `ts_offset` string — A signed nanosecond resolution timestamp represented as "{sign?}{seconds}:{nanoseconds}". The intended interpretation of the value is assumed to be defined elsewhere. E.g. * "1:40000000" is the timestamp of the 27th video frame for 25 Hz video with origin at "0:0". * "1694429247:40000000" is the TAI timestamp for a video frame at 2023-09-11T10:46:50.04Z UTC. Details of the format can be found in the [Timestamps in TAMS](https://github.com/bbc/tams/blob/main/docs/appnotes/0008-timestamps-in-TAMS.md) application note.
      - `timerange` string, required — A timerange of timestamps. It is represented using one or two timestamps with inclusivity and exclusivity markers. E.g. * `[0:0_10:0)` represents 10 seconds of media starting at timestamp `0:0` and ending before `10:0`. * `(5:0_` represents a timerange starting after `5:0` and to eternity. * `_` without timestamps or inclusivity markers represents "eternity" (i.e. the entire timeline). * `()` without timestamps represents "never" (i.e. a range of zero length in no particular position). * `[1694429247:0_1694429248:0)` is a 1 second TAI timerange starting at 2023-09-11T10:46:50.0Z UTC. * `[1694429247:0]` is an instantaneous TAI timerange at 2023-09-11T10:46:50.0Z UTC. This is equivalent to `[1694429247:0_1694429247:0]`. The short syntax is preferred due to ease of identification as instantaneous. Instantaneous TimeRanges cannot use exclusive markers (i.e. `(` or `)`). * A `[` or `]` indicates that bound is inclusive, and a `(` or `)` indicates that bound is exclusive. Details of the format can be found in the [Timestamps in TAMS](https://github.com/bbc/tams/blob/main/docs/appnotes/0008-timestamps-in-TAMS.md) application note.
      - `last_duration` string — A signed nanosecond resolution timestamp represented as "{sign?}{seconds}:{nanoseconds}". The intended interpretation of the value is assumed to be defined elsewhere. E.g. * "1:40000000" is the timestamp of the 27th video frame for 25 Hz video with origin at "0:0". * "1694429247:40000000" is the TAI timestamp for a video frame at 2023-09-11T10:46:50.04Z UTC. Details of the format can be found in the [Timestamps in TAMS](https://github.com/bbc/tams/blob/main/docs/appnotes/0008-timestamps-in-TAMS.md) application note.
      - `object_timerange` string — A timerange of timestamps. It is represented using one or two timestamps with inclusivity and exclusivity markers. E.g. * `[0:0_10:0)` represents 10 seconds of media starting at timestamp `0:0` and ending before `10:0`. * `(5:0_` represents a timerange starting after `5:0` and to eternity. * `_` without timestamps or inclusivity markers represents "eternity" (i.e. the entire timeline). * `()` without timestamps represents "never" (i.e. a range of zero length in no particular position). * `[1694429247:0_1694429248:0)` is a 1 second TAI timerange starting at 2023-09-11T10:46:50.0Z UTC. * `[1694429247:0]` is an instantaneous TAI timerange at 2023-09-11T10:46:50.0Z UTC. This is equivalent to `[1694429247:0_1694429247:0]`. The short syntax is preferred due to ease of identification as instantaneous. Instantaneous TimeRanges cannot use exclusive markers (i.e. `(` or `)`). * A `[` or `]` indicates that bound is inclusive, and a `(` or `)` indicates that bound is exclusive. Details of the format can be found in the [Timestamps in TAMS](https://github.com/bbc/tams/blob/main/docs/appnotes/0008-timestamps-in-TAMS.md) application note.
      - `sample_offset` integer — The start of the Segment represented as a count of samples from the start of the Media Object. Note that a sample is a video frame or audio sample. A (coded) audio frame has multiple audio samples. Assumed to be 0 if not set. DEPRECATED: Use object_timerange instead - see AppNote 0036. Service implementations SHOULD continue to store and return it if set.
      - `sample_count` integer — The count of samples in the Segment (which may be fewer than in the Media Object). The count could be less than expected given the Segment duration and rate if there are gaps. If not set, every sample from sample_offset onwards is used. Note that a sample is a video frame or audio sample. A (coded) audio frame has multiple audio samples. DEPRECATED: Use object_timerange instead - see AppNote 0036. Service implementations SHOULD continue to store and return it if set.
      - `init_object` object — Provides the location and metadata of the files corresponding to a Object.
        - `object_id` string, required — The identifier of the initialisation Object.
        - `get_urls` object[] — A list of URLs to which a GET request can be made to directly retrieve the contents of the Object. This is required by the `http_object_store` Storage Backend type, which is the only one currently described. Clients may choose any URL in the list and treat the content returned as identical, however servers may sort the list such that the preferred URL is first. Storage Backend metadata for controlled URLs should be populated by the TAMS instance based on the Storage Backend the Object instance resides in.
          - `store_type` 'http_object_store' — The generic Storage Backend type. Used to identify the required workflow for reading and writing media. Any `store_product` should be compatible, as much is required for basic interoperability between TAMS implementations, with their associated generic `store_type`.
          - `provider` string — The cloud (or other) provider of the Storage Backend
          - `region` string — The region in the cloud this Storage Backend resides
          - `availability_zone` string — The availability zone in the cloud region this Storage Backend resides. Note that many cloud providers randomize availability zone identifiers such that they are consistent within a cloud account, but not necessarily between accounts. Caution should be exercised when using this parameter.
          - `store_product` string — The storage product name.
          - `tags` Tags — Key is a freeform string. Value is a freeform string, or an array of freeform strings.
          - `storage_id` string — A Universally Unique Identifier (UUID) as defined in [RFC9562](https://www.rfc-editor.org/rfc/rfc9562)
          - `url` string, required — A URL to which a GET request can be made to directly retrieve the contents of the Object. Clients should include credentials if the provide URL is on the same origin as the API endpoint. This URL SHOULD support the inclusion of checksums in headers as supported by advertised Storage Backend product. See AppNote 0048 for more details.
          - `presigned` boolean — If `true`, this URL is pre-signed. If this parameter is unset, the URL is NOT pre-signed. The presigned URL SHALL remain valid for the timeframe advertised in [`min_presigned_url_timeout` at the `/service`](#/operations/GET_service) endpoint, which is subject to a specified minimum (see service endpoint schema).
          - `label` string — Label identifying this URL. If the URL is controlled by the service instance, this is the Storage Backend's label. If the URL is uncontrolled, this is the label provided when a client registered the URL. If the 'label' is not set then this URL can't be filtered for using the 'accept_get_urls' API query parameter.
          - `controlled` boolean — If `true`, this URL is on a Storage Backend controlled by this service instance. If `false`, this URL is uncontrolled and does not have it's lifecycle managed by this instance. If this parameter is unset, assume `true`.
      - `key_frame_count` integer — The number of key frames in the Media Object. This should be set greater than zero when the Media Object contains key frames that serve as a stream access point
      - `get_urls` object[] — A list of URLs to which a GET request can be made to directly retrieve the contents of the Object. This is required by the `http_object_store` Storage Backend type, which is the only one currently described. Clients may choose any URL in the list and treat the content returned as identical, however servers may sort the list such that the preferred URL is first. Storage Backend metadata for controlled URLs should be populated by the TAMS instance based on the Storage Backend the Object instance resides in.
        - `store_type` 'http_object_store' — The generic Storage Backend type. Used to identify the required workflow for reading and writing media. Any `store_product` should be compatible, as much is required for basic interoperability between TAMS implementations, with their associated generic `store_type`.
        - `provider` string — The cloud (or other) provider of the Storage Backend
        - `region` string — The region in the cloud this Storage Backend resides
        - `availability_zone` string — The availability zone in the cloud region this Storage Backend resides. Note that many cloud providers randomize availability zone identifiers such that they are consistent within a cloud account, but not necessarily between accounts. Caution should be exercised when using this parameter.
        - `store_product` string — The storage product name.
        - `tags` Tags — Key is a freeform string. Value is a freeform string, or an array of freeform strings.
        - `storage_id` string — A Universally Unique Identifier (UUID) as defined in [RFC9562](https://www.rfc-editor.org/rfc/rfc9562)
        - `url` string, required — A URL to which a GET request can be made to directly retrieve the contents of the Object. Clients should include credentials if the provide URL is on the same origin as the API endpoint. This URL SHOULD support the inclusion of checksums in headers as supported by advertised Storage Backend product. See AppNote 0048 for more details.
        - `presigned` boolean — If `true`, this URL is pre-signed. If this parameter is unset, the URL is NOT pre-signed. The presigned URL SHALL remain valid for the timeframe advertised in [`min_presigned_url_timeout` at the `/service`](#/operations/GET_service) endpoint, which is subject to a specified minimum (see service endpoint schema).
        - `label` string — Label identifying this URL. If the URL is controlled by the service instance, this is the Storage Backend's label. If the URL is uncontrolled, this is the label provided when a client registered the URL. If the 'label' is not set then this URL can't be filtered for using the 'accept_get_urls' API query parameter.
        - `controlled` boolean — If `true`, this URL is on a Storage Backend controlled by this service instance. If `false`, this URL is uncontrolled and does not have it's lifecycle managed by this instance. If this parameter is unset, assume `true`.

## Acknowledgement `200`

Webhook received successfully

---

[API](https://skmtc.dev/aws-samples/apis/time-addressable-media-store.md) · [All operations](https://skmtc.dev/aws-samples/apis/time-addressable-media-store/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/aws-samples/time-addressable-media-store/revisions/eb3977b33601/schema)
