Ctrl K
ComunidadGuías…

schema/openapi.yaml

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
---
components:
  schemas:
    AgentCredentialRequest:
      properties:
        matchExpression:
          pattern: \S
          type: string
        password:
          pattern: \S
          type: string
        username:
          pattern: \S
          type: string
      required:
        - matchExpression
        - username
        - password
      type: object
    AgentRegistrationRequest:
      properties:
        callback:
          pattern: \S
          type: string
        context:
          additionalProperties:
            type: string
          type: object
        credential:
          $ref: '#/components/schemas/AgentCredentialRequest'
        fillStrategy:
          $ref: '#/components/schemas/DiscoveryFillStrategy'
        nodes:
          items:
            $ref: '#/components/schemas/DiscoveryNodeRequest'
          type: array
        realm:
          pattern: \S
          type: string
      required:
        - realm
        - callback
        - credential
      type: object
    AggregateLockInfoResult:
      properties:
        count:
          format: int64
          type: integer
        data:
          type: string
      required:
        - data
        - count
      type: object
    AggregateMethodResult:
      properties:
        count:
          format: int64
          type: integer
        data:
          type: string
      required:
        - data
        - count
      type: object
    AggregateStackTraceResult:
      properties:
        count:
          format: int64
          type: integer
        data:
          items:
            $ref: '#/components/schemas/StackFrame'
          type: array
      required:
        - data
        - count
      type: object
    AggregateThreadStateResult:
      properties:
        count:
          format: int64
          type: integer
        data:
          $ref: '#/components/schemas/ThreadState'
      required:
        - data
        - count
      type: object
    AnalysisResult:
      properties:
        evaluation:
          $ref: '#/components/schemas/Evaluation'
        name:
          type: string
        score:
          format: double
          type: number
        topic:
          type: string
      type: object
    Annotations:
      properties:
        cryostat:
          items:
            $ref: '#/components/schemas/KeyValue'
          type: array
        platform:
          items:
            $ref: '#/components/schemas/KeyValue'
          type: array
      required:
        - platform
        - cryostat
      type: object
    AnnotationsRequest:
      description: Annotations as accepted in request bodies
      properties:
        cryostat:
          additionalProperties:
            type: string
          type: object
        platform:
          additionalProperties:
            type: string
          type: object
      type: object
    Annotations_Flat:
      properties:
        cryostat:
          items:
            $ref: '#/components/schemas/KeyValue_Flat'
          type: array
        platform:
          items:
            $ref: '#/components/schemas/KeyValue_Flat'
          type: array
      required:
        - platform
        - cryostat
      type: object
    ApplicationHealth:
      properties:
        build:
          $ref: '#/components/schemas/BuildInfo'
        cryostatVersion:
          type: string
        dashboardAvailable:
          type: boolean
        dashboardConfigured:
          type: boolean
        datasourceAvailable:
          type: boolean
        datasourceConfigured:
          type: boolean
        reportsAvailable:
          type: boolean
        reportsConfigured:
          type: boolean
      required:
        - cryostatVersion
        - build
        - dashboardConfigured
        - dashboardAvailable
        - datasourceConfigured
        - datasourceAvailable
        - reportsConfigured
        - reportsAvailable
      type: object
    ArchivedHeapDumpDirectory:
      properties:
        heapDumps:
          items:
            $ref: '#/components/schemas/HeapDump'
          type: array
        jvmId:
          type: string
      required:
        - jvmId
        - heapDumps
      type: object
    ArchivedRecording:
      properties:
        archivedTime:
          format: int64
          type: integer
        downloadUrl:
          type: string
        jvmId:
          type: string
        metadata:
          $ref: '#/components/schemas/Metadata'
        name:
          type: string
        reportUrl:
          type: string
        size:
          format: int64
          type: integer
      required:
        - jvmId
        - name
        - downloadUrl
        - reportUrl
        - metadata
        - size
        - archivedTime
      type: object
    ArchivedRecordingDirectory:
      properties:
        connectUrl:
          type: string
        jvmId:
          type: string
        recordings:
          items:
            $ref: '#/components/schemas/ArchivedRecording'
          type: array
      required:
        - connectUrl
        - jvmId
        - recordings
      type: object
    ArchivedThreadDumpDirectory:
      properties:
        jvmId:
          type: string
        threadDumps:
          items:
            $ref: '#/components/schemas/ThreadDump'
          type: array
      required:
        - jvmId
        - threadDumps
      type: object
    ArchivedUnifiedLogDirectory:
      properties:
        jvmId:
          type: string
        unifiedLogs:
          items:
            $ref: '#/components/schemas/UnifiedLog'
          type: array
      required:
        - jvmId
        - unifiedLogs
      type: object
    AsyncProfile:
      properties:
        duration:
          format: int64
          type: integer
        id:
          type: string
        size:
          format: int64
          type: integer
        startTime:
          format: int64
          type: integer
      required:
        - id
        - startTime
        - duration
        - size
      type: object
    AsyncProfilerStatus:
      properties:
        availableEvents:
          additionalProperties:
            items:
              type: string
            type: array
          type: object
        currentProfile:
          $ref: '#/components/schemas/StartProfileRequest'
        status:
          $ref: '#/components/schemas/ProfilerStatus'
      required:
        - status
        - availableEvents
      type: object
    AuthResponse:
      properties:
        username:
          type: string
      required:
        - username
      type: object
    BuildInfo:
      properties:
        git:
          $ref: '#/components/schemas/GitInfo'
      type: object
    ContentType:
      enum:
        - NONE
        - BYTES
        - TIMESTAMP
        - MILLIS
        - NANOS
        - TICKS
        - ADDRESS
        - OS_THREAD
        - JAVA_THREAD
        - STACK_TRACE
        - CLASS
        - PERCENTAGE
      type: string
    Credential:
      properties:
        id:
          format: int64
          type: integer
        matchExpression:
          $ref: '#/components/schemas/MatchExpression'
        password:
          pattern: \S
          type: string
          writeOnly: true
        username:
          pattern: \S
          type: string
          writeOnly: true
      required:
        - matchExpression
        - username
        - password
      type: object
    CredentialMatchResult:
      properties:
        id:
          format: int64
          type: integer
        matchExpression:
          $ref: '#/components/schemas/MatchExpression'
        targets:
          items:
            $ref: '#/components/schemas/Target'
          type: array
      required:
        - id
        - matchExpression
        - targets
      type: object
    CredentialTestResult:
      enum:
        - SUCCESS
        - FAILURE
        - NA
      type: string
    DashboardUrl:
      properties:
        grafanaDashboardUrl:
          type: string
      required:
        - grafanaDashboardUrl
      type: object
    DatasourceUrl:
      properties:
        grafanaDatasourceUrl:
          type: string
      required:
        - grafanaDatasourceUrl
      type: object
    Date:
      examples:
        - 2022-03-10
      format: date
      type: string
    DeadlockInfo:
      properties:
        threads:
          items:
            $ref: '#/components/schemas/DeadlockedThread'
          type: array
      type: object
    DeadlockedThread:
      properties:
        heldBy:
          type: string
        locks:
          items:
            $ref: '#/components/schemas/LockInfo'
          type: array
        stackTrace:
          items:
            $ref: '#/components/schemas/StackFrame'
          type: array
        threadName:
          type: string
        waitingForMonitor:
          type: string
        waitingForObject:
          type: string
        waitingForObjectType:
          type: string
      type: object
    DiscoveryFillStrategy:
      enum:
        - NONE
        - KUBERNETES
      type: string
    DiscoveryNode:
      properties:
        children:
          items:
            $ref: '#/components/schemas/DiscoveryNode'
          type: array
        id:
          format: int64
          type: integer
        labels:
          items:
            $ref: '#/components/schemas/KeyValue'
          type: array
        name:
          pattern: \S
          type: string
        nodeType:
          pattern: \S
          type: string
        target:
          $ref: '#/components/schemas/Target'
      required:
        - name
        - nodeType
        - labels
      type: object
    DiscoveryNodeRequest:
      description: A discovery node as accepted in request bodies
      properties:
        children:
          items:
            $ref: '#/components/schemas/DiscoveryNodeRequest'
          type: array
        id:
          format: int64
          type: integer
        labels:
          additionalProperties:
            type: string
          type: object
        name:
          pattern: \S
          type: string
        nodeType:
          pattern: \S
          type: string
        target:
          $ref: '#/components/schemas/TargetRequest'
      required:
        - name
        - nodeType
        - labels
      type: object
    DiscoveryNode_Flat:
      properties:
        id:
          format: int64
          type: integer
        labels:
          items:
            $ref: '#/components/schemas/KeyValue_Flat'
          type: array
        name:
          pattern: \S
          type: string
        nodeType:
          pattern: \S
          type: string
        target:
          $ref: '#/components/schemas/Target_Flat'
      required:
        - name
        - nodeType
        - labels
      type: object
    DiscoveryPlugin:
      properties:
        builtin:
          readOnly: true
          type: boolean
        callback:
          format: uri
          type: string
        id:
          $ref: '#/components/schemas/UUID'
        realm:
          $ref: '#/components/schemas/DiscoveryNode'
      required:
        - id
        - realm
      type: object
    DiscoveryPlugin_Flat:
      properties:
        builtin:
          readOnly: true
          type: boolean
        callback:
          format: uri
          type: string
        id:
          $ref: '#/components/schemas/UUID'
        realm:
          $ref: '#/components/schemas/DiscoveryNode_Flat'
      required:
        - id
        - realm
      type: object
    DiscoveryPublicationRequest:
      properties:
        context:
          additionalProperties:
            type: string
          type:
            - object
            - "null"
        fillStrategy:
          $ref: '#/components/schemas/DiscoveryFillStrategy'
          enum:
            - NONE
            - KUBERNETES
          type:
            - string
            - "null"
        nodes:
          items:
            $ref: '#/components/schemas/DiscoveryNodeRequest'
          type: array
      type: object
    Duration:
      examples:
        - P1D
      format: duration
      type: string
    Evaluation:
      properties:
        explanation:
          type: string
        solution:
          type: string
        suggestions:
          items:
            $ref: '#/components/schemas/Suggestion'
          type: array
        summary:
          type: string
      type: object
    Event:
      properties:
        clazz:
          type: string
        description:
          type: string
        fields:
          items:
            $ref: '#/components/schemas/Field'
          type: array
        id:
          type: string
        location:
          $ref: '#/components/schemas/Location'
        methodDescriptor:
          type: string
        methodName:
          type: string
        name:
          type: string
        parameters:
          items:
            $ref: '#/components/schemas/MethodParameter'
          type: array
        path:
          type: string
        recordStackTrace:
          type: boolean
        returnValue:
          $ref: '#/components/schemas/MethodReturnValue'
        useRethrow:
          type: boolean
      type: object
    EventAvailability:
      enum:
        - AVAILABLE
        - ENABLED
        - DISABLED
        - NONE
        - UNKNOWN
      type: string
    Field:
      properties:
        contentType:
          $ref: '#/components/schemas/ContentType'
        converter:
          type: string
        description:
          type: string
        event:
          $ref: '#/components/schemas/Event'
        expression:
          type: string
        name:
          type: string
        relationKey:
          type: string
      type: object
    GitInfo:
      properties:
        hash:
          type: string
      type: object
    HeapDump:
      properties:
        downloadUrl:
          type: string
        heapDumpId:
          type: string
        jvmId:
          type: string
        lastModified:
          format: int64
          type: integer
        metadata:
          $ref: '#/components/schemas/Metadata'
        size:
          format: int64
          type: integer
      required:
        - jvmId
        - downloadUrl
        - heapDumpId
        - lastModified
        - size
        - metadata
      type: object
    JniInfo:
      properties:
        globalRefs:
          format: int32
          type: integer
        globalRefsMemory:
          format: int64
          type: integer
        weakRefs:
          format: int32
          type: integer
        weakRefsMemory:
          format: int64
          type: integer
      type: object
    KeyValue:
      description: |
        A single entry of a string-to-string map. Cryostat emits such maps as arrays of
        these objects, but accepts them in request bodies as plain JSON objects.
      properties:
        key:
          pattern: \S
          type: string
        value:
          type: string
      required:
        - key
        - value
      type: object
    KeyValue_Flat:
      description: |
        A single entry of a string-to-string map. Cryostat emits such maps as arrays of
        these objects, but accepts them in request bodies as plain JSON objects.
      properties:
        key:
          pattern: \S
          type: string
        value:
          type: string
      required:
        - key
        - value
      type: object
    LinkedRecordingDescriptor:
      properties:
        archiveOnStop:
          type: boolean
        continuous:
          type: boolean
        downloadUrl:
          type: string
        duration:
          format: int64
          type: integer
        id:
          format: int64
          type: integer
        maxAge:
          format: int64
          type: integer
        maxSize:
          format: int64
          type: integer
        metadata:
          $ref: '#/components/schemas/Metadata'
        name:
          type: string
        remoteId:
          format: int64
          type: integer
        reportUrl:
          type: string
        startTime:
          format: int64
          type: integer
        state:
          $ref: '#/components/schemas/RecordingState'
        toDisk:
          type: boolean
      required:
        - id
        - remoteId
        - state
        - duration
        - startTime
        - archiveOnStop
        - continuous
        - toDisk
        - maxSize
        - maxAge
        - name
        - downloadUrl
        - reportUrl
        - metadata
      type: object
    Location:
      enum:
        - ENTRY
        - EXIT
        - WRAP
      type: string
    LockInfo:
      properties:
        className:
          type: string
        lockId:
          type: string
        operation:
          $ref: '#/components/schemas/LockOperation'
        ownerThreadId:
          type: string
      type: object
    LockOperation:
      enum:
        - LOCKED
        - WAITING_TO_LOCK
        - WAITING_ON
        - PARKING
        - ELIMINATED
      type: string
    MappingResponse:
      properties:
        permission:
          $ref: '#/components/schemas/Permission'
        response:
          $ref: '#/components/schemas/PermissionResponse'
      required:
        - permission
        - response
      type: object
    MatchExpression:
      description: |
        A Common Expression Language snippet evaluated against a target JVM's properties.
      examples:
        - "true"
        - target.alias == 'my-app'
      type: string
    MatchedExpression:
      properties:
        expression:
          type: string
        id:
          format: int64
          type: integer
        targets:
          items:
            $ref: '#/components/schemas/Target'
          type: array
      required:
        - expression
        - targets
      type: object
    Metadata:
      properties:
        labels:
          items:
            $ref: '#/components/schemas/KeyValue'
          type: array
      required:
        - labels
      type: object
    MetadataBody:
      properties:
        labels:
          additionalProperties:
            type: string
          type: object
      required:
        - labels
      type: object
    MetadataRequest:
      description: Recording metadata as accepted in request bodies
      properties:
        labels:
          additionalProperties:
            type: string
          type: object
      required:
        - labels
      type: object
    MethodParameter:
      properties:
        contentType:
          $ref: '#/components/schemas/ContentType'
        converter:
          type: string
        description:
          type: string
        event:
          $ref: '#/components/schemas/Event'
        index:
          format: int32
          type: integer
        name:
          type: string
        relationKey:
          type: string
      type: object
    MethodReturnValue:
      properties:
        contentType:
          $ref: '#/components/schemas/ContentType'
        converter:
          type: string
        description:
          type: string
        event:
          $ref: '#/components/schemas/Event'
        name:
          type: string
        relationKey:
          type: string
      type: object
    Permission:
      properties:
        action:
          pattern: \S
          type: string
        resource:
          pattern: \S
          type: string
      required:
        - resource
        - action
      type: object
    PermissionResponse:
      properties:
        authorized:
          type: boolean
      required:
        - authorized
      type: object
    PluginRegistration:
      properties:
        env:
          items:
            $ref: '#/components/schemas/KeyValue'
          type: array
        id:
          type: string
        token:
          type: string
      required:
        - id
        - token
        - env
      type: object
    PluginRegistrationRequest:
      description: A discovery plugin registration or registration refresh
      properties:
        callback:
          pattern: \S
          type: string
        id:
          $ref: '#/components/schemas/UUID'
          format: uuid
          pattern: '[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}'
          type: string
        realm:
          pattern: \S
          type: string
        token:
          type: string
      required:
        - realm
        - callback
      type: object
    ProbeResponse:
      properties:
        description:
          type: string
        name:
          type: string
      required:
        - name
      type: object
    ProbeTemplate:
      properties:
        allowConverter:
          type: boolean
        allowToString:
          type: boolean
        classPrefix:
          type: string
        events:
          items:
            $ref: '#/components/schemas/Event'
          type: array
        fileName:
          type: string
      type: object
    ProbeTemplateResponse:
      properties:
        name:
          type: string
        xml:
          type: string
      required:
        - name
        - xml
      type: object
    ProfilerStatus:
      enum:
        - STOPPED
        - RUNNING
        - UNKNOWN
      type: string
    RecordingState:
      enum:
        - NEW
        - DELAYED
        - RUNNING
        - STOPPED
        - CLOSED
      type: string
    ReportRule:
      properties:
        id:
          type: string
        name:
          type: string
        requiredEvents:
          additionalProperties:
            $ref: '#/components/schemas/EventAvailability'
          type: object
        topic:
          type: string
      required:
        - id
        - name
        - topic
        - requiredEvents
      type: object
    RequestData:
      properties:
        matchExpression:
          type: string
        targetIds:
          items:
            format: int64
            type: integer
          type: array
      required:
        - matchExpression
      type: object
    RevisionDetail:
      properties:
        entities:
          additionalProperties:
            items: {}
            type: array
          type: object
        rev:
          format: int64
          type: integer
        revtstmp:
          format: int64
          type: integer
        username:
          type: string
      required:
        - rev
        - revtstmp
        - entities
      type: object
    RevisionSummary:
      properties:
        rev:
          format: int64
          type: integer
        revtstmp:
          format: int64
          type: integer
        username:
          type: string
      required:
        - rev
        - revtstmp
      type: object
    RevisionsResponse:
      properties:
        revisions:
          items:
            $ref: '#/components/schemas/RevisionSummary'
          type: array
        totalCount:
          format: int64
          type: integer
      required:
        - revisions
        - totalCount
      type: object
    Rule:
      properties:
        archivalPeriodSeconds:
          format: int32
          minimum: 0
          type: integer
        description:
          type: string
        enabled:
          type: boolean
        eventSpecifier:
          pattern: \S
          type: string
        id:
          format: int64
          type: integer
        initialDelaySeconds:
          format: int32
          minimum: 0
          type: integer
        matchExpression:
          $ref: '#/components/schemas/MatchExpression'
        maxAgeSeconds:
          format: int32
          minimum: -1
          type: integer
        maxSizeBytes:
          format: int32
          minimum: -1
          type: integer
        metadata:
          $ref: '#/components/schemas/Metadata'
        name:
          pattern: \S
          type: string
        preservedArchives:
          format: int32
          minimum: 0
          type: integer
      required:
        - name
        - description
        - matchExpression
        - eventSpecifier
        - archivalPeriodSeconds
        - initialDelaySeconds
        - preservedArchives
        - maxAgeSeconds
        - maxSizeBytes
        - metadata
        - enabled
      type: object
    RuleRequest:
      description: An Automated Rule as accepted in request bodies
      properties:
        archivalPeriodSeconds:
          format: int32
          minimum: 0
          type: integer
        description:
          type: string
        enabled:
          type: boolean
        eventSpecifier:
          pattern: \S
          type: string
        id:
          format: int64
          type: integer
        initialDelaySeconds:
          format: int32
          minimum: 0
          type: integer
        matchExpression:
          $ref: '#/components/schemas/MatchExpression'
        maxAgeSeconds:
          format: int32
          minimum: -1
          type: integer
        maxSizeBytes:
          format: int32
          minimum: -1
          type: integer
        metadata:
          $ref: '#/components/schemas/MetadataRequest'
        name:
          pattern: \S
          type: string
        preservedArchives:
          format: int32
          minimum: 0
          type: integer
      required:
        - name
        - description
        - matchExpression
        - eventSpecifier
        - metadata
      type: object
    RuleUpdateRequest:
      description: A partial update to an existing Automated Rule
      properties:
        archivalPeriodSeconds:
          format: int32
          minimum: 0
          type: integer
        description:
          type: string
        enabled:
          type: boolean
        eventSpecifier:
          pattern: \S
          type: string
        initialDelaySeconds:
          format: int32
          minimum: 0
          type: integer
        matchExpression:
          $ref: '#/components/schemas/MatchExpression'
        maxAgeSeconds:
          format: int32
          minimum: -1
          type: integer
        maxSizeBytes:
          format: int32
          minimum: -1
          type: integer
        metadata:
          $ref: '#/components/schemas/MetadataRequest'
        name:
          pattern: \S
          type: string
        preservedArchives:
          format: int32
          minimum: 0
          type: integer
      type: object
    SerializableEventTypeInfo:
      properties:
        category:
          items:
            type: string
          type: array
        description:
          type: string
        name:
          type: string
        options:
          additionalProperties:
            $ref: '#/components/schemas/SerializableOptionDescriptor'
          type: object
        typeId:
          type: string
      required:
        - typeId
        - name
        - description
        - category
        - options
      type: object
    SerializableOptionDescriptor:
      properties:
        defaultValue:
          type: string
        description:
          type: string
        name:
          type: string
      required:
        - name
        - description
        - defaultValue
      type: object
    SmartTrigger:
      properties:
        ID:
          type: string
        firstMetTime:
          $ref: '#/components/schemas/Date'
        id:
          type: string
        invocationCountTarget:
          format: int64
          type: integer
        recordingTemplateName:
          type: string
        simple:
          type: boolean
        state:
          $ref: '#/components/schemas/TriggerState'
        stopCondition:
          type: string
        stopDuration:
          format: int64
          type: integer
        stopMetTime:
          $ref: '#/components/schemas/Date'
        targetDuration:
          $ref: '#/components/schemas/Duration'
        timeConditionFirstMet:
          $ref: '#/components/schemas/Date'
        timeStopConditionFirstMet:
          $ref: '#/components/schemas/Date'
        triggerCondition:
          type: string
      type: object
    StackFrame:
      properties:
        className:
          type: string
        fileName:
          type: string
        lineNumber:
          format: int32
          type: integer
        methodName:
          type: string
        nativeMethod:
          type: boolean
      type: object
    StartProfileRequest:
      properties:
        duration:
          format: int64
          type: integer
        events:
          items:
            type: string
          type: array
        id:
          type: string
        startTime:
          format: int64
          type: integer
      required:
        - startTime
        - events
        - duration
      type: object
    Suggestion:
      properties:
        name:
          type: string
        setting:
          type: string
        value:
          type: string
      type: object
    Target:
      properties:
        agent:
          readOnly: true
          type: boolean
        alias:
          pattern: \S
          type: string
        annotations:
          $ref: '#/components/schemas/Annotations'
        connectUrl:
          format: uri
          type: string
        id:
          format: int64
          type: integer
        jvmId:
          type: string
        labels:
          items:
            $ref: '#/components/schemas/KeyValue'
          type: array
      required:
        - connectUrl
        - alias
        - labels
        - annotations
        - agent
      type: object
    TargetRequest:
      description: A target as accepted in request bodies
      properties:
        agent:
          readOnly: true
          type: boolean
        alias:
          pattern: \S
          type: string
        annotations:
          $ref: '#/components/schemas/AnnotationsRequest'
        connectUrl:
          format: uri
          type: string
        id:
          format: int64
          type: integer
        jvmId:
          type: string
        labels:
          additionalProperties:
            type: string
          type: object
      required:
        - connectUrl
        - alias
        - labels
        - annotations
      type: object
    TargetStub:
      properties:
        alias:
          type: string
        connectUrl:
          format: uri
          type: string
        credential:
          anyOf:
            - $ref: '#/components/schemas/Credential'
            - type: "null"
        password:
          type: string
        username:
          type: string
      required:
        - connectUrl
        - alias
      type: object
    Target_Flat:
      properties:
        agent:
          readOnly: true
          type: boolean
        alias:
          pattern: \S
          type: string
        annotations:
          $ref: '#/components/schemas/Annotations_Flat'
        connectUrl:
          format: uri
          type: string
        id:
          format: int64
          type: integer
        jvmId:
          type: string
        labels:
          items:
            $ref: '#/components/schemas/KeyValue_Flat'
          type: array
      required:
        - connectUrl
        - alias
        - labels
        - annotations
        - agent
      type: object
    Template:
      properties:
        description:
          type: string
        name:
          type: string
        provider:
          type: string
        type:
          $ref: '#/components/schemas/TemplateType'
      type: object
    TemplateDTO:
      properties:
        description:
          description: The template description
          examples:
            - A sample template
          type: string
        name:
          description: The template name
          examples:
            - My_Template
          pattern: \S
          type: string
        provider:
          description: The template provider
          examples:
            - MyOrg
          pattern: \S
          type: string
        type:
          $ref: '#/components/schemas/TemplateType'
          description: The template type
          type: string
      required:
        - name
        - description
        - provider
        - type
      type: object
    TemplateType:
      enum:
        - TARGET
        - CUSTOM
        - PRESET
      type: string
    ThreadDump:
      properties:
        downloadUrl:
          type: string
        jvmId:
          type: string
        lastModified:
          format: int64
          type: integer
        metadata:
          $ref: '#/components/schemas/Metadata'
        size:
          format: int64
          type: integer
        threadDumpId:
          type: string
      required:
        - jvmId
        - downloadUrl
        - threadDumpId
        - lastModified
        - size
        - metadata
      type: object
    ThreadDumpAnalysis:
      properties:
        aggregateLockInfo:
          items:
            $ref: '#/components/schemas/AggregateLockInfoResult'
          type: array
        aggregateStackTraces:
          items:
            $ref: '#/components/schemas/AggregateStackTraceResult'
          type: array
        aggregateThreadStates:
          items:
            $ref: '#/components/schemas/AggregateThreadStateResult'
          type: array
        deadlockInfos:
          items:
            $ref: '#/components/schemas/DeadlockInfo'
          type: array
        jniInfo:
          $ref: '#/components/schemas/JniInfo'
        jvmInfo:
          type: string
        runningMethods:
          items:
            $ref: '#/components/schemas/AggregateMethodResult'
          type: array
        specificFindings:
          items:
            $ref: '#/components/schemas/ThreadDumpAnalysisResult'
          type: array
        threads:
          items:
            $ref: '#/components/schemas/ThreadInfo'
          type: array
      required:
        - aggregateThreadStates
        - aggregateLockInfo
        - aggregateStackTraces
        - runningMethods
        - threads
        - specificFindings
      type: object
    ThreadDumpAnalysisResult:
      properties:
        explanation:
          type: string
        resultName:
          type: string
        score:
          format: int32
          type: integer
      required:
        - resultName
        - explanation
        - score
      type: object
    ThreadInfo:
      properties:
        additionalInfo:
          type: string
        carryingVirtualThreadId:
          format: int64
          type: integer
        cpuTimeSec:
          format: double
          type: number
        daemon:
          type: boolean
        elapsedTimeSec:
          format: double
          type: number
        locks:
          items:
            $ref: '#/components/schemas/LockInfo'
          type: array
        name:
          type: string
        nativeId:
          format: int64
          type: integer
        priority:
          format: int32
          type: integer
        stackTrace:
          items:
            $ref: '#/components/schemas/StackFrame'
          type: array
        state:
          $ref: '#/components/schemas/ThreadState'
        threadId:
          format: int64
          type: integer
      type: object
    ThreadState:
      enum:
        - NEW
        - RUNNABLE
        - BLOCKED
        - WAITING
        - TIMED_WAITING
        - TERMINATED
      type: string
    TriggerState:
      enum:
        - NEW
        - WAITING_HIGH
        - WAITING_LOW
        - RECORDING_ACTIVE
        - RECORDING_STOPPING
        - COMPLETE
      type: string
    UUID:
      format: uuid
      pattern: '[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}'
      type: string
    UnifiedLog:
      properties:
        downloadUrl:
          type: string
        jvmId:
          type: string
        lastModified:
          format: int64
          type: integer
        logId:
          type: string
        metadata:
          $ref: '#/components/schemas/Metadata'
        size:
          format: int64
          type: integer
      required:
        - jvmId
        - lastModified
        - size
        - metadata
      type: object
    UnifiedLogStatus:
      properties:
        decorators:
          type: string
        enabled:
          type: boolean
        logFilePath:
          type: string
        what:
          type: string
      required:
        - enabled
      type: object
    ViewList:
      properties:
        app:
          items:
            type: string
          type: array
        env:
          items:
            type: string
          type: array
        vm:
          items:
            type: string
          type: array
      required:
        - vm
        - env
        - app
      type: object
info:
  contact:
    email: cryostat-development@googlegroups.com
    name: Cryostat Community
    url: https://cryostat.io
  description: Cloud-Native JDK Flight Recorder
  license:
    name: Apache 2.0
    url: https://github.com/cryostatio/cryostat/blob/main/LICENSE
  title: Cryostat API
  version: 5.0.0-snapshot
openapi: 3.1.0
paths:
  /api/beta/audit/export:
    get:
      parameters:
        - in: query
          name: endTime
          schema:
            format: int64
            type: integer
        - in: query
          name: startTime
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema: {}
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Export Revisions
      tags:
        - Audit
  /api/beta/audit/revisions:
    get:
      parameters:
        - in: query
          name: endTime
          schema:
            format: int64
            type: integer
        - in: query
          name: page
          schema:
            default: 0
            format: int32
            type: integer
        - in: query
          name: pageSize
          schema:
            default: 50
            format: int32
            type: integer
        - in: query
          name: startTime
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RevisionsResponse'
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Get Revisions
      tags:
        - Audit
  /api/beta/audit/revisions/{rev}:
    get:
      parameters:
        - in: path
          name: rev
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RevisionDetail'
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Get Revision Detail
      tags:
        - Audit
  /api/beta/audit/target_lineage/{jvmId}:
    get:
      parameters:
        - in: path
          name: jvmId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscoveryNode'
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Target Lineage By Jvm Id
      tags:
        - Audit
  /api/beta/audit/targets/{jvmId}:
    get:
      parameters:
        - in: path
          name: jvmId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Target'
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Target By Jvm Id
      tags:
        - Audit
  /api/beta/auth/check:
    post:
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              properties:
                permission:
                  type: string
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionResponse'
          description: OK
        "400":
          description: Bad Request
      summary: Check if the caller is authorized for the given permission.
      tags:
        - Permission Check
  /api/beta/auth/mapping:
    post:
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/MappingResponse'
                type: array
          description: OK
      summary: Return the permission mappings for the current user
      tags:
        - Permission Check
  /api/beta/auth/permissions:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Permission'
                type: array
          description: OK
      summary: Return an exhaustive list of permissions known to Cryostat
      tags:
        - Permission Check
  /api/beta/diagnostics/fs/heapdumps:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ArchivedHeapDumpDirectory'
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: List Fs Heap Dumps
      tags:
        - Diagnostics
  /api/beta/diagnostics/fs/heapdumps/{jvmId}/{heapDumpId}:
    delete:
      parameters:
        - in: path
          name: heapDumpId
          required: true
          schema:
            type: string
        - in: path
          name: jvmId
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Delete Heap Dump By Path
      tags:
        - Diagnostics
  /api/beta/diagnostics/fs/threaddumps:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ArchivedThreadDumpDirectory'
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: List Fs Thread Dumps
      tags:
        - Diagnostics
  /api/beta/diagnostics/fs/threaddumps/{jvmId}/{threadDumpId}:
    delete:
      parameters:
        - in: path
          name: jvmId
          required: true
          schema:
            type: string
        - in: path
          name: threadDumpId
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Delete Thread Dump
      tags:
        - Diagnostics
  /api/beta/diagnostics/fs/unified-logs:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ArchivedUnifiedLogDirectory'
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: List Fs Unified Logs
      tags:
        - Unified Logs
  /api/beta/diagnostics/fs/unified-logs/{jvmId}/{logId}:
    delete:
      parameters:
        - in: path
          name: jvmId
          required: true
          schema:
            type: string
        - in: path
          name: logId
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Delete Unified Log By Path
      tags:
        - Unified Logs
    patch:
      parameters:
        - in: path
          name: jvmId
          required: true
          schema:
            type: string
        - in: path
          name: logId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetadataBody'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnifiedLog'
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Patch Fs Unified Log Metadata
      tags:
        - Unified Logs
  /api/beta/diagnostics/heapdump/download/{encodedKey}:
    get:
      parameters:
        - in: path
          name: encodedKey
          required: true
          schema:
            type: string
        - in: query
          name: filename
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema: {}
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Handle Heap Dumps Storage Download
      tags:
        - Diagnostics
  /api/beta/diagnostics/heapdump/upload/{jvmId}:
    post:
      parameters:
        - in: path
          name: jvmId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              properties:
                heapDump:
                  format: binary
                  type: string
                jobId:
                  type: string
                labels:
                  description: |
                    A JSON object of string key-value labels, sent as the raw text of
                    the form field.
                  examples:
                    - '{"key":"value"}'
                  type: string
              type: object
        required: true
      responses:
        "201":
          description: Created
        "400":
          description: Bad Request
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Upload Heap Dump
      tags:
        - Diagnostics
  /api/beta/diagnostics/targets/{jvmId}/heapdump/{heapDumpId}/analyze:
    post:
      parameters:
        - in: path
          name: heapDumpId
          required: true
          schema:
            type: string
        - in: path
          name: jvmId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema: {}
          description: OK
        "202":
          content:
            text/plain:
              schema:
                format: uuid
                type: string
          description: Heap dump analysis accepted; the body is the job ID
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Analyze Heap Dump
      tags:
        - Diagnostics
  /api/beta/diagnostics/targets/{jvmId}/threaddump/{threadDumpId}/analyze:
    post:
      parameters:
        - in: path
          name: jvmId
          required: true
          schema:
            type: string
        - in: path
          name: threadDumpId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThreadDumpAnalysis'
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Analyze Thread Dump
      tags:
        - Diagnostics
  /api/beta/diagnostics/targets/{targetId}/gc:
    post:
      description: |
        Request the remote target to perform a garbage collection. The target JVM is free to ignore this
        request. This is generally equivalent to a System.gc() call made within the target JVM.
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "201":
          description: Created
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Initiate a garbage collection on the specified target
      tags:
        - Diagnostics
  /api/beta/diagnostics/targets/{targetId}/heapdump:
    get:
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/HeapDump'
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Get Heap Dumps
      tags:
        - Diagnostics
    post:
      description: |
        Request the remote target to perform a heap dump.
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            text/plain:
              schema:
                format: uuid
                type: string
          description: Heap dump requested; the body is the job ID
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Initiates a heap dump on the specified target
      tags:
        - Diagnostics
  /api/beta/diagnostics/targets/{targetId}/heapdump/{heapDumpId}:
    delete:
      parameters:
        - in: path
          name: heapDumpId
          required: true
          schema:
            type: string
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "204":
          description: No Content
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Delete Heap Dump
      tags:
        - Diagnostics
  /api/beta/diagnostics/targets/{targetId}/threaddump:
    get:
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ThreadDump'
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Get Thread Dumps
      tags:
        - Diagnostics
    post:
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
        - in: query
          name: format
          schema:
            default: threadPrint
            type: string
      responses:
        "200":
          content:
            text/plain:
              schema:
                format: uuid
                type: string
          description: Thread dump requested; the body is the job ID
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Thread Dump
      tags:
        - Diagnostics
  /api/beta/diagnostics/targets/{targetId}/threaddump/{threadDumpId}:
    delete:
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
        - in: path
          name: threadDumpId
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Delete Thread Dump
      tags:
        - Diagnostics
  /api/beta/diagnostics/targets/{targetId}/unified-logging:
    delete:
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "204":
          description: No Content
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Disable Unified Logging
      tags:
        - Unified Logs
    get:
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnifiedLogStatus'
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Unified Logging Status
      tags:
        - Unified Logs
    patch:
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
        - in: query
          name: decorators
          schema:
            type: string
        - in: query
          name: what
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnifiedLog'
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Reconfigure Unified Logging
      tags:
        - Unified Logs
    post:
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
        - in: query
          name: decorators
          schema:
            type: string
        - in: query
          name: what
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnifiedLog'
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Enable Unified Logging
      tags:
        - Unified Logs
  /api/beta/diagnostics/targets/{targetId}/unified-logging/pull:
    post:
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnifiedLog'
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Pull Unified Log
      tags:
        - Unified Logs
  /api/beta/diagnostics/targets/{targetId}/unified-logs:
    get:
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/UnifiedLog'
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: List Unified Logs
      tags:
        - Unified Logs
  /api/beta/diagnostics/targets/{targetId}/unified-logs/{logId}:
    delete:
      parameters:
        - in: path
          name: logId
          required: true
          schema:
            type: string
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "204":
          description: No Content
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Delete Unified Log
      tags:
        - Unified Logs
    get:
      parameters:
        - in: path
          name: logId
          required: true
          schema:
            type: string
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
        - in: query
          name: filename
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema: {}
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Download Unified Log
      tags:
        - Unified Logs
    patch:
      parameters:
        - in: path
          name: logId
          required: true
          schema:
            type: string
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetadataBody'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnifiedLog'
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Patch Unified Log Metadata
      tags:
        - Unified Logs
  /api/beta/diagnostics/threaddump/download/{encodedKey}:
    get:
      parameters:
        - in: path
          name: encodedKey
          required: true
          schema:
            type: string
        - in: query
          name: filename
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema: {}
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Handle Thread Dumps Storage Download
      tags:
        - Diagnostics
  /api/beta/diagnostics/unified-logs/download/{encodedKey}:
    get:
      parameters:
        - in: path
          name: encodedKey
          required: true
          schema:
            type: string
        - in: query
          name: filename
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema: {}
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Handle Unified Log Storage Download
      tags:
        - Unified Logs
  /api/beta/discovery/credential_exists:
    post:
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              properties:
                script:
                  type: string
              type: object
          multipart/form-data:
            schema:
              properties:
                script:
                  type: string
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Credential'
          description: OK
        "400":
          description: Bad Request
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Check if a Credential already exists with an identical MatchExpression script.
      tags:
        - Discovery
  /api/beta/fs/recordings:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ArchivedRecordingDirectory'
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: List all archived recordings grouped by target
      tags:
        - Archived Recordings
  /api/beta/fs/recordings/{jvmId}:
    get:
      parameters:
        - in: path
          name: jvmId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ArchivedRecordingDirectory'
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: List all archived recordings belonging to the specified target
      tags:
        - Archived Recordings
  /api/beta/fs/recordings/{jvmId}/{filename}:
    delete:
      parameters:
        - in: path
          name: filename
          required: true
          schema:
            type: string
        - in: path
          name: jvmId
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Delete an archived recording by name belonging to the specified target
      tags:
        - Archived Recordings
  /api/beta/recording_analytics/{jvmId}/{filename}:
    post:
      parameters:
        - in: path
          name: filename
          required: true
          schema:
            type: string
        - in: path
          name: jvmId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              properties:
                query:
                  type: string
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  items:
                    type: string
                  type: array
                type: array
          description: OK
        "400":
          description: Bad Request
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Execute Query
      tags:
        - Jfr Analytics
  /api/beta/recording_synthesis/{jvmId}:
    post:
      parameters:
        - in: path
          name: jvmId
          required: true
          schema:
            type: string
        - in: query
          name: autoanalyze
          schema:
            default: false
            type: boolean
        - in: query
          name: fromTimestamp
          required: true
          schema:
            default: -1
            format: int64
            type: integer
        - in: query
          name: tag
          schema:
            type: string
        - in: query
          name: toTimestamp
          required: true
          schema:
            default: -1
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArchivedRecording'
          description: OK
        "202":
          content:
            text/plain:
              schema:
                format: uuid
                type: string
          description: Recording synthesis accepted; the body is the job ID
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Synthesize
      tags:
        - Recordings Synthesis
  /api/beta/recordings/{connectUrl}/{filename}:
    delete:
      parameters:
        - description: the connection URL associated with the target
          in: path
          name: connectUrl
          required: true
          schema:
            type: string
        - in: path
          name: filename
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Delete an archived recording belonging to the specified target
      tags:
        - Archived Recordings
  /api/beta/recordings/{jvmId}:
    get:
      parameters:
        - in: path
          name: jvmId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ArchivedRecording'
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: List archived recordings belonging to the specified target
      tags:
        - Archived Recordings
    post:
      description: |
        Upload a JFR binary file into the archives, associating the archived recording with a particular
        target JVM. This is primarily used by the Cryostat Agent for pushing harvested recording files.
      parameters:
        - in: path
          name: jvmId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              properties:
                labels:
                  description: |
                    A JSON object of string key-value labels, sent as the raw text of
                    the form field.
                  examples:
                    - '{"key":"value"}'
                  type: string
                maxFiles:
                  format: int32
                  type: integer
                recording:
                  format: binary
                  type: string
              type: object
        required: true
      responses:
        "201":
          description: Created
        "400":
          description: Bad Request
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Upload a JFR binary file to archives, associated with a particular target
      tags:
        - Archived Recordings
  /api/beta/targets/{jvmId}/recordings/{filename}/view:
    get:
      parameters:
        - in: path
          name: filename
          required: true
          schema:
            type: string
        - in: path
          name: jvmId
          required: true
          schema:
            type: string
        - in: query
          name: cellHeight
          required: false
          schema:
            format: int32
            type: integer
        - in: query
          name: truncate
          schema:
            type: string
        - in: query
          name: verbose
          schema:
            default: false
            type: boolean
        - in: query
          name: view
          schema:
            default: recording
            type: string
        - in: query
          name: width
          schema:
            default: 120
            format: int32
            type: integer
      responses:
        "200":
          content:
            text/plain:
              schema:
                type: string
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: View
      tags:
        - Jfr View
  /api/beta/targets/{jvmId}/recordings/{filename}/views:
    get:
      parameters:
        - in: path
          name: filename
          required: true
          schema:
            type: string
        - in: path
          name: jvmId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewList'
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Views
      tags:
        - Jfr View
  /api/beta/targets/{jvmId}/smart_triggers/sync:
    post:
      parameters:
        - in: path
          name: jvmId
          required: true
          schema:
            type: string
      requestBody:
        content:
          text/plain:
            schema:
              type: string
        required: true
      responses:
        "201":
          description: Created
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Sync Recordings
      tags:
        - Smart Triggers
  /api/beta/targets/{targetId}/async-profiler:
    get:
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/AsyncProfile'
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: List existing async-profiler profiles on the specified target
      tags:
        - Async Profiler
    post:
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartProfileRequest'
        required: true
      responses:
        "200":
          content:
            text/plain:
              schema:
                type: string
          description: OK
        "400":
          description: Bad Request
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Create a new async-profiler profile on the specified target
      tags:
        - Async Profiler
  /api/beta/targets/{targetId}/async-profiler/status:
    get:
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AsyncProfilerStatus'
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Get specified target's async-profiler status
      tags:
        - Async Profiler
  /api/beta/targets/{targetId}/async-profiler/{profileId}:
    delete:
      parameters:
        - in: path
          name: profileId
          required: true
          schema:
            type: string
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "204":
          description: No Content
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Delete an async-profiler profile from the specified target
      tags:
        - Async Profiler
    get:
      parameters:
        - in: path
          name: profileId
          required: true
          schema:
            type: string
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/octet-stream:
              schema:
                format: binary
                type: string
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Download an async-profiler binary file in JFR format
      tags:
        - Async Profiler
  /api/beta/targets/{targetId}/smart_triggers:
    get:
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/SmartTrigger'
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Retrieve all currently active Smart Triggers for a target
      tags:
        - Smart Triggers
    post:
      description: |
        Define a new Smart Trigger. A custom trigger definition must consist of both an expression
        that defines the overall trigger condition and the name of an event template that is used
        for the JFR Recording. The entire trigger expression must be enclosed in square brackets,
        with the recording template name specified after a ~. For an example definition:
        [ProcessCpuLoad > 0.2 ; TargetDuration > duration("30s")]~profile
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              properties:
                definition:
                  type: string
              type: object
        required: true
      responses:
        "201":
          description: Created
        "400":
          description: Bad Request
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Define a new Smart Trigger for a target
      tags:
        - Smart Triggers
  /api/beta/targets/{targetId}/smart_triggers/{uuid}:
    delete:
      description: |
        Delete an active Smart Trigger. A custom trigger definition must consist of both an expression
        that defines the overall trigger condition and the name of an event template that is used
        for the JFR Recording. The entire trigger expression must be enclosed in square brackets,
        with the recording template name specified after a ~. For an example definition:
        [ProcessCpuLoad > 0.2 ; TargetDuration > duration("30s")]~profile
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
        - in: path
          name: uuid
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Delete a currently active Smart Trigger for a target
      tags:
        - Smart Triggers
  /api/v4.1/metrics/reports:
    get:
      description: |
        Retrieve the latest aggregate report data across all targets with recent automated analysis reports
        scores. These are multi-dimensional metrics in Prometheus format.
      parameters:
        - in: query
          name: minScore
          schema:
            default: -1.0
            format: double
            type: number
      responses:
        "200":
          content:
            text/plain:
              schema:
                items:
                  type: string
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Retrieve the latest aggregate report data
      tags:
        - Analysis Report Aggregator
  /api/v4.1/metrics/reports/{jvmId}:
    get:
      description: |
        Retrieve the latest aggregate report data for a given target's recent automated analysis reports
        scores. These are multi-dimensional metrics in Prometheus format.
      parameters:
        - in: path
          name: jvmId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            text/plain:
              schema:
                type: string
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Retrieve the latest aggregate report data for the specified target
      tags:
        - Analysis Report Aggregator
  /api/v4.1/reports_rules:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ReportRule'
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: List Report Rules
      tags:
        - Reports
  /api/v4.1/targets/{targetId}/reports:
    get:
      description: |
        Get the current cached automated analysis report for the specified target, if any. If no such
        report currently exists for the specified target then the response will be an HTTP 404 Not Found,
        and automated analysis report generation will not be triggered.
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                additionalProperties:
                  $ref: '#/components/schemas/AnalysisResult'
                type: object
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Retrieve current automated analysis report for a target
      tags:
        - Reports
    post:
      description: |
        Composite action that 1) creates a Snapshot active recording on the specified target, 2) archives
        that Snapshot immediately, 3) performs automated analysis report generation on the archived file.
        The response will include a Location header pointing the client to an endpoint where the report can
        be retrieved, which may require the client to wait for a Job UUID notification.
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
        - in: query
          name: clean
          schema:
            default: true
            type: boolean
      responses:
        "202":
          content:
            text/plain:
              schema:
                format: uuid
                type: string
          description: Target analysis accepted; the body is the job ID
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Perform "target analysis" on the specified target
      tags:
        - Reports
  /api/v4.2/discovery/{id}:
    post:
      description: |
        Using its plugin ID and current token, a discovery plugin uses this endpoint to publish a JSON
        request body containing a list of discovery nodes. The discovery plugin itself is a Realm node in
        the overall discovery tree, so the published list of nodes here will replace the plugin Realm
        node's list of children.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            $ref: '#/components/schemas/UUID'
        - in: header
          name: Cryostat-Discovery-Authentication
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DiscoveryPublicationRequest'
        required: true
      responses:
        "201":
          description: Created
        "400":
          description: Bad Request
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Publish updated target discovery information
      tags:
        - Discovery
  /api/v4.3/discovery/agents:
    post:
      description: |
        Register a Cryostat Agent as a discovery plugin, create its associated Stored Credential, and
        publish its target nodes in one request. This endpoint is intentionally Agent-specific; the
        general Discovery Plugin registration and publication endpoints remain available for other
        Discovery Plugin implementations.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentRegistrationRequest'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PluginRegistration'
          description: OK
        "400":
          description: Bad Request
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Register and publish a Cryostat Agent
      tags:
        - Discovery
  /api/v4.3/targets/{targetId}/recordings_sync:
    post:
      description: Reconcile Cryostat's active recording model with the recordings present on the target.
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "204":
          description: Active recordings synchronized
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Resynchronize active recordings on the specified target
      tags:
        - Recording Sync
  /api/v4/activedownload/{id}:
    get:
      description: |
        Given a recording ID and a remote recording ID within that target, Cryostat will open a remote
        connection to the target and pipe back a data stream containing the Flight Recording binary file
        format for that recording. The client can feed this data to other tooling which ingests the JFR
        binary file format.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/octet-stream:
              schema:
                format: binary
                type: string
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Download a Flight Recording binary file
      tags:
        - Active Recordings Download
  /api/v4/auth:
    post:
      description: |
        In modern Cryostat deployments it is customary to deploy Cryostat behind an authenticating reverse
        proxy, so authentication is not actually handled by Cryostat itself. This endpoint is used by the
        Cryostat Web UI client to send an authenticated client request, including some authentication
        headers, to the Cryostat server so that it can extract information about the logged-in user. The
        response contains the current user's username if it can be determined, or else an empty string.
        This is only used for display in the Web UI. API clients do not need to use this endpoint.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthResponse'
          description: OK
      summary: Authenticate to the Cryostat server
      tags:
        - Auth
  /api/v4/credentials:
    get:
      description: |
        Returns a list of match results. A match result includes the Stored Credential's ID,
        its Match Expression, and a list of currently discovered Targets which match that expression
        and are therefore candidates for Cryostat to select this Credential.
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/CredentialMatchResult'
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: List information about all of the available Stored Credentials.
      tags:
        - Credentials
    post:
      description: |
        Define a new Stored Credential. Requires a match expression which defines which targets require
        this credential, and the username and password to use to pass authentication checks on those
        targets. Stored Credentials are stored in an encrypted keyring using symmetric encryption and an
        encryption key configured on the Cryostat database.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              properties:
                matchExpression:
                  type: string
                password:
                  type: string
                username:
                  type: string
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Credential'
          description: OK
        "400":
          description: Bad Request
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Define a new Stored Credential
      tags:
        - Credentials
  /api/v4/credentials/test/{targetId}:
    post:
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              properties:
                password:
                  type: string
                username:
                  type: string
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CredentialTestResult'
          description: OK
        "400":
          description: Bad Request
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Test if the supplied username/password are valid credentials for the specified target.
      tags:
        - Credentials
  /api/v4/credentials/{id}:
    delete:
      parameters:
        - in: path
          name: id
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "204":
          description: No Content
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Delete a Stored Credential
      tags:
        - Credentials
    get:
      description: |
        Get match result information about a specific Stored Credential. A match result includes the Stored
        Credential's ID, its Match Expression, and a list of currently discovered Targets which match that
        expression and are therefore candidates for Cryostat to select this Credential.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CredentialMatchResult'
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Get information about a Stored Credential
      tags:
        - Credentials
  /api/v4/discovery:
    get:
      parameters:
        - in: query
          name: mergeRealms
          schema:
            default: false
            type: boolean
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscoveryNode'
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Retrieve the entire discovery tree.
      tags:
        - Discovery
    post:
      description: |
        Register a new discovery plugin, or refresh an existing plugin's registration and generate a new
        token. New registrations require the realm and callback fields. Registration refreshers
        additionally require the id and token fields, which are supplied in the response to the original
        registration.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PluginRegistrationRequest'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PluginRegistration'
          description: OK
        "400":
          description: Bad Request
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Register as a new discovery plugin or refresh existing registration
      tags:
        - Discovery
  /api/v4/discovery/{id}:
    delete:
      description: |
        Delete the plugin's registration along with its discovery Realm node and all of its children. This
        is used when a discovery plugin is shutting down.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            $ref: '#/components/schemas/UUID'
        - in: header
          name: Cryostat-Discovery-Authentication
          schema:
            type: string
      responses:
        "204":
          description: No Content
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Delete the given plugin's registration
      tags:
        - Discovery
    get:
      description: |
        Endpoint for discovery plugins to check their own current registration status, ie. whether their
        registration ID is still known and their current token is still valid.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            $ref: '#/components/schemas/UUID'
        - in: header
          name: Cryostat-Discovery-Authentication
          schema:
            type: string
      responses:
        "204":
          description: No Content
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Endpoint for discovery plugins to check their own registration status
      tags:
        - Discovery
    post:
      description: |
        Using its plugin ID and current token, a discovery plugin uses this endpoint to publish a JSON
        request body containing a list of discovery nodes. The discovery plugin itself is a Realm node in
        the overall discovery tree, so the published list of nodes here will replace the plugin Realm
        node's list of children.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            $ref: '#/components/schemas/UUID'
        - in: header
          name: Cryostat-Discovery-Authentication
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              items:
                $ref: '#/components/schemas/DiscoveryNodeRequest'
              type: array
        required: true
      responses:
        "201":
          description: Created
        "400":
          description: Bad Request
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Publish updated target discovery information
      tags:
        - Discovery
  /api/v4/discovery_plugins:
    get:
      description: |
        Retrieve a list of currently registered discovery plugins only, not including their subtrees.
      parameters:
        - in: query
          name: realm
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/DiscoveryPlugin_Flat'
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: List currently registered discovery plugins
      tags:
        - Discovery
  /api/v4/discovery_plugins/{id}:
    get:
      description: |
        Retrieve information about a specific discovery plugin, including its discovery Realm node and
        subtree.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            $ref: '#/components/schemas/UUID'
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscoveryPlugin'
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Retrieve a specific discovery plugin
      tags:
        - Discovery
  /api/v4/download/{encodedKey}:
    get:
      description: |
        Get a download URL for an archived recording. The response will be an HTTP redirect with a Location
        header pointing to the location where the client can download the recording JFR binary file.
      parameters:
        - in: path
          name: encodedKey
          required: true
          schema:
            type: string
        - in: query
          name: filename
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema: {}
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Get a download URL for an archived recording
      tags:
        - Archived Recordings
  /api/v4/event_templates:
    get:
      description: |
        Retrieve a list of templates available on this Cryostat server. These templates can be applied to
        recordings started on any discovered target, but any event configurations within the template which
        reference events that do not exist on the target will be ignored.
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/TemplateDTO'
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: List server event templates
      tags:
        - Event Templates
    post:
      description: |
        Upload a new custom event template to the server. This must be in OpenJDK .jfc (XML) format.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              properties:
                template:
                  format: binary
                  type: string
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateDTO'
          description: OK
        "400":
          description: Bad Request
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Upload a custom event template
      tags:
        - Event Templates
  /api/v4/event_templates/{templateName}:
    delete:
      description: |
        Delete a custom event template from the server. Only previously uploaded custom event templates can
        be deleted.
      parameters:
        - in: path
          name: templateName
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Delete a custom event template
      tags:
        - Event Templates
  /api/v4/event_templates/{templateType}:
    get:
      parameters:
        - in: path
          name: templateType
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/TemplateDTO'
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: List server event templates of the given type
      tags:
        - Event Templates
  /api/v4/event_templates/{templateType}/{templateName}:
    get:
      description: |
        Get the .jfc (XML) file definition for the given server event template. This is the same type of
        event configuration file that ships with OpenJDK distributions.
      parameters:
        - in: path
          name: templateName
          required: true
          schema:
            type: string
        - in: path
          name: templateType
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/xml:
              schema:
                type: string
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Get a specific event template
      tags:
        - Event Templates
  /api/v4/grafana/{encodedKey}:
    post:
      description: |
        Upload an archived recording to the jfr-datasource for later online analysis in the associated
        Grafana dashboard.
      parameters:
        - in: path
          name: encodedKey
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            text/plain:
              schema:
                format: uuid
                type: string
          description: Grafana upload requested; the body is the job ID
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Upload an archived recording to Grafana for online analysis
      tags:
        - Archived Recordings
  /api/v4/grafana_dashboard_url:
    get:
      description: |
        Returns the URL for the associated Grafana dashboard instance. If there is an internally-accessible
        (for Cryostat) URL and an externally-accessible URL (for users) URL, the externally-accessible URL
        is preferred. If neither are configured then the response is an HTTP 400 Bad Request.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DashboardUrl'
          description: OK
      summary: Return the URL which users can visit to access the associated Grafana dashboard instance.
      tags:
        - Health
  /api/v4/grafana_datasource_url:
    get:
      description: |
        Returns the URL for the jfr-datasource instance which Cryostat is configured to use. This datasource
        accepts JFR file uploads from Cryostat and allows the Grafana dashboard to perform queries on the
        data within the recording file.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasourceUrl'
          description: OK
      summary: Return the URL to the associated jfr-datasource instance.
      tags:
        - Health
  /api/v4/logout:
    post:
      deprecated: true
      responses:
        "200":
          content:
            application/json:
              schema: {}
          description: OK
      summary: |
        OAuth2 sign out. Invalidate the current user session.
        Clients should directly visit the /oauth2/sign_out endpoint rather than relying on this endpoint
        and its redirect response.
      tags:
        - Auth
  /api/v4/matchExpressions:
    get:
      description: |
        Retrieve a list of all currently defined Match Expressions. These objects cannot be created
        independently in the current API definition, so each of these expressions will be associated with
        an Automated Rule or Stored Credential.
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  additionalProperties: {}
                  type: object
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Retrieve a list of all currently defined Match Expressions
      tags:
        - Match Expressions
    post:
      description: |
        Given a list of Target IDs, retrieve each Target instance from the database, then return the list
        filtered by the Targets which satisfy the Match Expression. If a given ID does not exist in the
        database then the whole request will fail. The expression must evaluate to a boolean value for each
        target. The match expression will not be stored.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestData'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MatchedExpression'
          description: OK
        "400":
          description: Bad Request
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Test a MatchExpression against a list of Targets
      tags:
        - Match Expressions
  /api/v4/matchExpressions/{id}:
    get:
      parameters:
        - in: path
          name: id
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MatchedExpression'
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Retrieve a single Match Expression
      tags:
        - Match Expressions
  /api/v4/probes:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ProbeTemplateResponse'
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: List defined probe templates
      tags:
        - JMC Agent Templates
    post:
      description: |2
            Create a probe template. This requires a probe template file upload in XML format. See
            https://github.com/openjdk/jmc/blob/master/agent/README.md and
            https://github.com/openjdk/jmc/blob/master/agent/src/main/resources/org/openjdk/jmc/agent/impl/jfrprobes_schema.xsd
            for more information about this file format.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              properties:
                name:
                  type: string
                probeTemplate:
                  format: binary
                  type: string
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProbeTemplate'
          description: OK
        "400":
          description: Bad Request
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Create a probe template
      tags:
        - JMC Agent Templates
  /api/v4/probes/{probeTemplateName}:
    delete:
      parameters:
        - in: path
          name: probeTemplateName
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Delete the specified probe template
      tags:
        - JMC Agent Templates
    get:
      parameters:
        - in: path
          name: probeTemplateName
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/xml:
              schema:
                type: string
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Get a specific probe template
      tags:
        - JMC Agent Templates
  /api/v4/recordings:
    get:
      description: |
        List all archived recordings from all targets, including (re-)uploaded files.
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ArchivedRecording'
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: List all archived recordings
      tags:
        - Archived Recordings
    post:
      description: |
        (Re-)upload a JFR binary file into the archives. This allows for the restoration of archived files
        after they have been otherwise removed, or for portability across Cryostat instances or between
        Cryostat version upgrades. This can also be used to upload JFR files which were not collected by
        Cryostat, so that Cryostat can be used to perform online analysis of the file.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              properties:
                labels:
                  description: |
                    A JSON object of string key-value labels, sent as the raw text of
                    the form field.
                  examples:
                    - '{"key":"value"}'
                  type: string
                recording:
                  format: binary
                  type: string
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                additionalProperties: {}
                type: object
          description: OK
        "400":
          description: Bad Request
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Upload a JFR binary file to archives
      tags:
        - Archived Recordings
  /api/v4/recordings/{filename}:
    delete:
      deprecated: true
      parameters:
        - in: path
          name: filename
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Delete an archived recording by filename
      tags:
        - Archived Recordings
  /api/v4/reports/{encodedKey}:
    get:
      description: |
        Given an encoded key from another endpoint, request an actual automated analysis report. If the
        requested report already exists in one of the tiered caching layers then the report will be
        directly returned as a JSON response body. If the report does not yet exist then the response will
        contain a Job UUID as a plain text response body. Cryostat will emit a WebSocket notification later
        using the same Job UUID to indicate that the report generation has been completed and the document
        is now available. The client may then re-issue a request to this endpoint with the same encoded key
        to retrieve the report document.
      parameters:
        - in: path
          name: encodedKey
          required: true
          schema:
            type: string
        - in: query
          name: filter
          schema:
            default: ""
            type: string
      responses:
        "200":
          content:
            application/json:
              schema: {}
          description: OK
        "202":
          content:
            text/plain:
              schema:
                format: uuid
                type: string
          description: Report generation accepted; the body is the job ID
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Get an automated analysis report
      tags:
        - Reports
  /api/v4/rules:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Rule'
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: List all Automated Rules
      tags:
        - Rules
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RuleRequest'
          application/x-www-form-urlencoded:
            schema:
              properties:
                archivalPeriodSeconds:
                  format: int32
                  type: integer
                description:
                  type: string
                enabled:
                  type: boolean
                eventSpecifier:
                  type: string
                initialDelaySeconds:
                  format: int32
                  type: integer
                matchExpression:
                  type: string
                maxAgeSeconds:
                  format: int32
                  type: integer
                maxSizeBytes:
                  format: int32
                  type: integer
                metadata:
                  type:
                    - string
                    - "null"
                name:
                  type: string
                preservedArchives:
                  format: int32
                  type: integer
              type: object
          multipart/form-data:
            schema:
              properties:
                archivalPeriodSeconds:
                  format: int32
                  type: integer
                description:
                  type: string
                enabled:
                  type: boolean
                eventSpecifier:
                  type: string
                initialDelaySeconds:
                  format: int32
                  type: integer
                matchExpression:
                  type: string
                maxAgeSeconds:
                  format: int32
                  type: integer
                maxSizeBytes:
                  format: int32
                  type: integer
                metadata:
                  type:
                    - string
                    - "null"
                name:
                  type: string
                preservedArchives:
                  format: int32
                  type: integer
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Rule'
          description: OK
        "400":
          description: Bad Request
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Create a new Automated Rule
      tags:
        - Rules
  /api/v4/rules/{name}:
    delete:
      parameters:
        - in: path
          name: name
          required: true
          schema:
            type: string
        - in: query
          name: clean
          schema:
            default: false
            type: boolean
      responses:
        "204":
          description: No Content
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Delete an Automated Rule by name
      tags:
        - Rules
    get:
      parameters:
        - in: path
          name: name
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Rule'
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Get an Automated Rule by name
      tags:
        - Rules
    patch:
      description: |
        Update Automated Rule parameters, such as whether the rule is currently active or not.
      parameters:
        - in: path
          name: name
          required: true
          schema:
            type: string
        - in: query
          name: clean
          schema:
            default: false
            type: boolean
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RuleUpdateRequest'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Rule'
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Update an Automated Rule
      tags:
        - Rules
  /api/v4/targets:
    get:
      description: |
        Get a list of the currently discovered targets. These are essentialy the same as the leaf nodes of
        the discovery tree. See 'GET /api/v4/discovery'.
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Target'
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: List currently discovered targets
      tags:
        - Targets
    post:
      description: |
        Create a target definition given a JSON request body target stub. The target stub must contain the
        connectUrl and alias, and optionally contain a username and password to create a Stored Credential
        associated with this target. The dryrun parameter can be used to perform this operation as a check,
        to verify if such a target could be created (no connectUrl conflict and acceptable credentials).
      parameters:
        - in: query
          name: dryrun
          schema:
            type: boolean
        - in: query
          name: storeCredentials
          schema:
            type: boolean
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TargetStub'
          application/x-www-form-urlencoded:
            schema:
              properties:
                alias:
                  type: string
                connectUrl:
                  format: uri
                  type: string
                password:
                  type: string
                username:
                  type: string
              type: object
          multipart/form-data:
            schema:
              properties:
                alias:
                  type: string
                connectUrl:
                  format: uri
                  type: string
                password:
                  type: string
                username:
                  type: string
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Target'
          description: OK
        "400":
          description: Bad Request
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Create a target definition
      tags:
        - Custom Discovery
  /api/v4/targets/{id}:
    delete:
      description: |
        Delete the specified target by ID. Only allows deletion of targets that were defined by the same
        Custom Target discovery API. Other targets must be removed by the discovery mechanisms which
        discovered them.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "204":
          description: No Content
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Delete the specified target
      tags:
        - Custom Discovery
    get:
      description: |
        Get details about a particular target given its ID.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Target'
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Get a target by ID
      tags:
        - Targets
  /api/v4/targets/{id}/event_templates:
    get:
      description: |
        Retrieve a list of event templates available on the given target when starting recordings on the
        same target. This includes all of the server's available templates, plus the templates available
        specifically from the target (ex. within /usr/lib/jvm/java/lib/jfr).
      parameters:
        - in: path
          name: id
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Template'
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Retrieve a list of event templates available on the given target
      tags:
        - Target Event Templates
  /api/v4/targets/{id}/event_templates/{templateType}/{templateName}:
    get:
      description: |
        Get the .jfc (XML) file definition for the given target event template.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            format: int64
            type: integer
        - in: path
          name: templateName
          required: true
          schema:
            type: string
        - in: path
          name: templateType
          required: true
          schema:
            $ref: '#/components/schemas/TemplateType'
      responses:
        "200":
          content:
            application/xml:
              schema:
                type: string
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Get a specific event template
      tags:
        - Target Event Templates
  /api/v4/targets/{id}/events:
    get:
      description: |
        Retrieve a list of JFR event types registered within the given target. This will include all
        built-in JFR types emitted by the target JVM, as well as custom event types specific to that
        target JVM if they are correctly registered. Custom event types, or event types emitted by plugins
        and extensions, may not always appear in this list.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            format: int64
            type: integer
        - in: query
          name: q
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/SerializableEventTypeInfo'
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: List JFR event types registered within the given target
      tags:
        - Events
  /api/v4/targets/{id}/probes:
    delete:
      parameters:
        - in: path
          name: id
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "204":
          description: No Content
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Remove all loaded probes from the specified target
      tags:
        - JMC Agent Probes
    get:
      parameters:
        - in: path
          name: id
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ProbeResponse'
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: List loaded probes on the specified target
      tags:
        - JMC Agent Probes
  /api/v4/targets/{id}/probes/{probeTemplateName}:
    post:
      description: |
        Activate a probe template (specified by template name) on the specified target (specified by ID).
      parameters:
        - in: path
          name: id
          required: true
          schema:
            format: int64
            type: integer
        - in: path
          name: probeTemplateName
          required: true
          schema:
            type: string
      responses:
        "201":
          description: Created
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Activate a probe template on the specified target
      tags:
        - JMC Agent Probes
  /api/v4/targets/{targetId}/recordingOptions:
    get:
      description: |
        Retrieve a map of the current options for the specified target.
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                additionalProperties: {}
                type: object
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Get the current set of options for the specified target
      tags:
        - Recording Options
    patch:
      description: |
        Set default recording options for the specified target. These options will be applied to any
        recordings started on this target if no override values are specified when the recording is
        created.
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              properties:
                maxAge:
                  type: string
                maxSize:
                  type: string
                toDisk:
                  type: string
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                additionalProperties: {}
                type: object
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Update the recording options for the specified target
      tags:
        - Recording Options
  /api/v4/targets/{targetId}/recordings:
    get:
      description: |
        Retrieve a list of active recordings currently present on the specified target. This may initiate
        a new remote connection to the target to update Cryostat's model of available recordings.
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/LinkedRecordingDescriptor'
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: List active recordings on the specified target
      tags:
        - Active Recordings
    post:
      description: |
        Create a new Flight Recording on the specified target. The recording will be immediately started
        and begin capturing Flight Recording data.
        The recording must be given a name (unique within the
        target). An event specifier string must be included, which follows the format
        "template={name},(type={type})". The type parameter is optional and the template name is required.
        See the Event Templates API for more information about the values that can be used here.
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              properties:
                archiveOnStop:
                  type:
                    - boolean
                    - "null"
                asprofEvents:
                  items:
                    type: string
                  type:
                    - array
                    - "null"
                duration:
                  format: int64
                  type:
                    - integer
                    - "null"
                events:
                  type: string
                maxAge:
                  format: int64
                  type:
                    - integer
                    - "null"
                maxSize:
                  format: int64
                  type:
                    - integer
                    - "null"
                metadata:
                  type:
                    - string
                    - "null"
                recordingName:
                  type: string
                replace:
                  type:
                    - string
                    - "null"
                restart:
                  deprecated: true
                  type:
                    - boolean
                    - "null"
                toDisk:
                  type:
                    - boolean
                    - "null"
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LinkedRecordingDescriptor'
          description: OK
        "400":
          description: Bad Request
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Start a new recording on the specified target
      tags:
        - Active Recordings
  /api/v4/targets/{targetId}/recordings/{remoteId}:
    delete:
      description: |
        Delete a recording from the specified target. This will remove it both from Cryostat's database
        as well as remove the recording and release all resources in the remote target JVM.
      parameters:
        - in: path
          name: remoteId
          required: true
          schema:
            format: int64
            type: integer
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "204":
          description: No Content
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Delete a recording from the specified target
      tags:
        - Active Recordings
    get:
      description: |
        Given a recording ID and a remote recording ID within that target, Cryostat will open a remote
        connection to the target and pipe back a data stream containing the Flight Recording binary file
        format for that recording. The client can feed this data to other tooling which ingests the JFR
        binary file format.
      parameters:
        - in: path
          name: remoteId
          required: true
          schema:
            format: int64
            type: integer
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/octet-stream:
              schema:
                format: binary
                type: string
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Download a Flight Recording binary file
      tags:
        - Active Recordings
    patch:
      description: |
        Remote recordings can be stopped by sending the request body "stop", or copied to archives by
        sending the request body "save". The body is case-insensitive.
      parameters:
        - in: path
          name: remoteId
          required: true
          schema:
            format: int64
            type: integer
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      requestBody:
        content:
          text/plain:
            schema:
              type: string
        required: true
      responses:
        "200":
          content:
            text/plain:
              schema:
                format: uuid
                type: string
          description: Recording archival requested; the body is the job ID for save
        "204":
          description: Recording stopped; the response has no body
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Update a remote recording on the specified target
      tags:
        - Active Recordings
  /api/v4/targets/{targetId}/recordings/{remoteId}/upload:
    post:
      description: |
        Upload the current data stream of the specified recording to the jfr-datasource for online analysis
        in the associated Grafana dashboard.
      parameters:
        - in: path
          name: remoteId
          required: true
          schema:
            format: int64
            type: integer
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            text/plain:
              schema:
                format: uuid
                type: string
          description: Grafana upload requested; the body is the job ID
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Upload a recording for analysis in Grafana dashboard
      tags:
        - Active Recordings
  /api/v4/targets/{targetId}/reports/{recordingId}:
    get:
      description: |
        Request an automated analysis report for a particular active recording on the specified target. If
        such a report already exists it will be returned directly as a JSON response body. If the report
        does not yet exist then an asynchronous task for it will be started, and a Job UUID will be
        sent as the plaintext response body.
      parameters:
        - in: path
          name: recordingId
          required: true
          schema:
            format: int64
            type: integer
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
        - in: query
          name: filter
          schema:
            default: ""
            type: string
      responses:
        "200":
          content:
            application/json:
              schema: {}
          description: OK
        "202":
          content:
            text/plain:
              schema:
                format: uuid
                type: string
          description: Report generation accepted; the body is the job ID
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Get an automated analysis report for a particular recording on the specified target
      tags:
        - Reports
  /api/v4/targets/{targetId}/snapshot:
    post:
      parameters:
        - in: path
          name: targetId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LinkedRecordingDescriptor'
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: Create a JFR Snapshot on the specified target
      tags:
        - Snapshots
  /api/v4/tls/certs:
    get:
      description: |
        In addition to the standard system/OpenJDK certificate trust store, Cryostat can be configured to
        trust additional certificates which may be presented by target JVM JMX servers or by Cryostat Agent
        HTTPS servers. This endpoint returns a list of local file paths to additional certificate files,
        which Cryostat will have loaded into an additional trust store at startup.
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  type: string
                type: array
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
        - SecurityScheme: []
      summary: List additional trusted SSL/TLS certificates
      tags:
        - Trust Store
  /health:
    get:
      description: |
        Returns a map indicating whether various external components (ex.
            jfr-datasource, grafana-dashboard) are configured and whether those
            components can be reached by the Cryostat application. Also includes
            application semantic version and build information.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationHealth'
          description: OK
      summary: Check the overall status of the application
      tags:
        - Health
  /health/liveness:
    get:
      description: |
        Performs a simple target connection request on a worker thread.
        This is a simply check to determine if the application has available threads
        to service requests. HTTP 204 No Content is the only expected response.
        If the application is not live and no worker threads are available,
        then the client will never receive a response.
      responses:
        "204":
          description: No Content
      summary: Check if the application is able to accept and respond to requests.
      tags:
        - Liveness
tags:
  - description: |
      Endpoints for Discovery Plugins to register with a Cryostat instance, refresh their registration
      token, publish information about known targets, and unregister themselves.

      The reference implementation of a Discovery Plugin is the Cryostat Agent.
    name: Discovery