{
  "openapi": "3.0.1",
  "info": {
    "title": "dotnet-monitor",
    "version": "1.0"
  },
  "paths": {
    "/processes": {
      "get": {
        "tags": [
          "Diag"
        ],
        "summary": "Get the list of accessible processes.",
        "operationId": "GetProcesses",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProcessIdentifier"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          }
        }
      }
    },
    "/process": {
      "get": {
        "tags": [
          "Diag"
        ],
        "summary": "Get information about the specified process.",
        "operationId": "GetProcessInfo",
        "parameters": [
          {
            "name": "pid",
            "in": "query",
            "description": "Process ID used to identify the target process.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "uid",
            "in": "query",
            "description": "The Runtime instance cookie used to identify the target process.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Process name used to identify the target process.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessInfo"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          }
        }
      }
    },
    "/env": {
      "get": {
        "tags": [
          "Diag"
        ],
        "summary": "Get the environment block of the specified process.",
        "operationId": "GetProcessEnvironment",
        "parameters": [
          {
            "name": "pid",
            "in": "query",
            "description": "Process ID used to identify the target process.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "uid",
            "in": "query",
            "description": "The Runtime instance cookie used to identify the target process.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Process name used to identify the target process.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          }
        }
      }
    },
    "/dump": {
      "get": {
        "tags": [
          "Diag"
        ],
        "summary": "Capture a dump of a process.",
        "operationId": "CaptureDump",
        "parameters": [
          {
            "name": "pid",
            "in": "query",
            "description": "Process ID used to identify the target process.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "uid",
            "in": "query",
            "description": "The Runtime instance cookie used to identify the target process.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Process name used to identify the target process.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "The type of dump to capture.",
            "schema": {
              "enum": [
                "Full",
                "Mini",
                "WithHeap",
                "Triage"
              ],
              "type": "string",
              "default": "WithHeap"
            }
          },
          {
            "name": "egressProvider",
            "in": "query",
            "description": "The egress provider to which the dump is saved.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "description": "An optional set of comma-separated identifiers users can include to make an operation easier to identify.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "Accepted"
          },
          "400": {
            "$ref": "#/components/responses/BadRequestResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequestsResponse"
          }
        }
      }
    },
    "/gcdump": {
      "get": {
        "tags": [
          "Diag"
        ],
        "summary": "Capture a GC dump of a process.",
        "operationId": "CaptureGcDump",
        "parameters": [
          {
            "name": "pid",
            "in": "query",
            "description": "Process ID used to identify the target process.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "uid",
            "in": "query",
            "description": "The Runtime instance cookie used to identify the target process.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Process name used to identify the target process.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "egressProvider",
            "in": "query",
            "description": "The egress provider to which the GC dump is saved.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "description": "An optional set of comma-separated identifiers users can include to make an operation easier to identify.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "Accepted"
          },
          "400": {
            "$ref": "#/components/responses/BadRequestResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequestsResponse"
          }
        }
      }
    },
    "/trace": {
      "get": {
        "tags": [
          "Diag"
        ],
        "summary": "Capture a trace of a process.",
        "operationId": "CaptureTrace",
        "parameters": [
          {
            "name": "pid",
            "in": "query",
            "description": "Process ID used to identify the target process.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "uid",
            "in": "query",
            "description": "The Runtime instance cookie used to identify the target process.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Process name used to identify the target process.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "profile",
            "in": "query",
            "description": "The profiles enabled for the trace session.",
            "schema": {
              "enum": [
                "Cpu",
                "Http",
                "Logs",
                "Metrics",
                "GcCollect"
              ],
              "type": "string",
              "default": "Cpu, Http, Metrics, GcCollect"
            }
          },
          {
            "name": "durationSeconds",
            "in": "query",
            "description": "The duration of the trace session (in seconds).",
            "schema": {
              "maximum": 2147483647,
              "minimum": -1,
              "type": "integer",
              "format": "int32",
              "default": 30
            }
          },
          {
            "name": "egressProvider",
            "in": "query",
            "description": "The egress provider to which the trace is saved.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "description": "An optional set of comma-separated identifiers users can include to make an operation easier to identify.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "Accepted"
          },
          "400": {
            "$ref": "#/components/responses/BadRequestResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequestsResponse"
          }
        }
      },
      "post": {
        "tags": [
          "Diag"
        ],
        "summary": "Capture a trace of a process.",
        "operationId": "CaptureTraceCustom",
        "parameters": [
          {
            "name": "pid",
            "in": "query",
            "description": "Process ID used to identify the target process.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "uid",
            "in": "query",
            "description": "The Runtime instance cookie used to identify the target process.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Process name used to identify the target process.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "durationSeconds",
            "in": "query",
            "description": "The duration of the trace session (in seconds).",
            "schema": {
              "maximum": 2147483647,
              "minimum": -1,
              "type": "integer",
              "format": "int32",
              "default": 30
            }
          },
          {
            "name": "egressProvider",
            "in": "query",
            "description": "The egress provider to which the trace is saved.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "description": "An optional set of comma-separated identifiers users can include to make an operation easier to identify.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The trace configuration describing which events to capture.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventPipeConfiguration"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EventPipeConfiguration"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EventPipeConfiguration"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "202": {
            "description": "Accepted"
          },
          "400": {
            "$ref": "#/components/responses/BadRequestResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequestsResponse"
          }
        }
      }
    },
    "/logs": {
      "get": {
        "tags": [
          "Diag"
        ],
        "summary": "Capture a stream of logs from a process.",
        "operationId": "CaptureLogs",
        "parameters": [
          {
            "name": "pid",
            "in": "query",
            "description": "Process ID used to identify the target process.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "uid",
            "in": "query",
            "description": "The Runtime instance cookie used to identify the target process.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Process name used to identify the target process.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "durationSeconds",
            "in": "query",
            "description": "The duration of the logs session (in seconds).",
            "schema": {
              "maximum": 2147483647,
              "minimum": -1,
              "type": "integer",
              "format": "int32",
              "default": 30
            }
          },
          {
            "name": "level",
            "in": "query",
            "description": "The level of the logs to capture.",
            "schema": {
              "$ref": "#/components/schemas/LogLevel"
            }
          },
          {
            "name": "egressProvider",
            "in": "query",
            "description": "The egress provider to which the logs are saved.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "description": "An optional set of comma-separated identifiers users can include to make an operation easier to identify.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json-seq": {
                "schema": {
                  "type": "string"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "Accepted"
          },
          "400": {
            "$ref": "#/components/responses/BadRequestResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequestsResponse"
          }
        }
      },
      "post": {
        "tags": [
          "Diag"
        ],
        "summary": "Capture a stream of logs from a process.",
        "operationId": "CaptureLogsCustom",
        "parameters": [
          {
            "name": "pid",
            "in": "query",
            "description": "Process ID used to identify the target process.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "uid",
            "in": "query",
            "description": "The Runtime instance cookie used to identify the target process.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Process name used to identify the target process.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "durationSeconds",
            "in": "query",
            "description": "The duration of the logs session (in seconds).",
            "schema": {
              "maximum": 2147483647,
              "minimum": -1,
              "type": "integer",
              "format": "int32",
              "default": 30
            }
          },
          {
            "name": "egressProvider",
            "in": "query",
            "description": "The egress provider to which the logs are saved.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "description": "An optional set of comma-separated identifiers users can include to make an operation easier to identify.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The logs configuration describing which logs to capture.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LogsConfiguration"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LogsConfiguration"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LogsConfiguration"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json-seq": {
                "schema": {
                  "type": "string"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "Accepted"
          },
          "400": {
            "$ref": "#/components/responses/BadRequestResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequestsResponse"
          }
        }
      }
    },
    "/info": {
      "get": {
        "tags": [
          "Diag"
        ],
        "summary": "Gets versioning and listening mode information about Dotnet-Monitor",
        "operationId": "GetInfo",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DotnetMonitorInfo"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          }
        }
      }
    },
    "/collectionrules": {
      "get": {
        "tags": [
          "Diag"
        ],
        "summary": "Gets a brief summary about the current state of the collection rules.",
        "operationId": "GetCollectionRulesDescription",
        "parameters": [
          {
            "name": "pid",
            "in": "query",
            "description": "Process ID used to identify the target process.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "uid",
            "in": "query",
            "description": "The Runtime instance cookie used to identify the target process.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Process name used to identify the target process.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "$ref": "#/components/schemas/CollectionRuleDescription"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          }
        }
      }
    },
    "/collectionrules/{collectionRuleName}": {
      "get": {
        "tags": [
          "Diag"
        ],
        "summary": "Gets detailed information about the current state of the specified collection rule.",
        "operationId": "GetCollectionRuleDetailedDescription",
        "parameters": [
          {
            "name": "collectionRuleName",
            "in": "path",
            "description": "The name of the collection rule for which a detailed description should be provided.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pid",
            "in": "query",
            "description": "Process ID used to identify the target process.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "uid",
            "in": "query",
            "description": "The Runtime instance cookie used to identify the target process.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Process name used to identify the target process.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionRuleDetailedDescription"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          }
        }
      }
    },
    "/parameters": {
      "post": {
        "tags": [
          "Diag"
        ],
        "operationId": "CaptureParameters",
        "parameters": [
          {
            "name": "durationSeconds",
            "in": "query",
            "schema": {
              "maximum": 2147483647,
              "minimum": -1,
              "type": "integer",
              "format": "int32",
              "default": 30
            }
          },
          {
            "name": "pid",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "uid",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "egressProvider",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaptureParametersConfiguration"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CaptureParametersConfiguration"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CaptureParametersConfiguration"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json-seq": {
                "schema": {
                  "type": "string"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "Accepted"
          },
          "400": {
            "$ref": "#/components/responses/BadRequestResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequestsResponse"
          }
        }
      }
    },
    "/stacks": {
      "get": {
        "tags": [
          "Diag"
        ],
        "operationId": "CaptureStacks",
        "parameters": [
          {
            "name": "pid",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "uid",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "egressProvider",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/speedscope+json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "Accepted"
          },
          "400": {
            "$ref": "#/components/responses/BadRequestResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequestsResponse"
          }
        }
      }
    },
    "/livemetrics": {
      "get": {
        "tags": [
          "Diag"
        ],
        "summary": "Capture metrics for a process.",
        "operationId": "CaptureMetrics",
        "parameters": [
          {
            "name": "pid",
            "in": "query",
            "description": "Process ID used to identify the target process.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "uid",
            "in": "query",
            "description": "The Runtime instance cookie used to identify the target process.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Process name used to identify the target process.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "durationSeconds",
            "in": "query",
            "description": "The duration of the metrics session (in seconds).",
            "schema": {
              "maximum": 2147483647,
              "minimum": -1,
              "type": "integer",
              "format": "int32",
              "default": 30
            }
          },
          {
            "name": "egressProvider",
            "in": "query",
            "description": "The egress provider to which the metrics are saved.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "description": "An optional set of comma-separated identifiers users can include to make an operation easier to identify.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json-seq": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "Accepted"
          },
          "400": {
            "$ref": "#/components/responses/BadRequestResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequestsResponse"
          }
        }
      },
      "post": {
        "tags": [
          "Diag"
        ],
        "summary": "Capture metrics for a process.",
        "operationId": "CaptureMetricsCustom",
        "parameters": [
          {
            "name": "pid",
            "in": "query",
            "description": "Process ID used to identify the target process.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "uid",
            "in": "query",
            "description": "The Runtime instance cookie used to identify the target process.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Process name used to identify the target process.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "durationSeconds",
            "in": "query",
            "description": "The duration of the metrics session (in seconds).",
            "schema": {
              "maximum": 2147483647,
              "minimum": -1,
              "type": "integer",
              "format": "int32",
              "default": 30
            }
          },
          {
            "name": "egressProvider",
            "in": "query",
            "description": "The egress provider to which the metrics are saved.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "description": "An optional set of comma-separated identifiers users can include to make an operation easier to identify.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The metrics configuration describing which metrics to capture.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventMetricsConfiguration"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EventMetricsConfiguration"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EventMetricsConfiguration"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json-seq": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "Accepted"
          },
          "400": {
            "$ref": "#/components/responses/BadRequestResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequestsResponse"
          }
        }
      }
    },
    "/exceptions": {
      "get": {
        "tags": [
          "Exceptions"
        ],
        "summary": "Gets the exceptions from the target process.",
        "operationId": "GetExceptions",
        "parameters": [
          {
            "name": "pid",
            "in": "query",
            "description": "Process ID used to identify the target process.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "uid",
            "in": "query",
            "description": "The Runtime instance cookie used to identify the target process.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Process name used to identify the target process.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "egressProvider",
            "in": "query",
            "description": "The egress provider to which the exceptions are saved.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "description": "An optional set of comma-separated identifiers users can include to make an operation easier to identify.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json-seq": {
                "schema": {
                  "type": "string"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "Accepted"
          },
          "400": {
            "$ref": "#/components/responses/BadRequestResponse"
          }
        }
      },
      "post": {
        "tags": [
          "Exceptions"
        ],
        "summary": "Gets the exceptions from the target process.",
        "operationId": "CaptureExceptionsCustom",
        "parameters": [
          {
            "name": "pid",
            "in": "query",
            "description": "Process ID used to identify the target process.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "uid",
            "in": "query",
            "description": "The Runtime instance cookie used to identify the target process.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Process name used to identify the target process.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "egressProvider",
            "in": "query",
            "description": "The egress provider to which the exceptions are saved.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "description": "An optional set of comma-separated identifiers users can include to make an operation easier to identify.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The exceptions configuration describing which exceptions to include in the response.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExceptionsConfiguration"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ExceptionsConfiguration"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExceptionsConfiguration"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json-seq": {
                "schema": {
                  "type": "string"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestResponse"
          }
        }
      }
    },
    "/metrics": {
      "get": {
        "tags": [
          "Metrics"
        ],
        "summary": "Get a list of the current backlog of metrics for a process in the Prometheus exposition format.",
        "operationId": "GetMetrics",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain; version=0.0.4": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestResponse"
          }
        }
      }
    },
    "/operations": {
      "get": {
        "tags": [
          "Operations"
        ],
        "summary": "Gets the operations list for the specified process (or all processes if left unspecified).",
        "operationId": "GetOperations",
        "parameters": [
          {
            "name": "pid",
            "in": "query",
            "description": "Process ID used to identify the target process.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "uid",
            "in": "query",
            "description": "The Runtime instance cookie used to identify the target process.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Process name used to identify the target process.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "description": "An optional set of comma-separated identifiers users can include to make an operation easier to identify.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OperationSummary"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          }
        }
      }
    },
    "/operations/{operationId}": {
      "get": {
        "tags": [
          "Operations"
        ],
        "operationId": "GetOperationStatus",
        "parameters": [
          {
            "name": "operationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationStatus"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationStatus"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          }
        }
      },
      "delete": {
        "tags": [
          "Operations"
        ],
        "operationId": "CancelOperation",
        "parameters": [
          {
            "name": "operationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "stop",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "202": {
            "description": "Accepted"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CaptureParametersConfiguration": {
        "required": [
          "methods"
        ],
        "type": "object",
        "properties": {
          "methods": {
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MethodDescription"
            }
          },
          "useDebuggerDisplayAttribute": {
            "type": "boolean"
          },
          "captureLimit": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CollectionRuleDescription": {
        "type": "object",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/CollectionRuleState"
          },
          "stateReason": {
            "type": "string",
            "description": "Human-readable explanation for the current state of the collection rule.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CollectionRuleDetailedDescription": {
        "type": "object",
        "properties": {
          "lifetimeOccurrences": {
            "type": "integer",
            "description": "The number of times the trigger has executed for a process in its lifetime.",
            "format": "int32"
          },
          "slidingWindowOccurrences": {
            "type": "integer",
            "description": "The number of times the trigger has executed for a process in the current sliding window duration (as defined by Limits).",
            "format": "int32"
          },
          "actionCountLimit": {
            "type": "integer",
            "description": "The number of times the trigger can execute for a process before being limited (as defined by Limits).",
            "format": "int32"
          },
          "actionCountSlidingWindowDurationLimit": {
            "type": "string",
            "description": "The sliding window duration in which the actionCountLimit is the maximum number of occurrences (as defined by Limits).",
            "format": "time-span",
            "nullable": true,
            "example": "00:00:30"
          },
          "slidingWindowDurationCountdown": {
            "type": "string",
            "description": "The amount of time that needs to pass before the slidingWindowOccurrences drops below the actionCountLimit",
            "format": "time-span",
            "nullable": true,
            "example": "00:00:30"
          },
          "ruleFinishedCountdown": {
            "type": "string",
            "description": "The amount of time that needs to pass before the rule is finished",
            "format": "time-span",
            "nullable": true,
            "example": "00:00:30"
          },
          "state": {
            "$ref": "#/components/schemas/CollectionRuleState"
          },
          "stateReason": {
            "type": "string",
            "description": "Human-readable explanation for the current state of the collection rule.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CollectionRuleState": {
        "enum": [
          "Running",
          "ActionExecuting",
          "Throttled",
          "Finished"
        ],
        "type": "string"
      },
      "DiagnosticPortConnectionMode": {
        "enum": [
          "Connect",
          "Listen"
        ],
        "type": "string"
      },
      "DotnetMonitorInfo": {
        "required": [
          "capabilities"
        ],
        "type": "object",
        "properties": {
          "version": {
            "type": "string",
            "description": "The dotnet monitor version.",
            "nullable": true
          },
          "runtimeVersion": {
            "type": "string",
            "description": "The dotnet runtime version.",
            "nullable": true
          },
          "diagnosticPortMode": {
            "$ref": "#/components/schemas/DiagnosticPortConnectionMode"
          },
          "diagnosticPortName": {
            "type": "string",
            "description": "The name of the named pipe or unix domain socket to use for connecting to the diagnostic server.",
            "nullable": true
          },
          "capabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitorCapability"
            },
            "description": "The capabilities provided by dotnet-monitor.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EventLevel": {
        "enum": [
          "LogAlways",
          "Critical",
          "Error",
          "Warning",
          "Informational",
          "Verbose"
        ],
        "type": "string"
      },
      "EventMetricsConfiguration": {
        "type": "object",
        "properties": {
          "includeDefaultProviders": {
            "type": "boolean"
          },
          "providers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventMetricsProvider"
            },
            "nullable": true
          },
          "meters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventMetricsMeter"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EventMetricsMeter": {
        "required": [
          "meterName"
        ],
        "type": "object",
        "properties": {
          "meterName": {
            "minLength": 1,
            "type": "string"
          },
          "instrumentNames": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EventMetricsProvider": {
        "required": [
          "providerName"
        ],
        "type": "object",
        "properties": {
          "providerName": {
            "minLength": 1,
            "type": "string"
          },
          "counterNames": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EventPipeConfiguration": {
        "required": [
          "providers"
        ],
        "type": "object",
        "properties": {
          "providers": {
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventPipeProvider"
            }
          },
          "requestRundown": {
            "type": "boolean"
          },
          "bufferSizeInMB": {
            "maximum": 1024,
            "minimum": 1,
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "EventPipeProvider": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "keywords": {
            "type": "string",
            "nullable": true
          },
          "eventLevel": {
            "$ref": "#/components/schemas/EventLevel"
          },
          "arguments": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ExceptionFilter": {
        "type": "object",
        "properties": {
          "exceptionType": {
            "type": "string",
            "nullable": true
          },
          "moduleName": {
            "type": "string",
            "nullable": true
          },
          "typeName": {
            "type": "string",
            "nullable": true
          },
          "methodName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ExceptionsConfiguration": {
        "type": "object",
        "properties": {
          "include": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExceptionFilter"
            },
            "nullable": true
          },
          "exclude": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExceptionFilter"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "LogLevel": {
        "enum": [
          "Trace",
          "Debug",
          "Information",
          "Warning",
          "Error",
          "Critical",
          "None"
        ],
        "type": "string"
      },
      "LogsConfiguration": {
        "required": [
          "logLevel"
        ],
        "type": "object",
        "properties": {
          "logLevel": {
            "$ref": "#/components/schemas/LogLevel"
          },
          "filterSpecs": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/LogLevel"
            },
            "description": "The logger categories and levels at which logs are collected. Setting the log level to null will have logs collected from the corresponding category at the level set in the LogLevel property.",
            "nullable": true
          },
          "useAppFilters": {
            "type": "boolean",
            "description": "Set to true to collect logs at the application-defined categories and levels."
          }
        },
        "additionalProperties": false
      },
      "MethodDescription": {
        "required": [
          "moduleName",
          "typeName",
          "methodName"
        ],
        "type": "object",
        "properties": {
          "moduleName": {
            "minLength": 1,
            "type": "string"
          },
          "typeName": {
            "minLength": 1,
            "type": "string"
          },
          "methodName": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "MonitorCapability": {
        "required": [
          "name",
          "enabled"
        ],
        "type": "object",
        "properties": {
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "OperationError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "nullable": true
      },
      "OperationProcessInfo": {
        "type": "object",
        "properties": {
          "pid": {
            "type": "integer",
            "format": "int32"
          },
          "uid": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents the details of a given process used in an operation.",
        "nullable": true
      },
      "OperationState": {
        "enum": [
          "Starting",
          "Running",
          "Succeeded",
          "Failed",
          "Cancelled",
          "Stopping"
        ],
        "type": "string"
      },
      "OperationStatus": {
        "type": "object",
        "properties": {
          "resourceLocation": {
            "type": "string",
            "nullable": true
          },
          "error": {
            "$ref": "#/components/schemas/OperationError"
          },
          "operationId": {
            "type": "string",
            "format": "uuid"
          },
          "createdDateTime": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/OperationState"
          },
          "process": {
            "$ref": "#/components/schemas/OperationProcessInfo"
          },
          "egressProviderName": {
            "type": "string",
            "nullable": true
          },
          "isStoppable": {
            "type": "boolean"
          },
          "tags": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents the state of a long running operation. Used for all types of results, including successes and failures."
      },
      "OperationSummary": {
        "type": "object",
        "properties": {
          "operationId": {
            "type": "string",
            "format": "uuid"
          },
          "createdDateTime": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/OperationState"
          },
          "process": {
            "$ref": "#/components/schemas/OperationProcessInfo"
          },
          "egressProviderName": {
            "type": "string",
            "nullable": true
          },
          "isStoppable": {
            "type": "boolean"
          },
          "tags": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a partial model when enumerating all operations."
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": {}
      },
      "ProcessIdentifier": {
        "type": "object",
        "properties": {
          "pid": {
            "type": "integer",
            "format": "int32"
          },
          "uid": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ProcessInfo": {
        "type": "object",
        "properties": {
          "pid": {
            "type": "integer",
            "format": "int32"
          },
          "uid": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "commandLine": {
            "type": "string",
            "nullable": true
          },
          "operatingSystem": {
            "type": "string",
            "nullable": true
          },
          "processArchitecture": {
            "type": "string",
            "nullable": true
          },
          "managedEntryPointAssemblyName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ValidationProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "nullable": true
          }
        },
        "additionalProperties": {}
      }
    },
    "responses": {
      "BadRequestResponse": {
        "description": "Bad Request",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ValidationProblemDetails"
            }
          }
        }
      },
      "UnauthorizedResponse": {
        "description": "Unauthorized",
        "headers": {
          "WWW_Authenticate": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "TooManyRequestsResponse": {
        "description": "TooManyRequests",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Diag"
    },
    {
      "name": "Exceptions"
    },
    {
      "name": "Metrics"
    },
    {
      "name": "Operations"
    }
  ]
}