> ## Documentation Index
> Fetch the complete documentation index at: https://docs.serval.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List SLA Definitions

> List all SLA definitions for a team.



## OpenAPI

````yaml /sections/api-reference/openapi-spec-v2.yaml get /v2/teams/{team_id}/sla-definitions
openapi: 3.1.0
info:
  title: Serval Public API
  description: Serval Public API
  contact:
    name: Serval
    url: https://serval.com
    email: support@serval.com
  license:
    name: Serval License
    url: https://serval.com/license
  version: 2.0.0
servers:
  - url: https://public.api.serval.com
security:
  - BearerAuth: []
tags:
  - name: Access Policy API
  - name: Access Policy Approval Procedure API
  - name: Access Profile API
  - name: Access Relationship API
  - name: Access Request API
  - name: Agent API
  - name: App Instance API
  - name: App Resource API
  - name: App Resource Role API
  - name: Approval Delegation API
  - name: Approval Request API
  - name: Audit Log API
  - name: Change Blackout API
  - name: Change Model API
  - name: Custom Field API
  - name: Custom Service API
  - name: Entity API
  - name: Entity Field Mapping API
  - name: Entity Ingestion Config API
  - name: Entity Type API
  - name: Folder API
  - name: Group API
  - name: Guidance API
  - name: Help Agent API
  - name: Journey API
  - name: Knowledge API
  - name: Knowledge Base API
  - name: Report API
  - name: SLA API
  - name: Schedule API
  - name: Tag API
  - name: Team API
  - name: Team User API
  - name: Ticket API
  - name: Topic API
  - name: User API
  - name: User Relationship API
  - name: Workflow API
  - name: Workflow Approval Procedure API
  - name: Workflow Run API
paths:
  /v2/teams/{team_id}/sla-definitions:
    get:
      tags:
        - SLA API
      summary: List SLA Definitions
      description: List all SLA definitions for a team.
      operationId: svrelay.publicv2.PublicAPIServiceV2.ListSlaDefinitions
      parameters:
        - name: team_id
          in: path
          required: true
          schema:
            type: string
            title: team_id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/svhelp.publicapi.ListSlaDefinitionsResponse
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
      security:
        - BearerAuth: []
components:
  schemas:
    svhelp.publicapi.ListSlaDefinitionsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/svhelp.models.SlaDefinition'
          title: data
          x-stainless-terraform-configurability: optional
      title: ListSlaDefinitionsResponse
      additionalProperties: false
    connect.error:
      type: object
      properties:
        code:
          type: string
          examples:
            - not_found
          enum:
            - canceled
            - unknown
            - invalid_argument
            - deadline_exceeded
            - not_found
            - already_exists
            - permission_denied
            - resource_exhausted
            - failed_precondition
            - aborted
            - out_of_range
            - unimplemented
            - internal
            - unavailable
            - data_loss
            - unauthenticated
          description: >-
            The status code, which should be an enum value of
            [google.rpc.Code][google.rpc.Code].
          x-stainless-terraform-configurability: optional
        message:
          type: string
          description: >-
            A developer-facing error message, which should be in English. Any
            user-facing error message should be localized and sent in the
            [google.rpc.Status.details][google.rpc.Status.details] field, or
            localized by the client.
          x-stainless-terraform-configurability: optional
        detail:
          $ref: '#/components/schemas/google.protobuf.Any'
          x-stainless-terraform-configurability: optional
      title: Connect Error
      additionalProperties: true
      description: >-
        Error type returned by Connect:
        https://connectrpc.com/docs/go/errors/#http-representation
    svhelp.models.SlaDefinition:
      type: object
      properties:
        id:
          type: string
          title: id
          x-stainless-terraform-configurability: optional
        teamId:
          type: string
          title: team_id
          x-stainless-terraform-configurability: optional
        name:
          type: string
          title: name
          x-stainless-terraform-configurability: optional
        description:
          type: string
          title: description
          x-stainless-terraform-configurability: optional
        targetDurationSeconds:
          type: integer
          title: target_duration_seconds
          format: int32
          x-stainless-terraform-configurability: optional
        useCalendarTime:
          type: boolean
          title: use_calendar_time
          x-stainless-terraform-configurability: computed_optional
        scheduleId:
          type: string
          title: schedule_id
          description: Optional, required if use_calendar_time is false
          x-stainless-terraform-configurability: optional
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/svhelp.models.SlaCondition'
          title: conditions
          description: Pause/stop conditions
          x-stainless-terraform-configurability: optional
        createdAt:
          $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: created_at
          x-stainless-terraform-configurability: optional
        updatedAt:
          $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: updated_at
          x-stainless-terraform-configurability: optional
        attachmentCriteria:
          type: array
          items:
            $ref: '#/components/schemas/svhelp.models.SlaConditionRule'
          title: attachment_criteria
          x-stainless-terraform-configurability: optional
        actionDefinitions:
          type: array
          items:
            $ref: '#/components/schemas/svhelp.models.SlaActionDefinition'
          title: action_definitions
          x-stainless-terraform-configurability: optional
        startingPoint:
          $ref: '#/components/schemas/svhelp.models.SlaStartingPoint'
          title: starting_point
          description: Controls when the SLA clock starts for auto-attached SLAs.
          x-stainless-terraform-configurability: optional
        metric:
          $ref: '#/components/schemas/svhelp.models.SlaMetric'
          title: metric
          description: >-
            What the SLA measures (resolution vs first response, etc.). The
            clock
             stops when the metric's completion event is observed.
          x-stainless-terraform-configurability: optional
        archivedAt:
          $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: archived_at
          description: |-
            Set when the definition has been archived (deprecated). An archived
             definition is excluded from auto-attachment and hidden from the active
             config list, but its existing attachments keep running. Unset = active.
          x-stainless-terraform-configurability: optional
      title: SlaDefinition
      additionalProperties: false
      description: SlaDefinition represents a reusable SLA policy.
    google.protobuf.Any:
      type: object
      properties:
        type:
          type: string
          x-stainless-terraform-configurability: optional
        value:
          type: string
          format: binary
          x-stainless-terraform-configurability: optional
        debug:
          type: object
          additionalProperties: true
          x-stainless-terraform-configurability: optional
      additionalProperties: true
      description: >-
        Contains an arbitrary serialized message along with a @type that
        describes the type of the serialized message.
    svhelp.models.SlaCondition:
      type: object
      properties:
        id:
          type: string
          title: id
          x-stainless-terraform-configurability: optional
        slaDefinitionId:
          type: string
          title: sla_definition_id
          x-stainless-terraform-configurability: optional
        conditionType:
          $ref: '#/components/schemas/svhelp.models.SlaConditionType'
          title: condition_type
          x-stainless-terraform-configurability: optional
        conditionRule:
          $ref: '#/components/schemas/svhelp.models.SlaConditionRule'
          title: condition_rule
          x-stainless-terraform-configurability: optional
        resumePolicy:
          type: string
          title: resume_policy
          description: '"condition_no_longer_matches" or "explicit_only"'
          x-stainless-terraform-configurability: optional
        priority:
          type: integer
          title: priority
          format: int32
          x-stainless-terraform-configurability: optional
      title: SlaCondition
      additionalProperties: false
      description: SlaCondition represents a pause or stop condition for an SLA.
    google.protobuf.Timestamp:
      type: string
      format: date-time
      description: A timestamp in RFC 3339 format (e.g., "2025-01-15T01:30:15Z").
    svhelp.models.SlaConditionRule:
      type: object
      properties:
        type:
          type: string
          title: type
          description: '"ticket_status", "ticket_field", "waiting_on_reply", etc.'
          x-stainless-terraform-configurability: optional
        field:
          type: string
          title: field
          description: Field name (for ticket_field type)
          x-stainless-terraform-configurability: optional
        op:
          type: string
          title: op
          description: 'Operator: "equals", "not_equals", "in", "not_in"'
          x-stainless-terraform-configurability: optional
        value:
          type: string
          title: value
          description: Single value
          x-stainless-terraform-configurability: optional
        values:
          type: array
          items:
            type: string
          title: values
          description: Multiple values for in/not_in
          x-stainless-terraform-configurability: optional
        logicOp:
          type: string
          title: logic_op
          description: >-
            Logic operator connecting to previous rule: "AND" or "OR" (empty for
            first rule)
          x-stainless-terraform-configurability: optional
      title: SlaConditionRule
      additionalProperties: false
      description: SlaConditionRule represents a condition rule for pausing/stopping SLAs.
    svhelp.models.SlaActionDefinition:
      type: object
      properties:
        id:
          type: string
          title: id
          x-stainless-terraform-configurability: optional
        slaDefinitionId:
          type: string
          title: sla_definition_id
          x-stainless-terraform-configurability: optional
        offsetSeconds:
          type: integer
          title: offset_seconds
          format: int32
          description: Negative = before breach, 0 = at breach, positive = after breach
          x-stainless-terraform-configurability: optional
        workflowId:
          type: string
          title: workflow_id
          x-stainless-terraform-configurability: optional
        createdAt:
          $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: created_at
          x-stainless-terraform-configurability: optional
        updatedAt:
          $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: updated_at
          x-stainless-terraform-configurability: optional
      title: SlaActionDefinition
      additionalProperties: false
      description: |-
        SlaActionDefinition represents a time-based action on an SLA definition
         that triggers a workflow at a configurable offset from the breach time.
    svhelp.models.SlaStartingPoint:
      type: string
      title: SlaStartingPoint
      enum:
        - SLA_STARTING_POINT_UNSPECIFIED
        - SLA_STARTING_POINT_FROM_ATTACHMENT
        - SLA_STARTING_POINT_FROM_CREATION
      description: |-
        SlaStartingPoint controls when the SLA clock starts counting for
         auto-attached SLAs. Milestone-dependent starting points (e.g. "after
         escalation") are intentionally not modeled here — express them via
         attachment criteria (e.g. `ticket.escalation_level = human`) combined
         with FROM_ATTACHMENT.
    svhelp.models.SlaMetric:
      type: string
      title: SlaMetric
      enum:
        - SLA_METRIC_UNSPECIFIED
        - SLA_METRIC_RESOLUTION
        - SLA_METRIC_FIRST_RESPONSE
      description: |-
        SlaMetric identifies what an SLA measures (i.e., what stops the clock).
         New metrics are added by extending this enum and registering a metric
         handler in backend/services/svhelp/src/internal/state/ticket/rule/sla/metric.
    svhelp.models.SlaConditionType:
      type: string
      title: SlaConditionType
      enum:
        - SLA_CONDITION_TYPE_UNSPECIFIED
        - SLA_CONDITION_TYPE_PAUSE
        - SLA_CONDITION_TYPE_STOP
      description: SlaConditionType represents types of SLA conditions.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````