Amazon MediaTailor Mediatailor Function API

The Mediatailor Function API from Amazon MediaTailor — 1 operation(s) for mediatailor function.

Operations 4

PUT /function/{FunctionId} Put Function #
GET /function/{FunctionId} Get Function #
DELETE /function/{FunctionId} Delete Function #
GET /functions List Functions #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/amazon-mediatailor:amazon-mediatailor-function-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

amazon-mediatailor-function-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: AWS MediaTailor Function API
  version: '2018-04-23'
  description: Generated from AWS's published Smithy model for AWS MediaTailor. 4 operation(s).
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    identifier: Apache-2.0
    url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://api.mediatailor.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
tags:
- name: Function
paths:
  /function/{FunctionId}:
    put:
      operationId: PutFunction
      summary: Put Function
      description: Creates or updates a function. A function defines reusable logic that MediaTailor executes at lifecycle hooks during ad insertion. For more information about functions, see Working with functions in the MediaTailor User Guide.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PutFunctionResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PutFunctionRequest'
      tags:
      - Function
    get:
      operationId: GetFunction
      summary: Get Function
      description: Retrieves the configuration and metadata for a function. For more information about functions, see Working with functions in the MediaTailor User Guide.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetFunctionResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetFunctionRequest'
      tags:
      - Function
    delete:
      operationId: DeleteFunction
      summary: Delete Function
      description: Deletes a function. MediaTailor prevents deletion of a function that is still referenced by a playback configuration or by another function. Remove all references before deleting. For more information about functions, see Working with functions in the MediaTailor User Guide.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteFunctionResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteFunctionRequest'
      tags:
      - Function
  /functions:
    get:
      operationId: ListFunctions
      summary: List Functions
      description: Retrieves all functions associated with your AWS account in the current Region. For more information about functions, see Working with functions in the MediaTailor User Guide.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListFunctionsResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListFunctionsRequest'
      tags:
      - Function
components:
  schemas:
    CustomOutputConfiguration:
      type: object
      properties:
        Runtime:
          type: string
          enum:
          - JSONATA
          description: The expression language used to evaluate expressions in the function configuration. Set this to JSONata.
        Output:
          type: object
          additionalProperties:
            type: string
          description: A map of output bindings. Each key is a namespaced output path (such as player_params.device_type or temp.variant), and each value is an expression that MediaTailor evaluates at runtime against the current session state. For more information about expression syntax, see JSONata expression reference in the MediaTailor User Guide.
      required:
      - Runtime
    PutFunctionRequest:
      type: object
      properties:
        FunctionId:
          type: string
          description: The identifier of the function. The identifier must be unique within your account.
        FunctionType:
          type: string
          enum:
          - HTTP_REQUEST
          - AWS_SERVICE_REQUEST
          - CUSTOM_OUTPUT
          - CONCURRENT_EXECUTOR
          - SEQUENTIAL_EXECUTOR
          - VAST_REQUEST
          description: 'The type of the function, which determines what the function can do at runtime. Valid values: CUSTOM_OUTPUT – Evaluates expressions and produces output bindings with no external calls. HTTP_REQUEST – Makes an HTTP call to an external service and evaluates output expressions that can reference the response. AWS_SERVICE_REQUEST – Makes an authenticated request to a supported AWS service API and evaluates output expressions that can reference the response. VAST_REQUEST – Calls a VAST endpoint, parses the response as VAST, and makes the parsed ads available to output expressions. SEQUENTIAL_EXECUT'
        Description:
          type: string
          description: A description of the function.
        HttpRequestConfiguration:
          $ref: '#/components/schemas/HttpRequestConfiguration'
        AwsServiceRequestConfiguration:
          $ref: '#/components/schemas/AwsServiceRequestConfiguration'
        CustomOutputConfiguration:
          $ref: '#/components/schemas/CustomOutputConfiguration'
        ConcurrentExecutorConfiguration:
          $ref: '#/components/schemas/ConcurrentExecutorConfiguration'
        SequentialExecutorConfiguration:
          $ref: '#/components/schemas/SequentialExecutorConfiguration'
        VastRequestConfiguration:
          $ref: '#/components/schemas/VastRequestConfiguration'
        Tags:
          type: object
          additionalProperties:
            type: string
          description: The tags to assign to the function. Tags are key-value pairs that you can associate with Amazon resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor Resources.
      required:
      - FunctionId
      - FunctionType
    AwsServiceRequestConfiguration:
      type: object
      properties:
        Runtime:
          type: string
          enum:
          - JSONATA
          description: The expression language used to evaluate expressions in the function configuration. The only supported value is JSONata.
        Output:
          type: object
          additionalProperties:
            type: string
          description: A map of output bindings. Each key is a namespaced output path, such as player_params.device_type. Each value is an expression that MediaTailor evaluates at runtime and can reference the response object from the target service. For more information, see JSONata expression reference in the MediaTailor User Guide.
        MethodType:
          type: string
          enum:
          - GET
          - POST
          description: 'Specifies how the function sends the request to the target service. The value must match what the target service operation requires. Valid values: GET – Retrieves data from the target service. POST – Submits a request body to the target service.'
        RequestTimeoutMilliseconds:
          type: integer
          description: 'The maximum time, in milliseconds, that MediaTailor waits for a response from the AWS service. If the call exceeds this timeout, MediaTailor sets the response status code to null and proceeds with output expression evaluation. Valid values: 100 to 2000.'
        Url:
          type: string
          description: An expression that evaluates to the endpoint URL for the target AWS service API operation. Use {%...%} delimiters for dynamic expressions. The URL must correspond to a valid endpoint for the service specified in TargetService. The maximum length after evaluation is 2,048 characters.
        Body:
          type: string
          description: An expression that evaluates to the request body for the AWS service API call. The body must conform to the input format that the target service operation expects. Applies only when the target operation accepts a request body. The maximum size after evaluation is 64 KB.
        Headers:
          type: object
          additionalProperties:
            type: string
          description: A map of HTTP header names to expression values. MediaTailor evaluates each header value expression at runtime and includes the result in the outbound request to the AWS service. Use this to pass any headers required by the target service operation. You can include a maximum of 50 headers.
        Cache:
          $ref: '#/components/schemas/HttpRequestCacheConfiguration'
        TargetService:
          type: string
          description: 'The AWS service to call. Valid value: elemental-inference (AWS Elemental Inference).'
        TargetRegion:
          type: string
          description: The AWS Region for the target service. Specify a static Region code (for example, us-east-1) or a JSONata expression that resolves to a Region code at runtime (for example, {%inference.region%}).
      required:
      - Runtime
      - MethodType
      - RequestTimeoutMilliseconds
      - Url
      - TargetService
      - TargetRegion
    GetFunctionResponse:
      type: object
      properties:
        FunctionId:
          type: string
          description: The identifier of the function.
        FunctionType:
          type: string
          enum:
          - HTTP_REQUEST
          - AWS_SERVICE_REQUEST
          - CUSTOM_OUTPUT
          - CONCURRENT_EXECUTOR
          - SEQUENTIAL_EXECUTOR
          - VAST_REQUEST
          description: The type of the function.
        Description:
          type: string
          description: A description of the function.
        HttpRequestConfiguration:
          $ref: '#/components/schemas/HttpRequestConfiguration'
        AwsServiceRequestConfiguration:
          $ref: '#/components/schemas/AwsServiceRequestConfiguration'
        CustomOutputConfiguration:
          $ref: '#/components/schemas/CustomOutputConfiguration'
        ConcurrentExecutorConfiguration:
          $ref: '#/components/schemas/ConcurrentExecutorConfiguration'
        SequentialExecutorConfiguration:
          $ref: '#/components/schemas/SequentialExecutorConfiguration'
        VastRequestConfiguration:
          $ref: '#/components/schemas/VastRequestConfiguration'
        Tags:
          type: object
          additionalProperties:
            type: string
          description: The tags assigned to the function. Tags are key-value pairs that you can associate with Amazon resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor Resources.
        Arn:
          type: string
          description: The Amazon Resource Name (ARN) of the function.
      required:
      - FunctionId
      - FunctionType
    Function:
      type: object
      properties:
        FunctionId:
          type: string
          description: The identifier of the function.
        FunctionType:
          type: string
          enum:
          - HTTP_REQUEST
          - AWS_SERVICE_REQUEST
          - CUSTOM_OUTPUT
          - CONCURRENT_EXECUTOR
          - SEQUENTIAL_EXECUTOR
          - VAST_REQUEST
          description: The type of the function.
        Description:
          type: string
          description: A description of the function.
        HttpRequestConfiguration:
          $ref: '#/components/schemas/HttpRequestConfiguration'
        AwsServiceRequestConfiguration:
          $ref: '#/components/schemas/AwsServiceRequestConfiguration'
        CustomOutputConfiguration:
          $ref: '#/components/schemas/CustomOutputConfiguration'
        ConcurrentExecutorConfiguration:
          $ref: '#/components/schemas/ConcurrentExecutorConfiguration'
        SequentialExecutorConfiguration:
          $ref: '#/components/schemas/SequentialExecutorConfiguration'
        VastRequestConfiguration:
          $ref: '#/components/schemas/VastRequestConfiguration'
        Tags:
          type: object
          additionalProperties:
            type: string
          description: The tags assigned to the function. Tags are key-value pairs that you can associate with Amazon resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor Resources.
        Arn:
          type: string
          description: The Amazon Resource Name (ARN) of the function.
      required:
      - FunctionId
      - FunctionType
    SequentialExecutorConfiguration:
      type: object
      properties:
        Runtime:
          type: string
          enum:
          - JSONATA
          description: The expression language used to evaluate expressions in the function configuration. Set this to JSONata.
        Output:
          type: object
          additionalProperties:
            type: string
          description: An optional map of output bindings that controls which bindings the sequence commits to the session state after all steps complete. If omitted, MediaTailor commits all accumulated output bindings from all child steps.
        FunctionList:
          type: array
          items:
            $ref: '#/components/schemas/FunctionRef'
          description: An ordered list of 1 to 10 steps. Each step specifies a child function to execute and an optional run condition expression that controls whether the step runs. MediaTailor executes steps in order, passing data between steps through temporary data.
        TimeoutMilliseconds:
          type: integer
          description: The maximum time, in milliseconds, for the entire sequence to complete. This timeout covers all steps, including any HTTP calls made by child functions. If the sequence exceeds this timeout, MediaTailor discards all output from the sequence and proceeds with default behavior.
      required:
      - Runtime
      - FunctionList
      - TimeoutMilliseconds
    VastRequestConfiguration:
      type: object
      properties:
        Runtime:
          type: string
          enum:
          - JSONATA
          description: The expression language used to evaluate expressions in the function configuration. Set this to JSONata.
        Output:
          type: object
          additionalProperties:
            type: string
          description: A map of output bindings. Each key is a namespaced output path (such as temp.wrappedAds), and each value is an expression that MediaTailor evaluates at runtime. Output expressions in a VAST_REQUEST function can reference the response object, which exposes response.parsedAds — the ads parsed from the VAST response after schema validation and wrapper resolution — and response.statusCode. For more information about expression syntax, see JSONata expression reference in the MediaTailor User Guide.
        MethodType:
          type: string
          enum:
          - GET
          - POST
          description: 'The HTTP method for the request to the VAST endpoint. Valid values: GET and POST. Use POST to send a bid request body, such as an OpenRTB payload.'
        RequestTimeoutMilliseconds:
          type: integer
          description: 'The maximum time, in milliseconds, that MediaTailor waits for a response from the VAST endpoint. The timeout covers the entire response, including any wrapper redirects that MediaTailor follows. If the call exceeds this timeout, MediaTailor proceeds with an empty ad list and continues output expression evaluation. Valid values: 100 to 2000.'
        Url:
          type: string
          description: An expression that evaluates to the VAST endpoint URL. Use {%...%} delimiters for dynamic expressions. A literal value must be an https:// URL. The expression can be up to 25,000 characters, and the URL after evaluation can be up to 2,048 characters.
        Body:
          type: string
          description: An expression that evaluates to the request body, for example to send an OpenRTB bid request. The expression can be up to 100,000 characters, and the body after evaluation can be up to 64 KB.
        Headers:
          type: object
          additionalProperties:
            type: string
          description: A map of HTTP header names to expression values. MediaTailor evaluates each header value expression at runtime and includes the result in the outbound request. Headers beginning with X-Amz- are reserved by the service, and method override headers are not allowed.
        Cache:
          $ref: '#/components/schemas/HttpRequestCacheConfiguration'
      required:
      - Runtime
      - MethodType
      - RequestTimeoutMilliseconds
      - Url
    PutFunctionResponse:
      type: object
      properties:
        FunctionId:
          type: string
          description: The identifier of the function.
        FunctionType:
          type: string
          enum:
          - HTTP_REQUEST
          - AWS_SERVICE_REQUEST
          - CUSTOM_OUTPUT
          - CONCURRENT_EXECUTOR
          - SEQUENTIAL_EXECUTOR
          - VAST_REQUEST
          description: The type of the function.
        Description:
          type: string
          description: A description of the function.
        HttpRequestConfiguration:
          $ref: '#/components/schemas/HttpRequestConfiguration'
        AwsServiceRequestConfiguration:
          $ref: '#/components/schemas/AwsServiceRequestConfiguration'
        CustomOutputConfiguration:
          $ref: '#/components/schemas/CustomOutputConfiguration'
        ConcurrentExecutorConfiguration:
          $ref: '#/components/schemas/ConcurrentExecutorConfiguration'
        SequentialExecutorConfiguration:
          $ref: '#/components/schemas/SequentialExecutorConfiguration'
        VastRequestConfiguration:
          $ref: '#/components/schemas/VastRequestConfiguration'
        Tags:
          type: object
          additionalProperties:
            type: string
          description: The tags assigned to the function. Tags are key-value pairs that you can associate with Amazon resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor Resources.
        Arn:
          type: string
          description: The Amazon Resource Name (ARN) of the function.
      required:
      - FunctionId
      - FunctionType
    HttpRequestConfiguration:
      type: object
      properties:
        Runtime:
          type: string
          enum:
          - JSONATA
          description: The expression language used to evaluate expressions in the function configuration. Set this to JSONata.
        Output:
          type: object
          additionalProperties:
            type: string
          description: A map of output bindings. Each key is a namespaced output path (such as player_params.device_type or temp.identity), and each value is an expression that MediaTailor evaluates at runtime. Output expressions in an HTTP_REQUEST function can reference the response object returned by the HTTP call. For more information about expression syntax, see JSONata expression reference in the MediaTailor User Guide.
        MethodType:
          type: string
          enum:
          - GET
          - POST
          description: 'The HTTP method for the request. Valid values: GET and POST.'
        RequestTimeoutMilliseconds:
          type: integer
          description: 'The maximum time, in milliseconds, that MediaTailor waits for a response from the external service. If the call exceeds this timeout, MediaTailor sets the response status code to null and proceeds with output expression evaluation. Valid values: 100 to 2000.'
        Url:
          type: string
          description: An expression that evaluates to the request URL. Use {%...%} delimiters for dynamic expressions. The maximum length after evaluation is 2,048 characters.
        Body:
          type: string
          description: An expression that evaluates to the request body. Used with POST requests. The maximum size after evaluation is 64 KB.
        Headers:
          type: object
          additionalProperties:
            type: string
          description: A map of HTTP header names to expression values. MediaTailor evaluates each header value expression at runtime and includes the result in the outbound HTTP request. Maximum 50 headers.
        Cache:
          $ref: '#/components/schemas/HttpRequestCacheConfiguration'
      required:
      - Runtime
      - MethodType
      - RequestTimeoutMilliseconds
      - Url
    ListFunctionsRequest:
      type: object
      properties:
        MaxResults:
          type: integer
          description: The maximum number of functions that you want MediaTailor to return in response to the current request. If there are more than MaxResults functions, use the value of NextToken in the response to get the next page of results. The default value is 100. MediaTailor uses token-based pagination, which means that a response might contain fewer than MaxResults items, including 0 items, even when more results are available. To retrieve all results, you must continue making requests using the NextToken value from each response until the response no longer includes a NextToken value.
        NextToken:
          type: string
          description: Pagination token returned by the list request when results exceed the maximum allowed. Use the token to fetch the next page of results. For the first ListFunctions request, omit this value. For subsequent requests, get the value of NextToken from the previous response and specify that value for NextToken in the request. Continue making requests until the response no longer includes a NextToken value, which indicates that all results have been retrieved.
    FunctionRef:
      type: object
      properties:
        RunCondition:
          type: string
          description: An optional expression that evaluates to a boolean. MediaTailor evaluates this expression immediately before running the step, using the accumulated state at that point in the sequence. If the expression evaluates to false, MediaTailor skips the step and moves to the next one. If omitted, the step always runs.
        FunctionId:
          type: string
          description: The identifier of the child function to execute in this step.
        Alias:
          type: string
          description: An optional alternate name for the function within the executor. If omitted, MediaTailor uses the function identifier.
    HttpRequestCacheConfiguration:
      type: object
      properties:
        TtlMinimumSeconds:
          type: integer
          description: The lower bound, in seconds, on how long MediaTailor caches a response. MediaTailor also uses this value as the cache duration when a response has no Cache-Control max-age directive.
        TtlMaximumSeconds:
          type: integer
          description: The upper bound, in seconds, on how long MediaTailor caches a response. This value must be greater than or equal to TtlMinimumSeconds.
        Key:
          type: string
          description: A JSONata expression that MediaTailor evaluates to a custom cache key. By default, the cache key is a hash of the HTTP URL, the request body, and the HTTP method; request headers are not included. You can specify a custom cache key expression to vary caching by request headers and more. The evaluated key must be smaller than 1 KB; otherwise the HTTP function will fail.
      required:
      - TtlMinimumSeconds
      - TtlMaximumSeconds
    DeleteFunctionResponse:
      type: object
      properties: {}
    ListFunctionsResponse:
      type: object
      properties:
        Items:
          type: array
          items:
            $ref: '#/components/schemas/Function'
          description: A list of functions associated with your account in the current Region.
        NextToken:
          type: string
          description: Pagination token returned by the list request when results exceed the maximum allowed. Use the token to fetch the next page of results. For the first ListFunctions request, omit this value. For subsequent requests, get the value of NextToken from the previous response and specify that value for NextToken in the request. Continue making requests until the response no longer includes a NextToken value, which indicates that all results have been retrieved.
    ConcurrentExecutorConfiguration:
      type: object
      properties:
        Runtime:
          type: string
          enum:
          - JSONATA
          description: The expression language used to evaluate expressions in the function configuration. Set this to JSONata.
        Output:
          type: object
          additionalProperties:
            type: string
          description: A map of output bindings that controls which bindings the executor commits to the session state after all child functions complete. Each key is a namespaced output path, and each value is an expression that MediaTailor evaluates against the combined results of the child functions.
        FunctionList:
          type: array
          items:
            $ref: '#/components/schemas/FunctionRef'
          description: The list of child functions that MediaTailor runs in parallel. Each entry specifies a child function to execute and an optional run condition expression that controls whether the function runs.
        TimeoutMilliseconds:
          type: integer
          description: The maximum time, in milliseconds, for all child functions to complete. This timeout covers every function in the list, including any HTTP calls the child functions make. If the executor exceeds this timeout, MediaTailor discards all output from the executor and proceeds with default behavior.
        MaxConcurrency:
          type: integer
          description: The maximum number of child functions that MediaTailor runs simultaneously. When the list contains more functions than MaxConcurrency, MediaTailor starts additional functions as running ones complete, so that no more than MaxConcurrency functions run at the same time.
      required:
      - Runtime
      - Output
      - FunctionList
      - TimeoutMilliseconds
      - MaxConcurrency
    GetFunctionRequest:
      type: object
      properties:
        FunctionId:
          type: string
          description: The identifier of the function.
      required:
      - FunctionId
    DeleteFunctionRequest:
      type: object
      properties:
        FunctionId:
          type: string
          description: The identifier of the function to delete.
      required:
      - FunctionId
  securitySchemes:
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: mediatailor
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/582e55931c45b944739742a2c1620b6026dd2d13/models/mediatailor/service/2018-04-23/mediatailor-2018-04-23.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)