Label Studio subpackage_activityLogs API

The subpackage_activityLogs API from Label Studio — 1 operation(s) for subpackage_activitylogs.

OpenAPI Specification

label-studio-subpackage-activitylogs-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: API Reference subpackage_actions subpackage_activityLogs API
  version: 1.0.0
servers:
- url: http://localhost:8000
tags:
- name: subpackage_activityLogs
paths:
  /api/activity-logs/:
    get:
      operationId: list
      summary: ✨ Get activity 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>\nRetrieve activity logs filtered by workspace, project, user, HTTP method, date range or search query."
      tags:
      - subpackage_activityLogs
      parameters:
      - name: end_date
        in: query
        description: End date/time (ISO-8601) for log filtering.
        required: false
        schema:
          type: string
      - name: method
        in: query
        description: HTTP request method used in the log.
        required: false
        schema:
          $ref: '#/components/schemas/ApiActivityLogsGetParametersMethod'
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        schema:
          type: string
      - name: page
        in: query
        description: '[or "start"] Current page index.'
        required: false
        schema:
          type: integer
      - name: page_size
        in: query
        description: '[or "length"] Logs per page, use -1 to obtain all logs (might be slow).'
        required: false
        schema:
          type: integer
      - name: project
        in: query
        description: Project ID to filter logs.
        required: false
        schema:
          type: integer
      - name: search
        in: query
        description: Search expression using "AND"/"OR" to filter by request URL.
        required: false
        schema:
          type: string
      - name: start_date
        in: query
        description: Start date/time (ISO-8601) for log filtering.
        required: false
        schema:
          type: string
      - name: user
        in: query
        description: User ID to filter logs.
        required: false
        schema:
          type: integer
      - name: workspace
        in: query
        description: Workspace owner ID to filter logs.
        required: false
        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: Activity logs
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ActivityLogResponse'
        '404':
          description: No more logs found
          content:
            application/json:
              schema:
                description: Any type
components:
  schemas:
    ActivityLog:
      type: object
      properties:
        datetime:
          type: string
          format: date-time
        duration:
          type:
          - integer
          - 'null'
          description: Duration of response generation in ms
        email:
          type: string
        extra_data:
          oneOf:
          - description: Any type
          - type: 'null'
        http_referer:
          type: string
        id:
          type: integer
        ip_address:
          type:
          - string
          - 'null'
        organization_id:
          type:
          - integer
          - 'null'
          description: Organization id
        project_id:
          type:
          - integer
          - 'null'
          description: Project id if request has it
        request_method:
          type: string
        request_url:
          type: string
        response_code:
          type: string
        user_agent:
          type: string
        user_id:
          type: integer
        user_session:
          type:
          - string
          - 'null'
        workspace_owner_id:
          type:
          - integer
          - 'null'
          description: Owner id of workspace where action performed
      required:
      - datetime
      - email
      - id
      - request_method
      - request_url
      - response_code
      - user_id
      title: ActivityLog
    ActivityLogResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ActivityLog'
        recordsFiltered:
          type: integer
        recordsTotal:
          type: integer
      required:
      - data
      - recordsFiltered
      - recordsTotal
      description: Serializer for ActivityLogAPI response.
      title: ActivityLogResponse
    ApiActivityLogsGetParametersMethod:
      type: string
      enum:
      - DELETE
      - GET
      - PATCH
      - POST
      - PUT
      - all
      default: all
      title: ApiActivityLogsGetParametersMethod
  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>'