Label Studio subpackage_projects.subpackage_projects/metrics.subpackage_projects/metrics/custom API

The subpackage_projects.subpackage_projects/metrics.subpackage_projects/metrics/custom API from Label Studio — 6 operation(s) for subpackage_projects.subpackage_projects/metrics.subpackage_projects/metrics/custom.

Operations 9

GET /api/projects/{id}/aws-custom-function ✨ Get AWS custom metric code #
POST /api/projects/{id}/aws-custom-function ✨ Update AWS custom metric Lambda #
GET /api/projects/{id}/aws-custom-function-logs ✨ Get AWS lambda logs for project #
POST /api/projects/{id}/check-function ✨ Check custom matching function code #
GET /api/projects/{id}/custom-function ✨ Get custom metric code #
POST /api/projects/{id}/custom-function ✨ Deploy custom metric function #
GET /api/projects/{id}/custom-function-logs ✨ Get custom metric function logs #
GET /api/projects/{id}/gcp-custom-function ✨ Get GCP custom metric code #
POST /api/projects/{id}/gcp-custom-function ✨ Update GCP custom metric Cloud Function #

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/label-studio-subpackage-projects-subpackage-projects-metrics-subpackage-projects-metrics-custom-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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

label-studio-subpackage-projects-subpackage-projects-metrics-subpackage-projects-metrics-custom-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Reference subpackage_actions Subpackage Projects.subpackage Projects/metrics.subpackage Projects/metrics/custom API
  version: 1.0.0
servers:
- url: http://localhost:8000
tags:
- name: subpackage_projects.subpackage_projects/metrics.subpackage_projects/metrics/custom
paths:
  /api/projects/{id}/aws-custom-function:
    get:
      operationId: get-lambda
      summary: ✨ Get AWS custom metric code
      description: "<Card href=\"https://humansignal.com/goenterprise\">\n        <img style=\"pointer-events: none; margin-left: 0px; margin-right: 0px;\" src=\"https://docs.humansignal.com/images/badge.svg\" alt=\"Label Studio Enterprise badge\"/>\n        <p style=\"margin-top: 10px; font-size: 14px;\">\n            This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n        </p>\n    </Card>\nGet the AWS Lambda code for the custom metric configured for this project."
      tags:
      - subpackage_projects.subpackage_projects/metrics.subpackage_projects/metrics/custom
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      - name: Authorization
        in: header
        description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: <br><pre><code class="language-bash">curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"</code></pre>'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Lambda code and deployment status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/projects_metrics_custom_get_lambda_Response_200'
    post:
      operationId: update-lambda
      summary: ✨ Update AWS custom metric Lambda
      description: "<Card href=\"https://humansignal.com/goenterprise\">\n        <img style=\"pointer-events: none; margin-left: 0px; margin-right: 0px;\" src=\"https://docs.humansignal.com/images/badge.svg\" alt=\"Label Studio Enterprise badge\"/>\n        <p style=\"margin-top: 10px; font-size: 14px;\">\n            This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n        </p>\n    </Card>\nCreate or update the AWS Lambda function used for custom metrics in this project."
      tags:
      - subpackage_projects.subpackage_projects/metrics.subpackage_projects/metrics/custom
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      - name: Authorization
        in: header
        description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: <br><pre><code class="language-bash">curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"</code></pre>'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/projects_metrics_custom_update_lambda_Response_200'
        '500':
          description: Error updating function
          content:
            application/json:
              schema:
                description: Any type
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AWSCustomFunctionUpdateRequest'
  /api/projects/{id}/aws-custom-function-logs:
    get:
      operationId: logs
      summary: ✨ Get AWS lambda logs for project
      description: "<Card href=\"https://humansignal.com/goenterprise\">\n        <img style=\"pointer-events: none; margin-left: 0px; margin-right: 0px;\" src=\"https://docs.humansignal.com/images/badge.svg\" alt=\"Label Studio Enterprise badge\"/>\n        <p style=\"margin-top: 10px; font-size: 14px;\">\n            This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n        </p>\n    </Card>\nGet AWS lambda logs for project, including filtering by start and end dates"
      tags:
      - subpackage_projects.subpackage_projects/metrics.subpackage_projects/metrics/custom
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      - name: end_date
        in: query
        description: End date for AWS logs filtering in format %Y-%m-%d
        required: false
        schema:
          type: string
      - name: limit
        in: query
        description: Limit the number of logs to return
        required: false
        schema:
          type: integer
          default: 100
      - name: start_date
        in: query
        description: Start date for AWS logs filtering in format %Y-%m-%d
        required: false
        schema:
          type: string
      - name: Authorization
        in: header
        description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: <br><pre><code class="language-bash">curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"</code></pre>'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response returns list of AWS lambda logs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/projects_metrics_custom_logs_Response_200'
  /api/projects/{id}/check-function:
    post:
      operationId: check-function
      summary: ✨ Check custom matching function code
      description: "<Card href=\"https://humansignal.com/goenterprise\">\n        <img style=\"pointer-events: none; margin-left: 0px; margin-right: 0px;\" src=\"https://docs.humansignal.com/images/badge.svg\" alt=\"Label Studio Enterprise badge\"/>\n        <p style=\"margin-top: 10px; font-size: 14px;\">\n            This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n        </p>\n    </Card>\nValidate custom matching function code for the project."
      tags:
      - subpackage_projects.subpackage_projects/metrics.subpackage_projects/metrics/custom
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      - name: Authorization
        in: header
        description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: <br><pre><code class="language-bash">curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"</code></pre>'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Code is valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/projects_metrics_custom_check_function_Response_200'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckMatchingFunctionRequestRequest'
  /api/projects/{id}/custom-function:
    get:
      operationId: get-function
      summary: ✨ Get custom metric code
      description: "<Card href=\"https://humansignal.com/goenterprise\">\n        <img style=\"pointer-events: none; margin-left: 0px; margin-right: 0px;\" src=\"https://docs.humansignal.com/images/badge.svg\" alt=\"Label Studio Enterprise badge\"/>\n        <p style=\"margin-top: 10px; font-size: 14px;\">\n            This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n        </p>\n    </Card>\nGet the custom metric function code for this project. The server routes to the active cloud provider (AWS Lambda or GCP Cloud Functions) based on the CUSTOM_METRIC_PROVIDER setting."
      tags:
      - subpackage_projects.subpackage_projects/metrics.subpackage_projects/metrics/custom
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      - name: Authorization
        in: header
        description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: <br><pre><code class="language-bash">curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"</code></pre>'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Function code and deployment status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/projects_metrics_custom_get_function_Response_200'
    post:
      operationId: deploy-function
      summary: ✨ Deploy custom metric function
      description: "<Card href=\"https://humansignal.com/goenterprise\">\n        <img style=\"pointer-events: none; margin-left: 0px; margin-right: 0px;\" src=\"https://docs.humansignal.com/images/badge.svg\" alt=\"Label Studio Enterprise badge\"/>\n        <p style=\"margin-top: 10px; font-size: 14px;\">\n            This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n        </p>\n    </Card>\nCreate or update the custom metric function for this project. The server routes to the active cloud provider (AWS Lambda or GCP Cloud Functions) based on the CUSTOM_METRIC_PROVIDER setting."
      tags:
      - subpackage_projects.subpackage_projects/metrics.subpackage_projects/metrics/custom
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      - name: Authorization
        in: header
        description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: <br><pre><code class="language-bash">curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"</code></pre>'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/projects_metrics_custom_deploy_function_Response_200'
        '500':
          description: Error updating function
          content:
            application/json:
              schema:
                description: Any type
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomFunctionCodeRequestRequest'
  /api/projects/{id}/custom-function-logs:
    get:
      operationId: get-function-logs
      summary: ✨ Get custom metric function logs
      description: "<Card href=\"https://humansignal.com/goenterprise\">\n        <img style=\"pointer-events: none; margin-left: 0px; margin-right: 0px;\" src=\"https://docs.humansignal.com/images/badge.svg\" alt=\"Label Studio Enterprise badge\"/>\n        <p style=\"margin-top: 10px; font-size: 14px;\">\n            This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n        </p>\n    </Card>\nGet execution logs for the custom metric function. The server routes to the active cloud provider based on the CUSTOM_METRIC_PROVIDER setting."
      tags:
      - subpackage_projects.subpackage_projects/metrics.subpackage_projects/metrics/custom
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      - name: end_date
        in: query
        description: End date for log filtering in format %Y-%m-%d
        required: false
        schema:
          type: string
      - name: limit
        in: query
        description: Limit the number of logs to return
        required: false
        schema:
          type: integer
          default: 100
      - name: start_date
        in: query
        description: Start date for log filtering in format %Y-%m-%d
        required: false
        schema:
          type: string
      - name: Authorization
        in: header
        description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: <br><pre><code class="language-bash">curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"</code></pre>'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: List of function execution logs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/projects_metrics_custom_get_function_logs_Response_200'
  /api/projects/{id}/gcp-custom-function:
    get:
      operationId: get-gcp-function
      summary: ✨ Get GCP custom metric code
      description: "<Card href=\"https://humansignal.com/goenterprise\">\n        <img style=\"pointer-events: none; margin-left: 0px; margin-right: 0px;\" src=\"https://docs.humansignal.com/images/badge.svg\" alt=\"Label Studio Enterprise badge\"/>\n        <p style=\"margin-top: 10px; font-size: 14px;\">\n            This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n        </p>\n    </Card>\nGet the GCP Cloud Function code for the custom metric configured for this project."
      tags:
      - subpackage_projects.subpackage_projects/metrics.subpackage_projects/metrics/custom
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      - name: Authorization
        in: header
        description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: <br><pre><code class="language-bash">curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"</code></pre>'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Cloud Function code and deployment status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/projects_metrics_custom_get_gcp_function_Response_200'
    post:
      operationId: update-gcp-function
      summary: ✨ Update GCP custom metric Cloud Function
      description: "<Card href=\"https://humansignal.com/goenterprise\">\n        <img style=\"pointer-events: none; margin-left: 0px; margin-right: 0px;\" src=\"https://docs.humansignal.com/images/badge.svg\" alt=\"Label Studio Enterprise badge\"/>\n        <p style=\"margin-top: 10px; font-size: 14px;\">\n            This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n        </p>\n    </Card>\nCreate or update the GCP Cloud Function used for custom metrics in this project."
      tags:
      - subpackage_projects.subpackage_projects/metrics.subpackage_projects/metrics/custom
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      - name: Authorization
        in: header
        description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: <br><pre><code class="language-bash">curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"</code></pre>'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/projects_metrics_custom_update_gcp_function_Response_200'
        '500':
          description: Error updating function
          content:
            application/json:
              schema:
                description: Any type
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GCPCustomFunctionUpdateRequest'
components:
  schemas:
    projects_metrics_custom_get_function_logs_Response_200:
      type: object
      properties: {}
      title: projects_metrics_custom_get_function_logs_Response_200
    CustomFunctionCodeRequestRequest:
      type: object
      properties:
        code:
          type: string
      required:
      - code
      title: CustomFunctionCodeRequestRequest
    projects_metrics_custom_check_function_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: projects_metrics_custom_check_function_Response_200
    projects_metrics_custom_deploy_function_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: projects_metrics_custom_deploy_function_Response_200
    ApiProjectsIdCustomFunctionGetResponsesContentApplicationJsonSchemaStatus:
      type: string
      enum:
      - NotDeployed
      - Active
      - Pending
      - Failed
      - NotFound
      - Error
      title: ApiProjectsIdCustomFunctionGetResponsesContentApplicationJsonSchemaStatus
    AWSCustomFunctionUpdateRequest:
      type: object
      properties:
        code:
          type: string
          description: The Python code for the custom metric function.
        region:
          type:
          - string
          - 'null'
          description: The AWS region for the Lambda function. Uses default if not provided.
        role:
          type:
          - string
          - 'null'
          description: The AWS IAM role ARN for the Lambda function. Uses default if not provided.
      required:
      - code
      description: Serializer for updating AWS Lambda custom metric function.
      title: AWSCustomFunctionUpdateRequest
    CheckMatchingFunctionRequestRequest:
      type: object
      properties:
        code:
          type: string
      required:
      - code
      title: CheckMatchingFunctionRequestRequest
    projects_metrics_custom_get_function_Response_200:
      type: object
      properties:
        code:
          type: string
        status:
          $ref: '#/components/schemas/ApiProjectsIdCustomFunctionGetResponsesContentApplicationJsonSchemaStatus'
      required:
      - code
      - status
      title: projects_metrics_custom_get_function_Response_200
    projects_metrics_custom_logs_Response_200:
      type: object
      properties: {}
      description: List of AWS lambda logs
      title: projects_metrics_custom_logs_Response_200
    ApiProjectsIdGcpCustomFunctionGetResponsesContentApplicationJsonSchemaStatus:
      type: string
      enum:
      - NotDeployed
      - Active
      - Pending
      - Failed
      - NotFound
      - Error
      title: ApiProjectsIdGcpCustomFunctionGetResponsesContentApplicationJsonSchemaStatus
    projects_metrics_custom_update_gcp_function_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: projects_metrics_custom_update_gcp_function_Response_200
    projects_metrics_custom_get_lambda_Response_200:
      type: object
      properties:
        code:
          type: string
        status:
          $ref: '#/components/schemas/ApiProjectsIdAwsCustomFunctionGetResponsesContentApplicationJsonSchemaStatus'
          description: Deployment status of the Lambda function.
      required:
      - code
      - status
      title: projects_metrics_custom_get_lambda_Response_200
    GCPCustomFunctionUpdateRequest:
      type: object
      properties:
        code:
          type: string
          description: The Python code for the custom metric function.
        project:
          type:
          - string
          - 'null'
          description: The GCP project ID. Uses default if not provided.
        region:
          type:
          - string
          - 'null'
          description: The GCP region for the Cloud Function. Uses default if not provided.
      required:
      - code
      description: Serializer for updating GCP Cloud Function custom metric.
      title: GCPCustomFunctionUpdateRequest
    ApiProjectsIdAwsCustomFunctionGetResponsesContentApplicationJsonSchemaStatus:
      type: string
      enum:
      - NotDeployed
      - Active
      - Pending
      - Inactive
      - Failed
      - NotFound
      - Error
      description: Deployment status of the Lambda function.
      title: ApiProjectsIdAwsCustomFunctionGetResponsesContentApplicationJsonSchemaStatus
    projects_metrics_custom_get_gcp_function_Response_200:
      type: object
      properties:
        code:
          type: string
        status:
          $ref: '#/components/schemas/ApiProjectsIdGcpCustomFunctionGetResponsesContentApplicationJsonSchemaStatus'
      required:
      - code
      - status
      title: projects_metrics_custom_get_gcp_function_Response_200
    projects_metrics_custom_update_lambda_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: projects_metrics_custom_update_lambda_Response_200
  securitySchemes:
    Token:
      type: apiKey
      in: header
      name: Authorization
      description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: <br><pre><code class="language-bash">curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"</code></pre>'