{
  "openapi": "3.0.2",
  "info": {},
  "servers": [
    {
      "url": "https://public-api.linearb.io"
    }
  ],
  "paths": {
    "/api/v1/deployments": {
      "get": {
        "tags": [
          "Deployments"
        ],
        "summary": "List Deployments",
        "description": "**List Deployments**",
        "operationId": "get_deployments_api_v1_deployments_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Repository Id",
              "type": "integer"
            },
            "name": "repository_id",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "After",
              "type": "string"
            },
            "name": "after",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Before",
              "type": "string"
            },
            "name": "before",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Limit",
              "maximum": 100,
              "exclusiveMinimum": 0,
              "type": "integer",
              "default": 10
            },
            "name": "limit",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Offset",
              "minimum": 0,
              "type": "integer",
              "default": 0
            },
            "name": "offset",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Stage",
              "type": "string"
            },
            "name": "stage",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/DeploymentsSortByEnum"
                }
              ],
              "default": "published_at"
            },
            "name": "sort_by",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/DeploymentsSortDirEnum"
                }
              ],
              "default": "desc"
            },
            "name": "sort_dir",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Commit Sha",
              "type": "string"
            },
            "name": "commit_sha",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetDeploymentsResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      },
      "post": {
        "tags": [
          "Deployments"
        ],
        "summary": "Create Deployment",
        "description": "**Create Deployment**",
        "operationId": "post_deployment_api_v1_deployments_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDeploymentRequestModel"
              },
              "examples": {
                "example1": {
                  "summary": "Report release using tag",
                  "description": "",
                  "value": {
                    "repo_url": "https://github.com/owner/my-repo.git",
                    "ref_name": "v1.20.55"
                  }
                },
                "example2": {
                  "summary": "Report release using commit sha",
                  "description": "",
                  "value": {
                    "repo_url": "https://github.com/owner/my-repo.git",
                    "ref_name": "cf8386c6c92bb24b3e7a48a62cef758d6dbed0ca"
                  }
                },
                "example3": {
                  "summary": "Report custom stage",
                  "description": "",
                  "value": {
                    "repo_url": "https://github.com/owner/my-repo.git",
                    "ref_name": "cf8386c6c92bb24b3e7a48a62cef758d6dbed0ca",
                    "timestamp": "2022-03-14T22:23:34Z",
                    "stage": "my_stage"
                  }
                },
                "example4": {
                  "summary": "Report custom services",
                  "description": "",
                  "value": {
                    "repo_url": "https://github.com/owner/my-repo.git",
                    "ref_name": "cf8386c6c92bb24b3e7a48a62cef758d6dbed0ca",
                    "timestamp": "2022-03-14T22:23:34Z",
                    "stage": "my_stage",
                    "services": [
                      "service a",
                      "service b"
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateDeploymentResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v2/teams": {
      "get": {
        "tags": [
          "Teams V2"
        ],
        "summary": "Search Teams",
        "description": "Teams V2 API endpoint performs a LinearB teams paginated search",
        "operationId": "search_teams_api_v2_teams_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Offset",
              "minimum": 0,
              "type": "integer",
              "default": 0
            },
            "name": "offset",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Page Size",
              "maximum": 50,
              "minimum": 1,
              "type": "integer",
              "default": 50
            },
            "name": "page_size",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Search Term",
              "maxLength": 100,
              "minLength": 1,
              "type": "string"
            },
            "name": "search_term",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Nonmerged Members Only",
              "type": "boolean",
              "default": false
            },
            "name": "nonmerged_members_only",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamsV2PaginatedResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      },
      "post": {
        "tags": [
          "Teams V2"
        ],
        "summary": "Create Teams Api",
        "description": "Teams V2 API endpoint performs a LinearB teams bulk creation.",
        "operationId": "create_teams_api_api_v2_teams_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "title": "Teams List",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TeamV2CreationModel"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkCreateResponseModel"
                }
              }
            }
          },
          "200": {
            "description": "Successful Response"
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v2/teams/{team_id}": {
      "delete": {
        "tags": [
          "Teams V2"
        ],
        "summary": "Delete Team",
        "description": "Teams V2 API endpoint performs a LinearB delete a team based on the provided team ID.",
        "operationId": "delete_team_api_v2_teams__team_id__delete",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "Team Id",
              "type": "integer"
            },
            "name": "team_id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "200": {
            "description": "Successful Response"
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      },
      "patch": {
        "tags": [
          "Teams V2"
        ],
        "summary": "Patch Team",
        "description": "Teams V2 API endpoint performs a LinearB team patch based on the provided team ID.",
        "operationId": "patch_team_api_v2_teams__team_id__patch",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "Team Id",
              "type": "integer"
            },
            "name": "team_id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "title": "Team Partial Update (patch)",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/TeamV2PatchModel"
                  }
                ],
                "description": "Team partial update model"
              },
              "example": {
                "parent_team": "All Teams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamV2Model"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v2/teams/{team_id}/members": {
      "post": {
        "tags": [
          "Teams V2"
        ],
        "summary": "Add Members To Team",
        "description": "Teams V2 API endpoint performs a LinearB add members to a team.",
        "operationId": "add_members_to_team_api_v2_teams__team_id__members_post",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "Team Id",
              "type": "integer"
            },
            "name": "team_id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "title": "Members list",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/TeamsToUsersRequestModel"
                  }
                ],
                "description": "Members (users) to add to the team"
              },
              "example": {
                "user_ids": [
                  {
                    "id": 12345,
                    "joined_at": "2021-01-01"
                  }
                ],
                "emails": [
                  {
                    "email": "user@example.com",
                    "joined_at": "2025-06-13"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Add Members To Team Api V2 Teams  Team Id  Members Post",
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TeamToUserResponseModel"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v2/teams/{team_id}/members/{user_id_or_email}": {
      "delete": {
        "tags": [
          "Teams V2"
        ],
        "summary": "Remove Member From Team",
        "description": "Teams V2 API endpoint performs a LinearB remove a member from a team.",
        "operationId": "remove_member_from_team_api_v2_teams__team_id__members__user_id_or_email__delete",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "Team Id",
              "type": "integer"
            },
            "name": "team_id",
            "in": "path"
          },
          {
            "required": true,
            "schema": {
              "title": "User Id Or Email",
              "type": "string"
            },
            "name": "user_id_or_email",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "200": {
            "description": "Successful Response"
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v1/users": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Search Users",
        "description": "Users API endpoint performs a LinearB users paginated search",
        "operationId": "search_users_api_v1_users_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Offset",
              "minimum": 0,
              "type": "integer",
              "default": 0
            },
            "name": "offset",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Page Size",
              "maximum": 50,
              "minimum": 1,
              "type": "integer",
              "default": 50
            },
            "name": "page_size",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Order By",
              "enum": [
                "name",
                "email"
              ],
              "type": "string"
            },
            "name": "order_by",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Order Dir",
              "enum": [
                "ASC",
                "DESC"
              ],
              "type": "string"
            },
            "name": "order_dir",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Search By Field",
              "enum": [
                "name",
                "email"
              ],
              "type": "string"
            },
            "name": "search_by_field",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Search Term",
              "maxLength": 100,
              "minLength": 1,
              "type": "string"
            },
            "name": "search_term",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/UserRole"
            },
            "name": "user_role",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Include User Children",
              "type": "boolean",
              "default": false
            },
            "name": "include_user_children",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsersPaginatedResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      },
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Create Users Api",
        "description": "Users API endpoint performs a LinearB users creation.",
        "operationId": "create_users_api_api_v1_users_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "title": "Users List",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/UserCreationModel"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkCreateResponseModel"
                }
              }
            }
          },
          "200": {
            "description": "Successful Response"
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v1/users/{user_id}": {
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Delete User",
        "description": "Users API endpoint performs a LinearB delete user.",
        "operationId": "delete_user_api_v1_users__user_id__delete",
        "parameters": [
          {
            "description": "User object ID",
            "required": true,
            "schema": {
              "title": "User ID",
              "type": "integer",
              "description": "User object ID",
              "gte": 1
            },
            "name": "user_id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "200": {
            "description": "Successful Response"
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      },
      "patch": {
        "tags": [
          "Users"
        ],
        "summary": "Patch User",
        "description": "Users API endpoint performs a LinearB update user. Note: if custom_info is not provided, it will not be overwritten.",
        "operationId": "patch_user_api_v1_users__user_id__patch",
        "parameters": [
          {
            "description": "User object ID",
            "required": true,
            "schema": {
              "title": "User ID",
              "type": "integer",
              "description": "User object ID",
              "gte": 1
            },
            "name": "user_id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "title": "User Partial Update (patch)",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/UserPatchModel"
                  }
                ],
                "description": "User partial update model"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v1/jobs/status/{job_id}": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "summary": "Get Async Job Status",
        "description": "An endpoint to get the status of a job",
        "operationId": "get_async_job_status_api_v1_jobs_status__job_id__get",
        "parameters": [
          {
            "description": "Job UUID to check status",
            "required": true,
            "schema": {
              "title": "Job ID",
              "type": "string",
              "description": "Job UUID to check status"
            },
            "name": "job_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Get Async Job Status Api V1 Jobs Status  Job Id  Get",
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v2/measurements": {
      "post": {
        "tags": [
          "Measurements V2"
        ],
        "summary": "Post Metrics",
        "description": "Get V2 metrics endpoint\n\nThis API can be used in order to extract metrics data from LinearB on the fly.\nIt can be used to retrieve all metrics and for those that are supported,\nthe aggregation of p75, p50 and avg can be chosen.",
        "operationId": "post_metrics_api_v2_measurements_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetMetricsPayloadModel"
              },
              "examples": {
                "example1": {
                  "summary": "Get metrics with time ranges",
                  "description": "",
                  "value": {
                    "group_by": "organization",
                    "roll_up": "custom",
                    "requested_metrics": [
                      {
                        "name": "branch.computed.cycle_time",
                        "agg": "p75"
                      },
                      {
                        "name": "releases.count"
                      }
                    ],
                    "time_ranges": [
                      {
                        "after": "2022-05-27",
                        "before": "2022-05-29"
                      },
                      {
                        "after": "2022-05-30",
                        "before": "2022-06-05"
                      },
                      {
                        "after": "2022-06-06",
                        "before": "2022-06-12"
                      },
                      {
                        "after": "2022-06-13",
                        "before": "2022-06-19"
                      }
                    ]
                  }
                },
                "example2": {
                  "summary": "Get metrics with weekly rollup",
                  "description": "",
                  "value": {
                    "group_by": "organization",
                    "roll_up": "1w",
                    "requested_metrics": [
                      {
                        "name": "branch.computed.cycle_time",
                        "agg": "p75"
                      },
                      {
                        "name": "branch.computed.cycle_time",
                        "agg": "avg"
                      }
                    ],
                    "time_ranges": [
                      {
                        "after": "2022-05-27",
                        "before": "2022-06-29"
                      }
                    ]
                  }
                },
                "example3": {
                  "summary": "Get metrics for specific repository",
                  "description": "",
                  "value": {
                    "group_by": "organization",
                    "roll_up": "1d",
                    "repository_ids": [
                      456801317,
                      1235235
                    ],
                    "requested_metrics": [
                      {
                        "name": "branch.time_to_prod",
                        "agg": "p50"
                      }
                    ],
                    "time_ranges": [
                      {
                        "after": "2022-05-27",
                        "before": "2022-06-29"
                      }
                    ]
                  }
                },
                "example4": {
                  "summary": "Get metrics for specific teams",
                  "description": "",
                  "value": {
                    "group_by": "team",
                    "roll_up": "1mo",
                    "team_ids": [
                      5273,
                      58
                    ],
                    "requested_metrics": [
                      {
                        "name": "branch.time_to_prod",
                        "agg": "p50"
                      },
                      {
                        "name": "branch.time_to_pr",
                        "agg": "avg"
                      }
                    ],
                    "time_ranges": [
                      {
                        "after": "2022-05-27",
                        "before": "2023-06-29"
                      }
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Post Metrics Api V2 Measurements Post",
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MetricsResponseModel"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal server error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v2/measurements/export": {
      "post": {
        "tags": [
          "Measurements V2"
        ],
        "summary": "Export Metrics",
        "description": "Export V2 metrics endpoint\n\nThis API can be used in order to export metrics V2 data in CSV/JSON format.",
        "operationId": "export_metrics_api_v2_measurements_export_post",
        "parameters": [
          {
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ExporterFileFormats"
                }
              ],
              "default": "csv"
            },
            "name": "file_format",
            "in": "query"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExportMetricsPayload"
              },
              "examples": {
                "example1": {
                  "summary": "Get metrics with time ranges",
                  "description": "",
                  "value": {
                    "group_by": "organization",
                    "roll_up": "custom",
                    "requested_metrics": [
                      {
                        "name": "branch.computed.cycle_time",
                        "agg": "p75"
                      },
                      {
                        "name": "releases.count"
                      }
                    ],
                    "time_ranges": [
                      {
                        "after": "2022-05-27",
                        "before": "2022-05-29"
                      },
                      {
                        "after": "2022-05-30",
                        "before": "2022-06-05"
                      },
                      {
                        "after": "2022-06-06",
                        "before": "2022-06-12"
                      },
                      {
                        "after": "2022-06-13",
                        "before": "2022-06-19"
                      }
                    ]
                  }
                },
                "example2": {
                  "summary": "Get metrics with weekly rollup",
                  "description": "",
                  "value": {
                    "group_by": "organization",
                    "roll_up": "1w",
                    "requested_metrics": [
                      {
                        "name": "branch.computed.cycle_time",
                        "agg": "p75"
                      },
                      {
                        "name": "branch.computed.cycle_time",
                        "agg": "avg"
                      }
                    ],
                    "time_ranges": [
                      {
                        "after": "2022-05-27",
                        "before": "2022-06-29"
                      }
                    ]
                  }
                },
                "example3": {
                  "summary": "Get metrics for specific repository",
                  "description": "",
                  "value": {
                    "group_by": "organization",
                    "roll_up": "1d",
                    "repository_ids": [
                      456801317,
                      1235235
                    ],
                    "requested_metrics": [
                      {
                        "name": "branch.time_to_prod",
                        "agg": "p50"
                      }
                    ],
                    "time_ranges": [
                      {
                        "after": "2022-05-27",
                        "before": "2022-06-29"
                      }
                    ]
                  }
                },
                "example4": {
                  "summary": "Get metrics for specific teams",
                  "description": "",
                  "value": {
                    "group_by": "team",
                    "roll_up": "1mo",
                    "team_ids": [
                      5273,
                      58
                    ],
                    "requested_metrics": [
                      {
                        "name": "branch.time_to_prod",
                        "agg": "p50"
                      },
                      {
                        "name": "branch.time_to_pr",
                        "agg": "avg"
                      }
                    ],
                    "time_ranges": [
                      {
                        "after": "2022-05-27",
                        "before": "2023-06-29"
                      }
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportMeasurementResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          },
          "202": {
            "description": "Request to create report is accepted, but not ready yet"
          },
          "204": {
            "description": "No Content. Does not exist or has expired"
          }
        }
      }
    },
    "/api/v1/services/": {
      "get": {
        "tags": [
          "Services"
        ],
        "summary": "Get Services",
        "description": "Services API endpoint returns a list of services.",
        "operationId": "get_services_api_v1_services__get",
        "parameters": [
          {
            "description": "Repository ID to filter by. Return a list of all services, where this repository is presented",
            "required": false,
            "schema": {
              "title": "Repository ID",
              "exclusiveMinimum": 0,
              "type": "integer",
              "description": "Repository ID to filter by. Return a list of all services, where this repository is presented"
            },
            "name": "repository_id",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServicesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v1/services/{service_id}": {
      "get": {
        "tags": [
          "Services"
        ],
        "summary": "Get Service",
        "description": "Services API endpoint returns a single service by id.",
        "operationId": "get_service_api_v1_services__service_id__get",
        "parameters": [
          {
            "description": "Service object ID",
            "required": true,
            "schema": {
              "title": "Service ID",
              "type": "integer",
              "description": "Service object ID",
              "gte": 1
            },
            "name": "service_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v1/incidents/{provider_id}": {
      "get": {
        "tags": [
          "Incidents"
        ],
        "summary": "Get Incident",
        "description": "**Get Incident**",
        "operationId": "get_incident_api_v1_incidents__provider_id__get",
        "parameters": [
          {
            "description": "The unique identifier in the PM provider",
            "required": true,
            "schema": {
              "title": "Provider ID",
              "minLength": 1,
              "type": "string",
              "description": "The unique identifier in the PM provider"
            },
            "name": "provider_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetIncidentResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      },
      "post": {
        "tags": [
          "Incidents"
        ],
        "summary": "Update Incident",
        "description": "**Update Incident**",
        "operationId": "post_update_incident_api_v1_incidents__provider_id__post",
        "parameters": [
          {
            "description": "The unique identifier in the PM provider",
            "required": true,
            "schema": {
              "title": "Provider ID",
              "minLength": 1,
              "type": "string",
              "description": "The unique identifier in the PM provider"
            },
            "name": "provider_id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateIncidentRequestModel"
              },
              "examples": {
                "example1": {
                  "summary": "Update the incident",
                  "description": "",
                  "value": {
                    "title": "This is changed title",
                    "started_at": "2023-05-03 18:00",
                    "repository_urls": [
                      "https://github.com/myorg/repo2.git"
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "200": {
            "description": "Successful Response"
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      },
      "delete": {
        "tags": [
          "Incidents"
        ],
        "summary": "Delete Incident",
        "description": "**Delete Incident**",
        "operationId": "delete_incident_api_v1_incidents__provider_id__delete",
        "parameters": [
          {
            "description": "The unique identifier in the PM provider",
            "required": true,
            "schema": {
              "title": "Provider ID",
              "minLength": 1,
              "type": "string",
              "description": "The unique identifier in the PM provider"
            },
            "name": "provider_id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "200": {
            "description": "Successful Response"
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      },
      "patch": {
        "tags": [
          "Incidents"
        ],
        "summary": "Update Incident",
        "description": "**Update Incident**",
        "operationId": "patch_incident_api_v1_incidents__provider_id__patch",
        "parameters": [
          {
            "description": "The unique identifier in the PM provider",
            "required": true,
            "schema": {
              "title": "Provider ID",
              "minLength": 1,
              "type": "string",
              "description": "The unique identifier in the PM provider"
            },
            "name": "provider_id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateIncidentRequestModel"
              },
              "examples": {
                "example1": {
                  "summary": "Update the incident",
                  "description": "",
                  "value": {
                    "title": "This is changed title",
                    "started_at": "2023-05-03 18:00",
                    "repository_urls": [
                      "https://github.com/myorg/repo2.git"
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "200": {
            "description": "Successful Response"
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v1/incidents/search": {
      "post": {
        "tags": [
          "Incidents"
        ],
        "summary": "Search Incidents",
        "description": "**Search Incidents**",
        "operationId": "search_incidents_api_v1_incidents_search_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchIncidentsRequestModel"
              },
              "examples": {
                "example1": {
                  "summary": "Opened incidents after a date",
                  "description": "",
                  "value": {
                    "limit": 50,
                    "issued_at": {
                      "after": "2021-12-01"
                    },
                    "statuses": [
                      "open"
                    ]
                  }
                },
                "example2": {
                  "summary": "Uncompleted incidents between dates at specific repo",
                  "description": "",
                  "value": {
                    "limit": 50,
                    "issued_at": {
                      "after": "2021-01-01",
                      "before": "2022-12-31"
                    },
                    "repository_urls": [
                      "https://github.com/myorg/website.git"
                    ],
                    "statuses": [
                      "open",
                      "in-progress"
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchIncidentsResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v1/incidents": {
      "post": {
        "tags": [
          "Incidents"
        ],
        "summary": "Create Incident",
        "description": "**Create Incident**",
        "operationId": "post_incident_api_v1_incidents_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateIncidentRequestModel"
              },
              "examples": {
                "example1": {
                  "summary": "Create an incident",
                  "description": "",
                  "value": {
                    "provider_id": "provider_internal_id1",
                    "http_url": "http://myprovider.io/1",
                    "title": "This is critical production bug",
                    "issued_at": "2025-03-01T07:58:30.996",
                    "teams": [
                      "Team A",
                      "Team B"
                    ],
                    "repository_urls": [
                      "https://github.com/myorg/repo1.git",
                      "https://github.com/myorg/repo2.git"
                    ],
                    "git_ref": "0c708fdec272bc4446c6cabea4f0022c2b616aae"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "200": {
            "description": "Successful Response"
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v1/health": {
      "get": {
        "tags": [
          "Health"
        ],
        "summary": "Health",
        "description": ":route: GET /health\n:return: message OK if success",
        "operationId": "health_api_v1_health_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v1/report/metric": {
      "post": {
        "tags": [
          "Report Metric"
        ],
        "summary": "Post Custom Metrics",
        "description": "Post report event\nThis API allows you to report events in order to be able to query later in LinearB platform",
        "operationId": "post_custom_metrics_api_v1_report_metric_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostCustomMetricModel"
              },
              "examples": {
                "example1": {
                  "summary": "Example with all values",
                  "description": "",
                  "value": {
                    "source": "gitstream",
                    "timestamp": "2022-03-13 08:07:12.613",
                    "metric_name": "ran_cm",
                    "value": "2.5",
                    "entity": {
                      "pr_url": "https://github.com/hello/world/pull/1731"
                    },
                    "tags": {
                      "my_tag": "my_value"
                    }
                  }
                },
                "example2": {
                  "summary": "Example with commit_sha and pr url",
                  "description": "",
                  "value": {
                    "timestamp": "2022-03-13 08:07:12.613",
                    "metric_name": "ran_cm",
                    "entity": {
                      "pr_url": "https://github.com/testorg/testrepo/1234",
                      "commit_sha": "my_commit_sha"
                    }
                  }
                },
                "example3": {
                  "summary": "Example with timestamp that is EPOCH",
                  "description": "",
                  "value": {
                    "timestamp": 1706622966150,
                    "metric_name": "ran_cm",
                    "entity": {
                      "pr_url": "https://github.com/linear-b/linweb/pull/1731"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostCustomMetricResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal server error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v1/users/{user_id}/unmerge": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Unmerge Users",
        "description": "Users API endpoint splits one or more users out of a unified user. Each user listed becomes a standalone unified user again. The primary user cannot be unmerged - set a new primary first.",
        "operationId": "unmerge_users_api_v1_users__user_id__unmerge_post",
        "parameters": [
          {
            "description": "Unified user object ID",
            "required": true,
            "schema": {
              "title": "User Id",
              "type": "integer",
              "description": "Unified user object ID"
            },
            "name": "user_id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserUnmergeRequestModel"
              },
              "examples": {
                "example1": {
                  "summary": "Unmerge a single user",
                  "description": "",
                  "value": {
                    "users": [
                      1002
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserUnmergeResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v1/users/{user_id}/primary-user": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Set Primary User",
        "description": "Users API endpoint changes which user is the primary of a unified user's merge group. The requested user must already be merged under the unified user.",
        "operationId": "set_primary_user_api_v1_users__user_id__primary_user_post",
        "parameters": [
          {
            "description": "Unified user object ID",
            "required": true,
            "schema": {
              "title": "User Id",
              "type": "integer",
              "description": "Unified user object ID",
              "gte": 1
            },
            "name": "user_id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetPrimaryUserRequestModel"
              },
              "examples": {
                "example1": {
                  "summary": "Promote a merged user to primary",
                  "description": "",
                  "value": {
                    "primary_user": 1003
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetPrimaryUserResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v1/users/classification": {
      "patch": {
        "tags": [
          "Users"
        ],
        "summary": "Classify Users",
        "description": "Bulk-applies bot / metrics-exclusion classification flags to up to 25 users at once. Each user must resolve to a live Git contributor to be classified - every requested id absent from the `skipped` map in the response was applied; no flags are echoed back. On a 502, some users may already have been classified; retrying is safe because every flag is always set to an absolute value, never toggled.",
        "operationId": "classify_users_api_api_v1_users_classification_patch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UsersClassificationRequestModel"
              },
              "examples": {
                "example1": {
                  "summary": "Exclude one user from metrics and mark another as a bot",
                  "description": "",
                  "value": {
                    "apply_on_history": false,
                    "users": {
                      "42": {
                        "is_excluded_from_metrics": true
                      },
                      "500": {
                        "is_bot": true
                      }
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsersClassificationResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "502": {
            "description": "Bad Gateway"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v2/audit-log/export": {
      "get": {
        "tags": [
          "Audit Log"
        ],
        "summary": "Export Audit Log",
        "description": "Audit Log API endpoint exports the organization audit log as a downloadable CSV or JSON file. Returns a presigned S3 URL, valid for 1 hour, that downloads the file directly.",
        "operationId": "export_audit_log_api_v2_audit_log_export_get",
        "parameters": [
          {
            "description": "Start of the exported range (YYYY-MM-DD)",
            "required": true,
            "schema": {
              "title": "From",
              "type": "string",
              "format": "date",
              "description": "Start of the exported range (YYYY-MM-DD)"
            },
            "name": "from",
            "in": "query"
          },
          {
            "description": "End of the exported range (YYYY-MM-DD)",
            "required": true,
            "schema": {
              "title": "To",
              "type": "string",
              "format": "date",
              "description": "End of the exported range (YYYY-MM-DD)"
            },
            "name": "to",
            "in": "query"
          },
          {
            "description": "File format of the export",
            "required": false,
            "schema": {
              "title": "Format",
              "type": "string",
              "enum": [
                "csv",
                "json"
              ],
              "default": "csv",
              "description": "File format of the export"
            },
            "name": "format",
            "in": "query"
          },
          {
            "description": "Optional team filter. When omitted, the whole organization is exported",
            "required": false,
            "schema": {
              "title": "Team Id",
              "type": "integer",
              "description": "Optional team filter. When omitted, the whole organization is exported"
            },
            "name": "team_id",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditLogExportResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - invalid date range"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v1/tokens": {
      "post": {
        "tags": [
          "API Tokens"
        ],
        "summary": "Create Token",
        "description": "Create an API token owned by the calling account. The token value is returned once, in this response only.",
        "operationId": "create_token_endpoint_api_v1_tokens_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenCreateRequest"
              },
              "examples": {
                "example1": {
                  "summary": "Token that expires at the end of January",
                  "description": "",
                  "value": {
                    "name": "ci-pipeline",
                    "expires_at": "2027-01-31"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenCreated"
                }
              }
            }
          },
          "200": {
            "description": "Successful Response"
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - only admins can manage tokens"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      },
      "get": {
        "tags": [
          "API Tokens"
        ],
        "summary": "List Tokens",
        "description": "List the organization API tokens. By default, tokens created in the UI and through the API are returned.",
        "operationId": "list_tokens_endpoint_api_v1_tokens_get",
        "parameters": [
          {
            "description": "Only tokens in this status.",
            "required": false,
            "schema": {
              "title": "Status",
              "type": "string",
              "enum": [
                "active",
                "revoked",
                "expired"
              ]
            },
            "name": "status",
            "in": "query"
          },
          {
            "description": "Only tokens created this way. Defaults to user and api.",
            "required": false,
            "schema": {
              "title": "Source",
              "type": "string",
              "enum": [
                "user",
                "api",
                "otel"
              ]
            },
            "name": "source",
            "in": "query"
          },
          {
            "description": "Maximum number of tokens to return.",
            "required": false,
            "schema": {
              "title": "Limit",
              "type": "integer",
              "minimum": 1
            },
            "name": "limit",
            "in": "query"
          },
          {
            "description": "Number of tokens to skip.",
            "required": false,
            "schema": {
              "title": "Offset",
              "type": "integer",
              "minimum": 0
            },
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokensList"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - only admins can manage tokens"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v1/tokens/{token_id}": {
      "patch": {
        "tags": [
          "API Tokens"
        ],
        "summary": "Update Token",
        "description": "Rename a token, revoke it by setting status to revoked, or change its expiry with expires_at. A token that a detection setting uses cannot be revoked until that setting changes.",
        "operationId": "update_token_endpoint_api_v1_tokens__token_id__patch",
        "parameters": [
          {
            "description": "Token ID",
            "required": true,
            "schema": {
              "title": "Token Id",
              "type": "integer",
              "minimum": 1,
              "description": "Token ID"
            },
            "name": "token_id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenUpdateRequest"
              },
              "examples": {
                "example1": {
                  "summary": "Revoke a token",
                  "description": "",
                  "value": {
                    "status": "revoked"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenItem"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - only admins can manage tokens"
          },
          "404": {
            "description": "Token not found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict - a detection setting uses the token, the token is an otel token, or it is revoked or expired (expiry change)"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      },
      "delete": {
        "tags": [
          "API Tokens"
        ],
        "summary": "Delete Token",
        "description": "Permanently delete a token. Revoke an active token first. A token that a detection setting uses cannot be deleted until that setting changes.",
        "operationId": "delete_token_endpoint_api_v1_tokens__token_id__delete",
        "parameters": [
          {
            "description": "Token ID",
            "required": true,
            "schema": {
              "title": "Token Id",
              "type": "integer",
              "minimum": 1,
              "description": "Token ID"
            },
            "name": "token_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - only admins can manage tokens"
          },
          "404": {
            "description": "Token not found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict - the token is active, a detection setting uses it, or the token is an otel token"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v1/integrations": {
      "get": {
        "tags": [
          "Integrations"
        ],
        "summary": "List Integrations",
        "description": "Lists the organization's PM and git integrations - live ones by default",
        "operationId": "get_integrations_api_v1_integrations_get",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "description": "The integration type, `pm` or `git`. Omitted lists both",
              "title": "Type",
              "type": "string",
              "enum": [
                "pm",
                "git"
              ]
            },
            "description": "The integration type, `pm` or `git`. Omitted lists both"
          },
          {
            "name": "provider",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Only these providers, comma-separated, e.g. `github,jira`",
              "title": "Provider",
              "type": "string",
              "nullable": true
            },
            "description": "Only these providers, comma-separated, e.g. `github,jira`"
          },
          {
            "name": "include_invalid",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Also list deleted integrations",
              "default": false,
              "title": "Include Invalid"
            },
            "description": "Also list deleted integrations"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationsResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v1/pm/config/teams/{team_id}/scope": {
      "get": {
        "tags": [
          "PM Configuration"
        ],
        "summary": "Get Team PM Scope",
        "description": "Reads a team's PM scope, one item per integration",
        "operationId": "get_scope_api_v1_pm_config_teams__team_id__scope_get",
        "parameters": [
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "The team id",
              "title": "Team Id",
              "minimum": 0,
              "exclusiveMinimum": true
            },
            "description": "The team id"
          },
          {
            "name": "integration_ids",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Comma-separated integration ids, at most 50 distinct. Omitted = every live integration of the organization",
              "title": "Integration Ids",
              "type": "string",
              "nullable": true
            },
            "description": "Comma-separated integration ids, at most 50 distinct. Omitted = every live integration of the organization"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamScopeResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      },
      "delete": {
        "tags": [
          "PM Configuration"
        ],
        "summary": "Clear a Team PM Scope",
        "description": "Clears every scope key of a team's document on one integration. On jira this also sets the methodology to Kanban, as emptying the boards does",
        "operationId": "delete_scope_api_v1_pm_config_teams__team_id__scope_delete",
        "parameters": [
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "The team id",
              "title": "Team Id",
              "minimum": 0.0,
              "exclusiveMinimum": true
            },
            "description": "The team id"
          },
          {
            "name": "integration_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "The integration whose document is cleared",
              "title": "Integration Id",
              "minimum": 0.0,
              "exclusiveMinimum": true
            },
            "description": "The integration whose document is cleared"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamScopeWriteResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, or every document was refused for different reasons"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "The caller may not change PM configuration, or the license limit"
          },
          "404": {
            "description": "Every document named a team or integration that was not found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v1/pm/config/teams/scope": {
      "post": {
        "tags": [
          "PM Configuration"
        ],
        "summary": "Replace Team PM Scopes",
        "description": "Replaces the team's document on each integration an item names, and no other; a key the item omits is cleared. Each item must name at least one scope key; clearing a whole document is a DELETE of the team's scope",
        "operationId": "post_scopes_api_v1_pm_config_teams_scope_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamScopeReplaceRequestModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamScopeWriteResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, or every document was refused for different reasons"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "The caller may not change PM configuration, or the license limit"
          },
          "404": {
            "description": "Every document named a team or integration that was not found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      },
      "patch": {
        "tags": [
          "PM Configuration"
        ],
        "summary": "Update Team PM Scope Keys",
        "description": "Sets each scope key an item names on that integration, replacing the key's whole list; keys the item does not name are left as they are. With `mode=add` the entries sent are added to each named key's stored list instead (an entry already there is kept as is), and nothing is removed",
        "operationId": "patch_scopes_api_v1_pm_config_teams_scope_patch",
        "parameters": [
          {
            "name": "mode",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "merge",
                "add"
              ],
              "type": "string",
              "description": "`merge` replaces each key sent; `add` adds the entries sent to each key, removing nothing",
              "default": "merge",
              "title": "Mode"
            },
            "description": "`merge` replaces each key sent; `add` adds the entries sent to each key, removing nothing"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamScopeWriteRequestModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamScopeWriteResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, or every document was refused for different reasons"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "The caller may not change PM configuration, or the license limit"
          },
          "404": {
            "description": "Every document named a team or integration that was not found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v1/pm/config/teams/{team_id}/scope/{scope_key}": {
      "delete": {
        "tags": [
          "PM Configuration"
        ],
        "summary": "Clear a Team PM Scope Key",
        "description": "Clears one scope key of a team's document on one integration",
        "operationId": "delete_scope_key_api_v1_pm_config_teams__team_id__scope__scope_key__delete",
        "parameters": [
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "The team id",
              "title": "Team Id",
              "minimum": 0,
              "exclusiveMinimum": true
            },
            "description": "The team id"
          },
          {
            "name": "scope_key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The scope key: `boards`, `epics`, `labels`, `fields` or `project_team_areas`",
              "title": "Scope Key",
              "enum": [
                "boards",
                "epics",
                "labels",
                "fields",
                "project_team_areas"
              ]
            },
            "description": "The scope key: `boards`, `epics`, `labels`, `fields` or `project_team_areas`"
          },
          {
            "name": "integration_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "The integration whose document is changed",
              "title": "Integration Id",
              "minimum": 0,
              "exclusiveMinimum": true
            },
            "description": "The integration whose document is changed"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamScopeWriteResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, or every document was refused for different reasons"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "The caller may not change PM configuration, or the license limit"
          },
          "404": {
            "description": "Every document named a team or integration that was not found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v2/pm/entities/{entity_type}": {
      "get": {
        "tags": [
          "PM Configuration"
        ],
        "summary": "List PM Entities",
        "description": "Reads PM entities of one type: what exists, what is selected for collection, and what uses it",
        "operationId": "get_entities_api_v2_pm_entities__entity_type__get",
        "parameters": [
          {
            "name": "entity_type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The entity type - Azure Boards: areas, projects, teams; Jira: boards, epics, fields, labels, projects",
              "title": "Entity Type",
              "enum": [
                "boards",
                "projects",
                "epics",
                "labels",
                "fields",
                "teams",
                "areas"
              ]
            },
            "description": "The entity type - Azure Boards: areas, projects, teams; Jira: boards, epics, fields, labels, projects"
          },
          {
            "name": "integration_ids",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Comma-separated integration ids, at most 50 distinct. Omitted = every live integration of the organization",
              "title": "Integration Ids",
              "type": "string",
              "nullable": true
            },
            "description": "Comma-separated integration ids, at most 50 distinct. Omitted = every live integration of the organization"
          },
          {
            "name": "is_selected_for_collection",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Filter to the current collection selection. Valid only on a type that can be collected",
              "title": "Is Selected For Collection",
              "type": "boolean",
              "nullable": true
            },
            "description": "Filter to the current collection selection. Valid only on a type that can be collected"
          },
          {
            "name": "include_invalid",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Also return entities the provider no longer exposes",
              "default": false,
              "title": "Include Invalid"
            },
            "description": "Also return entities the provider no longer exposes"
          },
          {
            "name": "with_used_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Attach what depends on each entity, where that can be computed",
              "default": true,
              "title": "With Used By"
            },
            "description": "Attach what depends on each entity, where that can be computed"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "description": "Page size",
              "default": 100,
              "title": "Limit",
              "minimum": 0,
              "exclusiveMinimum": true
            },
            "description": "Page size"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Number of entities to skip",
              "default": 0,
              "title": "Offset"
            },
            "description": "Number of entities to skip"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PmEntitiesResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v2/pm/integrations/{integration_id}/entities/{entity_type}": {
      "patch": {
        "tags": [
          "PM Configuration"
        ],
        "summary": "Select PM Entities for Collection",
        "description": "Selects or deselects entities of one type on one integration for collection",
        "operationId": "patch_entities_api_v2_pm_integrations__integration_id__entities__entity_type__patch",
        "parameters": [
          {
            "name": "integration_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "The integration whose selection changes",
              "title": "Integration Id",
              "minimum": 0,
              "exclusiveMinimum": true
            },
            "description": "The integration whose selection changes"
          },
          {
            "name": "entity_type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The entity type - Azure Boards: projects; Jira: boards, projects",
              "title": "Entity Type",
              "enum": [
                "boards",
                "projects"
              ]
            },
            "description": "The entity type - Azure Boards: projects; Jira: boards, projects"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EntitySelectionRequestModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntitySelectionResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, or every entity was refused"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "The caller may not change PM configuration, or the license limit"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v1/git/repositories": {
      "get": {
        "tags": [
          "Git Repositories"
        ],
        "summary": "List Git Repositories",
        "description": "Retrieves Git repositories and their monitoring status. Supports filtering by exact repository name, provider_id, integration_ids, monitoring state and visibility (each list filter takes a single value or a comma-separated list). Results are paginated using page and page_size (maximum 100 items per page). Returns an empty list if no repositories match the specified filters.",
        "operationId": "list_repositories_api_v1_git_repositories_get",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page",
              "nullable": true
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Page Size",
              "nullable": true
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "title": "Name",
              "nullable": true
            }
          },
          {
            "name": "provider_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "title": "Provider Id",
              "nullable": true
            }
          },
          {
            "name": "integration_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Integration Ids",
              "nullable": true
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "State",
              "nullable": true
            }
          },
          {
            "name": "visibility",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Visibility",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitRepositoriesPaginatedResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      },
      "patch": {
        "tags": [
          "Git Repositories"
        ],
        "summary": "Monitor or Stop Monitoring Git Repositories",
        "description": "Sets repositories to `monitored` or `not_monitored`, up to 100 per call, exactly as Settings > Git > Repositories does. Monitoring starts collecting the repository and loads its history; it counts against the repository quota. Stopping monitoring stops collecting new data; data already collected is kept. Each repository is applied or rejected on its own: a repository already in the requested state is applied, and a rejected one carries a code and a message.",
        "operationId": "patch_repositories_api_v1_git_repositories_patch",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GitRepositoriesStateRequestModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitRepositoriesStateResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Every repository was rejected; an invalid body is also a 400",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitRepositoriesStateResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "The caller may not change repositories, or the repository quota"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v1/git/repositories/{repo_id}/config": {
      "get": {
        "tags": [
          "Git Repositories"
        ],
        "summary": "Get Repository Configuration",
        "description": "Reads a repository's settings. Each section is `source: repository` when the repository overrides it, with the organization default in `global_default`, or `source: global` when it follows the organization default. The organization-wide only sections (bot-authored pull request attribution, included file extensions, active branches duration, issue start time) are not listed; read them with `GET /api/v1/git/config`",
        "operationId": "get_config_api_v1_git_repositories__repo_id__config_get",
        "parameters": [
          {
            "name": "repo_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "The repository id, as `GET /api/v1/git/repositories` returns it",
              "title": "Repo Id",
              "minimum": 1
            },
            "description": "The repository id, as `GET /api/v1/git/repositories` returns it"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RepositoryConfigResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - an unknown section, an invalid value or regular expression"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "The repository was not found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      },
      "put": {
        "tags": [
          "Git Repositories"
        ],
        "summary": "Replace Repository Configuration",
        "description": "Replaces the repository's overrides: each section sent overrides the organization default, and every section not sent returns to the organization default. Changing excluded branches, excluded base branches, excluded file extensions, release detection or coding time strategy recomputes history asynchronously",
        "operationId": "put_config_api_v1_git_repositories__repo_id__config_put",
        "parameters": [
          {
            "name": "repo_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "The repository id, as `GET /api/v1/git/repositories` returns it",
              "title": "Repo Id",
              "minimum": 1
            },
            "description": "The repository id, as `GET /api/v1/git/repositories` returns it"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RepositorySettingsWriteModel"
              },
              "example": {
                "exclude_branches": {
                  "patterns": [
                    "^develop$",
                    "^main$",
                    "^release/.*"
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RepositoryConfigResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - an unknown section, an invalid value or regular expression"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "The repository was not found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      },
      "patch": {
        "tags": [
          "Git Repositories"
        ],
        "summary": "Update Repository Configuration",
        "description": "Overrides the organization default of each section sent for the repository; sections not sent are left as they are. Never changes the organization default. Changing excluded branches, excluded base branches, excluded file extensions, release detection or coding time strategy recomputes history asynchronously",
        "operationId": "patch_config_api_v1_git_repositories__repo_id__config_patch",
        "parameters": [
          {
            "name": "repo_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "The repository id, as `GET /api/v1/git/repositories` returns it",
              "title": "Repo Id",
              "minimum": 1
            },
            "description": "The repository id, as `GET /api/v1/git/repositories` returns it"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RepositorySettingsWriteModel"
              },
              "example": {
                "exclude_branches": {
                  "patterns": [
                    "^develop$",
                    "^main$",
                    "^release/.*"
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RepositoryConfigResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - an unknown section, an invalid value or regular expression"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "The repository was not found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      },
      "delete": {
        "tags": [
          "Git Repositories"
        ],
        "summary": "Remove Repository Configuration Overrides",
        "description": "Removes every override of the repository, so it follows the organization default - including any later change to it. Changing excluded branches, excluded base branches, excluded file extensions, release detection or coding time strategy recomputes history asynchronously",
        "operationId": "delete_config_api_v1_git_repositories__repo_id__config_delete",
        "parameters": [
          {
            "name": "repo_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "The repository id, as `GET /api/v1/git/repositories` returns it",
              "title": "Repo Id",
              "minimum": 1
            },
            "description": "The repository id, as `GET /api/v1/git/repositories` returns it"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RepositoryConfigResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - an unknown section, an invalid value or regular expression"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "The repository was not found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v1/git/repositories/{repo_id}/config/{section}": {
      "delete": {
        "tags": [
          "Git Repositories"
        ],
        "summary": "Remove a Repository Configuration Override",
        "description": "Removes the repository's override of one section, so that section follows the organization default. Removing a section the repository does not override changes nothing. Changing excluded branches, excluded base branches, excluded file extensions, release detection or coding time strategy recomputes history asynchronously",
        "operationId": "delete_config_section_api_v1_git_repositories__repo_id__config__section__delete",
        "parameters": [
          {
            "name": "repo_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "The repository id, as `GET /api/v1/git/repositories` returns it",
              "title": "Repo Id",
              "minimum": 1
            },
            "description": "The repository id, as `GET /api/v1/git/repositories` returns it"
          },
          {
            "name": "section",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "releases_detection",
                "draft_pull_requests",
                "default_branch",
                "exclude_branches",
                "exclude_base_branches",
                "exclude_file_extensions",
                "coding_time_strategy"
              ],
              "type": "string",
              "description": "The section whose override is removed",
              "title": "Section"
            },
            "description": "The section whose override is removed"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RepositoryConfigResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - an unknown section, an invalid value or regular expression"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "The repository was not found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v1/git/config/teams/{team_id}/scope": {
      "get": {
        "tags": [
          "Git Configuration"
        ],
        "summary": "Get Team Git Scope",
        "description": "Reads the repositories and services assigned to the team itself. Scope assigned to descendant teams is not included; a group is addressed by its own team id",
        "operationId": "get_scope_api_v1_git_config_teams__team_id__scope_get",
        "parameters": [
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "The team id",
              "title": "Team Id",
              "minimum": 1
            },
            "description": "The team id"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamGitScopeResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, or an id was refused - repositories not found or not monitored, services not found. A refused write changes nothing"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "The team was not found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      },
      "put": {
        "tags": [
          "Git Configuration"
        ],
        "summary": "Replace Team Git Scope",
        "description": "Replaces the team's whole Git scope: each key sent becomes exactly that list, and a key not sent is cleared. At least one key is required; clearing the whole scope is a DELETE",
        "operationId": "put_scope_api_v1_git_config_teams__team_id__scope_put",
        "parameters": [
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "The team id",
              "title": "Team Id",
              "minimum": 1
            },
            "description": "The team id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamGitScopeWriteRequestModel"
              },
              "example": {
                "repository_ids": [
                  101,
                  102
                ],
                "service_ids": [
                  201
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamGitScopeResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, or an id was refused - repositories not found or not monitored, services not found. A refused write changes nothing"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "The team was not found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      },
      "patch": {
        "tags": [
          "Git Configuration"
        ],
        "summary": "Update Team Git Scope Keys",
        "description": "Writes each key sent; keys not sent are left as they are. `mode=merge` (default) replaces each key's whole list; `mode=add` adds the ids sent to it and removes none",
        "operationId": "patch_scope_api_v1_git_config_teams__team_id__scope_patch",
        "parameters": [
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "The team id",
              "title": "Team Id",
              "minimum": 1
            },
            "description": "The team id"
          },
          {
            "name": "mode",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "merge",
                "add"
              ],
              "type": "string",
              "description": "`merge` replaces each key sent; `add` adds to it",
              "default": "merge",
              "title": "Mode"
            },
            "description": "`merge` replaces each key sent; `add` adds to it"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamGitScopeWriteRequestModel"
              },
              "example": {
                "repository_ids": [
                  101,
                  102
                ],
                "service_ids": [
                  201
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamGitScopeResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, or an id was refused - repositories not found or not monitored, services not found. A refused write changes nothing"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "The team was not found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      },
      "delete": {
        "tags": [
          "Git Configuration"
        ],
        "summary": "Clear Team Git Scope",
        "description": "Clears the team's whole Git scope - both repositories and services",
        "operationId": "delete_scope_api_v1_git_config_teams__team_id__scope_delete",
        "parameters": [
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "The team id",
              "title": "Team Id",
              "minimum": 1
            },
            "description": "The team id"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamGitScopeResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, or an id was refused - repositories not found or not monitored, services not found. A refused write changes nothing"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "The team was not found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v1/git/config/teams/{team_id}/scope/{scope_key}": {
      "delete": {
        "tags": [
          "Git Configuration"
        ],
        "summary": "Clear a Team Git Scope Key",
        "description": "Clears one key of the team's Git scope - the same write as a PATCH sending it as an empty list",
        "operationId": "delete_scope_key_api_v1_git_config_teams__team_id__scope__scope_key__delete",
        "parameters": [
          {
            "name": "team_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "The team id",
              "title": "Team Id",
              "minimum": 1
            },
            "description": "The team id"
          },
          {
            "name": "scope_key",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "repositories",
                "services"
              ],
              "type": "string",
              "description": "The scope key: repositories or services",
              "title": "Scope Key"
            },
            "description": "The scope key: repositories or services"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamGitScopeResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, or an id was refused - repositories not found or not monitored, services not found. A refused write changes nothing"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "The team was not found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    },
    "/api/v1/git/config": {
      "get": {
        "tags": [
          "Git Configuration"
        ],
        "summary": "Get Git Configuration",
        "description": "Reads the organization-wide default of every repository setting section, and the organization-wide only sections (bot-authored pull request attribution, included file extensions, active branches duration, issue start time). A repository without an override of a section follows this default",
        "operationId": "get_config_api_v1_git_config_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitConfigResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - an unknown section, an invalid value or regular expression"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      },
      "patch": {
        "tags": [
          "Git Configuration"
        ],
        "summary": "Update Git Configuration",
        "description": "Writes the organization-wide default of each section sent; sections not sent are left as they are. Repositories that override a section are unaffected. Changing excluded branches, excluded base branches, excluded file extensions, release detection or coding time strategy recomputes history asynchronously, and so does changing included file extensions",
        "operationId": "patch_config_api_v1_git_config_patch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GitSettingsWriteModel"
              },
              "example": {
                "exclude_branches": {
                  "patterns": [
                    "^main$",
                    "^master$",
                    "^release/.*"
                  ]
                },
                "releases_detection": {
                  "method": "tags",
                  "pattern": ".*",
                  "backfill_days": 90
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitConfigResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - an unknown section, an invalid value or regular expression"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "405": {
            "description": "Method Not Allowed"
          },
          "409": {
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BulkCreateResponseModel": {
        "title": "BulkCreateResponseModel",
        "required": [
          "job_id",
          "message"
        ],
        "type": "object",
        "properties": {
          "job_id": {
            "title": "Job Id",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "description": "Response model for bulk (users/teams) creation operation.\n\n:param job_id: The unique identifier for the bulk creation job.\n:type job_id: str\n:param message: A human-readable message describing the result of the operation.\n:type message: str"
      },
      "ConnectedUsersModel": {
        "title": "ConnectedUsersModel",
        "type": "object",
        "properties": {
          "platform_users": {
            "title": "Platform Users",
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "List of connected platform user accounts"
          },
          "contributors": {
            "title": "Contributors",
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "List of connected contributor accounts"
          }
        },
        "description": "Model representing connected users in different platforms.\n\nAttributes:\n    platform_users (List[Dict]): List of connected platform user accounts\n    contributors (List[Dict]): List of connected contributor accounts"
      },
      "ContributorModel": {
        "title": "ContributorModel",
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "provider_id": {
            "title": "Provider Id",
            "type": "string"
          },
          "email": {
            "title": "Email",
            "type": "string"
          },
          "parent_id": {
            "title": "Parent Id",
            "type": "integer"
          },
          "roles": {
            "title": "Roles",
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Contributors response model with partial data. "
      },
      "ContributorPartialResponseModel": {
        "title": "ContributorPartialResponseModel",
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "provider_id": {
            "title": "Provider Id",
            "type": "string"
          },
          "email": {
            "title": "Email",
            "type": "string"
          }
        },
        "description": "Contributors response model with partial data. "
      },
      "CreateCycleTimeStageRequestModel": {
        "title": "CreateCycleTimeStageRequestModel",
        "required": [
          "repo_url",
          "head_sha",
          "event_time",
          "stage_id"
        ],
        "type": "object",
        "properties": {
          "repo_url": {
            "title": "Repository url",
            "maxLength": 250,
            "minLength": 15,
            "pattern": "^https://[a-zA-Z0-9./+^@_%-]+(:\\d{1,5})?(/[a-zA-Z0-9./+^@_%-]*)?$",
            "type": "string"
          },
          "head_sha": {
            "title": "Head commit sha",
            "pattern": "^[0-9a-z]{5,40}$",
            "type": "string"
          },
          "event_time": {
            "title": "Epoch time",
            "type": "number"
          },
          "stage_id": {
            "title": "Stage id",
            "pattern": "^[a-zA-Z0-9-_]{2,32}$",
            "type": "string"
          }
        },
        "example": {
          "repo_url": "https://github.com/owner/my-repo.git",
          "head_sha": "q1w2e3r4t5y6u7i8o",
          "event_time": 1586944173.95799,
          "stage_id": "release"
        }
      },
      "CreateCycleTimeStageResponseModel": {
        "title": "CreateCycleTimeStageResponseModel",
        "required": [
          "request_id"
        ],
        "type": "object",
        "properties": {
          "request_id": {
            "title": "Request Id",
            "type": "string"
          }
        }
      },
      "CreateDeploymentRequestModel": {
        "title": "CreateDeploymentRequestModel",
        "required": [
          "repo_url",
          "ref_name"
        ],
        "type": "object",
        "properties": {
          "repo_url": {
            "title": "Repository url",
            "maxLength": 250,
            "minLength": 15,
            "pattern": "^https://[a-zA-Z0-9./+^@_%-]+(:\\d{1,5})?(/[a-zA-Z0-9./+^@_%-]*)?$",
            "type": "string",
            "description": "should be a qualified Git URL"
          },
          "ref_name": {
            "title": "Ref name of the release, accepts any Git ref                           i.e. commit short or long sha or tag name",
            "pattern": "^[\\/!\\\"#\\$%&\\'()+,\\-0-9;<=>\\@A-Z\\]_`a-z{|}.]{4,255}$",
            "type": "string"
          },
          "timestamp": {
            "title": "Timestamp ISO 8601 format or EPOCH timestmap",
            "type": "string"
          },
          "stage": {
            "title": "Deployment stage",
            "pattern": "^[a-zA-Z0-9-_]{2,32}$",
            "type": "string",
            "default": "release"
          },
          "services": {
            "title": "Services list",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "examples": {
          "example1": {
            "summary": "Report release using tag",
            "description": "",
            "value": {
              "repo_url": "https://github.com/owner/my-repo.git",
              "ref_name": "v1.20.55"
            }
          },
          "example2": {
            "summary": "Report release using commit sha",
            "description": "",
            "value": {
              "repo_url": "https://github.com/owner/my-repo.git",
              "ref_name": "cf8386c6c92bb24b3e7a48a62cef758d6dbed0ca"
            }
          },
          "example3": {
            "summary": "Report custom stage",
            "description": "",
            "value": {
              "repo_url": "https://github.com/owner/my-repo.git",
              "ref_name": "cf8386c6c92bb24b3e7a48a62cef758d6dbed0ca",
              "timestamp": "2022-03-14T22:23:34Z",
              "stage": "my_stage"
            }
          },
          "example4": {
            "summary": "Report custom services",
            "description": "",
            "value": {
              "repo_url": "https://github.com/owner/my-repo.git",
              "ref_name": "cf8386c6c92bb24b3e7a48a62cef758d6dbed0ca",
              "timestamp": "2022-03-14T22:23:34Z",
              "stage": "my_stage",
              "services": [
                "service a",
                "service b"
              ]
            }
          }
        }
      },
      "CreateDeploymentResponseModel": {
        "title": "CreateDeploymentResponseModel",
        "required": [
          "request_id"
        ],
        "type": "object",
        "properties": {
          "request_id": {
            "title": "Request Id",
            "type": "string"
          }
        }
      },
      "CreateIncidentRequestModel": {
        "title": "CreateIncidentRequestModel",
        "required": [
          "provider_id",
          "http_url",
          "title",
          "issued_at"
        ],
        "type": "object",
        "properties": {
          "provider_id": {
            "title": "Provider Id",
            "maxLength": 255,
            "minLength": 1,
            "type": "string",
            "description": "The unique identifier in the PM provider"
          },
          "http_url": {
            "title": "Http Url",
            "maxLength": 512,
            "pattern": "^(http|https)://[a-zA-Z0-9?./+^@_%-=]{5,250}$",
            "type": "string",
            "description": "Trace back URL to the PM provider URL/key should                                        open the incident in the PM provider"
          },
          "title": {
            "title": "Title",
            "maxLength": 255,
            "minLength": 1,
            "type": "string",
            "description": "The title of the incident"
          },
          "issued_at": {
            "title": "Issued At",
            "type": "string",
            "description": "The incident was open at this specific time, can be ISO8601 or EPOCH timestmap"
          },
          "started_at": {
            "title": "Started At",
            "type": "string",
            "description": "The incident was started at this specific time, can be ISO8601 or EPOCH timestmap"
          },
          "ended_at": {
            "title": "Ended At",
            "type": "string",
            "description": "The incident was resolved at this specific time, can be ISO8601 or EPOCH timestmap"
          },
          "git_ref": {
            "title": "Git Ref",
            "pattern": "^[!\\\"#\\$%&\\'()+,\\-0-9;<=>\\@A-Z\\]_`a-z{|}.]{5,40}$",
            "type": "string",
            "description": "The git reference of the release, i.e.                                                 commit short or long sha or tag name"
          },
          "teams": {
            "title": "Teams",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The list of LinearB teams names related to this incident"
          },
          "services": {
            "title": "Services",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The list of LinearB services monitoring this incident"
          },
          "repository_urls": {
            "title": "Repository Urls",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The list of repos urls related to this incident"
          }
        },
        "description": "This model ovverides default functionality and remove nullable field from dict object\n\n:param BaseModel: the BaseModel",
        "examples": {
          "example1": {
            "summary": "Create an incident",
            "description": "",
            "value": {
              "provider_id": "provider_internal_id1",
              "http_url": "http://myprovider.io/1",
              "title": "This is critical production bug",
              "issued_at": "2025-03-01T07:58:30.996",
              "teams": [
                "Team A",
                "Team B"
              ],
              "repository_urls": [
                "https://github.com/myorg/repo1.git",
                "https://github.com/myorg/repo2.git"
              ],
              "git_ref": "0c708fdec272bc4446c6cabea4f0022c2b616aae"
            }
          }
        }
      },
      "CustomInfo": {
        "title": "CustomInfo",
        "type": "object",
        "properties": {
          "extra_emails": {
            "title": "Extra Emails",
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "User extra emails",
            "example": [
              "user@lovelace.io"
            ]
          },
          "extra_ids": {
            "title": "Extra Ids",
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "1234567890"
            ]
          }
        },
        "additionalProperties": false
      },
      "DateFilter": {
        "title": "DateFilter",
        "type": "object",
        "properties": {
          "before": {
            "title": "Before",
            "type": "string",
            "description": "Before date"
          },
          "after": {
            "title": "After",
            "type": "string",
            "description": "After date"
          }
        },
        "description": "This model ovverides default functionality and remove nullable field from dict object\n\n:param BaseModel: the BaseModel"
      },
      "DeploymentsSortByEnum": {
        "title": "DeploymentsSortByEnum",
        "enum": [
          "published_at"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "DeploymentsSortDirEnum": {
        "title": "DeploymentsSortDirEnum",
        "enum": [
          "asc",
          "desc"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "ExportMeasurementResponse": {
        "title": "ExportMeasurementResponse",
        "required": [
          "report_url",
          "detail"
        ],
        "type": "object",
        "properties": {
          "report_url": {
            "title": "Report Url",
            "type": "string"
          },
          "detail": {
            "title": "Detail",
            "type": "string"
          }
        }
      },
      "ExportMetricsPayload": {
        "title": "ExportMetricsPayload",
        "required": [
          "requested_metrics",
          "time_ranges"
        ],
        "type": "object",
        "properties": {
          "group_by": {
            "allOf": [
              {
                "$ref": "#/components/schemas/GroupByEnum"
              }
            ],
            "description": "Field to group by. One of organization, team, contributor, repository",
            "default": "organization"
          },
          "requested_metrics": {
            "title": "Requested Metrics",
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RequestedMetric"
            },
            "description": "Array of metrics to fetch."
          },
          "roll_up": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RollupEnum"
              }
            ],
            "default": "custom"
          },
          "contributor_ids": {
            "title": "Contributor Ids",
            "maxItems": 50,
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Array of contributors to filter by."
          },
          "repository_ids": {
            "title": "Repository Ids",
            "maxItems": 50,
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Array of repositories to filter by."
          },
          "team_ids": {
            "title": "Team Ids",
            "maxItems": 50,
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Should be passed when requesting group_by equals team."
          },
          "service_ids": {
            "title": "Service Ids",
            "maxItems": 50,
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Array of services to filter by."
          },
          "limit": {
            "title": "Limit",
            "exclusiveMinimum": 0,
            "type": "integer",
            "description": "Max amount of objects in the response. When request for multiple contributors, teams or repositories, limit should be more or equal of amount of passed ids (or data will be returned partially)"
          },
          "offset": {
            "title": "Offset",
            "minimum": 0,
            "type": "integer",
            "description": "Used for pagination, defines the offset for the query."
          },
          "order_by": {
            "title": "Order By",
            "type": "string",
            "description": "Field name to order by."
          },
          "order_dir": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SortDirectionEnum"
              }
            ],
            "description": "Ordering direction. Default is asc.",
            "default": "asc"
          },
          "time_ranges": {
            "title": "Time Ranges",
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeRangeModel"
            },
            "description": "Should always exist"
          },
          "labels": {
            "title": "Labels",
            "maxItems": 3,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "If the grouping is based on labels, the results will be grouped according to the specified labels. For other group by values, the results will be filtered based on the provided labels. "
          },
          "return_no_data": {
            "title": "Return No Data",
            "type": "boolean",
            "description": "If set to true, will return contributors or teams that dont have data in case of group by contributor and team "
          },
          "beautified": {
            "title": "Beautified",
            "type": "boolean",
            "description": "Defaults to false, will format the data in case of CSV to a more readable format",
            "default": false
          }
        },
        "examples": {
          "example1": {
            "summary": "Get metrics with time ranges",
            "description": "",
            "value": {
              "group_by": "organization",
              "roll_up": "custom",
              "requested_metrics": [
                {
                  "name": "branch.computed.cycle_time",
                  "agg": "p75"
                },
                {
                  "name": "releases.count"
                }
              ],
              "time_ranges": [
                {
                  "after": "2022-05-27",
                  "before": "2022-05-29"
                },
                {
                  "after": "2022-05-30",
                  "before": "2022-06-05"
                },
                {
                  "after": "2022-06-06",
                  "before": "2022-06-12"
                },
                {
                  "after": "2022-06-13",
                  "before": "2022-06-19"
                }
              ]
            }
          },
          "example2": {
            "summary": "Get metrics with weekly rollup",
            "description": "",
            "value": {
              "group_by": "organization",
              "roll_up": "1w",
              "requested_metrics": [
                {
                  "name": "branch.computed.cycle_time",
                  "agg": "p75"
                },
                {
                  "name": "branch.computed.cycle_time",
                  "agg": "avg"
                }
              ],
              "time_ranges": [
                {
                  "after": "2022-05-27",
                  "before": "2022-06-29"
                }
              ]
            }
          },
          "example3": {
            "summary": "Get metrics for specific repository",
            "description": "",
            "value": {
              "group_by": "organization",
              "roll_up": "1d",
              "repository_ids": [
                456801317,
                1235235
              ],
              "requested_metrics": [
                {
                  "name": "branch.time_to_prod",
                  "agg": "p50"
                }
              ],
              "time_ranges": [
                {
                  "after": "2022-05-27",
                  "before": "2022-06-29"
                }
              ]
            }
          },
          "example4": {
            "summary": "Get metrics for specific teams",
            "description": "",
            "value": {
              "group_by": "team",
              "roll_up": "1mo",
              "team_ids": [
                5273,
                58
              ],
              "requested_metrics": [
                {
                  "name": "branch.time_to_prod",
                  "agg": "p50"
                },
                {
                  "name": "branch.time_to_pr",
                  "agg": "avg"
                }
              ],
              "time_ranges": [
                {
                  "after": "2022-05-27",
                  "before": "2023-06-29"
                }
              ]
            }
          }
        }
      },
      "ExporterFileFormats": {
        "title": "ExporterFileFormats",
        "enum": [
          "csv",
          "json"
        ],
        "description": "An enumeration."
      },
      "GetDeploymentsResponseModel": {
        "title": "GetDeploymentsResponseModel",
        "required": [
          "total",
          "items"
        ],
        "type": "object",
        "properties": {
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "items": {
            "title": "Items",
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "GetIncidentResponseModel": {
        "title": "GetIncidentResponseModel",
        "required": [
          "provider_id",
          "http_url",
          "title",
          "issued_at",
          "status"
        ],
        "type": "object",
        "properties": {
          "provider_id": {
            "title": "Provider Id",
            "type": "string"
          },
          "http_url": {
            "title": "Http Url",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "issued_at": {
            "title": "Issued At",
            "type": "string"
          },
          "started_at": {
            "title": "Started At",
            "type": "string"
          },
          "ended_at": {
            "title": "Ended At",
            "type": "string"
          },
          "git_ref": {
            "title": "Git Ref",
            "type": "string"
          },
          "teams": {
            "title": "Teams",
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "services": {
            "title": "Services",
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "repositories": {
            "title": "Repositories",
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "description": "This model ovverides default functionality and remove nullable field from dict object\n\n:param BaseModel: the BaseModel"
      },
      "GetMetricsPayloadModel": {
        "title": "GetMetricsPayloadModel",
        "required": [
          "requested_metrics",
          "time_ranges"
        ],
        "type": "object",
        "properties": {
          "group_by": {
            "allOf": [
              {
                "$ref": "#/components/schemas/GroupByEnum"
              }
            ],
            "description": "Field to group by. One of organization, team, contributor, repository",
            "default": "organization"
          },
          "requested_metrics": {
            "title": "Requested Metrics",
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RequestedMetric"
            },
            "description": "Array of metrics to fetch."
          },
          "roll_up": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RollupEnum"
              }
            ],
            "default": "custom"
          },
          "contributor_ids": {
            "title": "Contributor Ids",
            "maxItems": 50,
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Array of contributors to filter by."
          },
          "repository_ids": {
            "title": "Repository Ids",
            "maxItems": 50,
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Array of repositories to filter by."
          },
          "team_ids": {
            "title": "Team Ids",
            "maxItems": 50,
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Should be passed when requesting group_by equals team."
          },
          "service_ids": {
            "title": "Service Ids",
            "maxItems": 50,
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Array of services to filter by."
          },
          "limit": {
            "title": "Limit",
            "exclusiveMinimum": 0,
            "type": "integer",
            "description": "Max amount of objects in the response. When request for multiple contributors, teams or repositories, limit should be more or equal of amount of passed ids (or data will be returned partially)"
          },
          "offset": {
            "title": "Offset",
            "minimum": 0,
            "type": "integer",
            "description": "Used for pagination, defines the offset for the query."
          },
          "order_by": {
            "title": "Order By",
            "type": "string",
            "description": "Field name to order by."
          },
          "order_dir": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SortDirectionEnum"
              }
            ],
            "description": "Ordering direction. Default is asc.",
            "default": "asc"
          },
          "time_ranges": {
            "title": "Time Ranges",
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeRangeModel"
            },
            "description": "Should always exist"
          },
          "labels": {
            "title": "Labels",
            "maxItems": 3,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "If the grouping is based on labels, the results will be grouped according to the specified labels. For other group by values, the results will be filtered based on the provided labels. "
          },
          "return_no_data": {
            "title": "Return No Data",
            "type": "boolean",
            "description": "If set to true, will return contributors or teams that dont have data in case of group by contributor and team "
          }
        },
        "examples": {
          "example1": {
            "summary": "Get metrics with time ranges",
            "description": "",
            "value": {
              "group_by": "organization",
              "roll_up": "custom",
              "requested_metrics": [
                {
                  "name": "branch.computed.cycle_time",
                  "agg": "p75"
                },
                {
                  "name": "releases.count"
                }
              ],
              "time_ranges": [
                {
                  "after": "2022-05-27",
                  "before": "2022-05-29"
                },
                {
                  "after": "2022-05-30",
                  "before": "2022-06-05"
                },
                {
                  "after": "2022-06-06",
                  "before": "2022-06-12"
                },
                {
                  "after": "2022-06-13",
                  "before": "2022-06-19"
                }
              ]
            }
          },
          "example2": {
            "summary": "Get metrics with weekly rollup",
            "description": "",
            "value": {
              "group_by": "organization",
              "roll_up": "1w",
              "requested_metrics": [
                {
                  "name": "branch.computed.cycle_time",
                  "agg": "p75"
                },
                {
                  "name": "branch.computed.cycle_time",
                  "agg": "avg"
                }
              ],
              "time_ranges": [
                {
                  "after": "2022-05-27",
                  "before": "2022-06-29"
                }
              ]
            }
          },
          "example3": {
            "summary": "Get metrics for specific repository",
            "description": "",
            "value": {
              "group_by": "organization",
              "roll_up": "1d",
              "repository_ids": [
                456801317,
                1235235
              ],
              "requested_metrics": [
                {
                  "name": "branch.time_to_prod",
                  "agg": "p50"
                }
              ],
              "time_ranges": [
                {
                  "after": "2022-05-27",
                  "before": "2022-06-29"
                }
              ]
            }
          },
          "example4": {
            "summary": "Get metrics for specific teams",
            "description": "",
            "value": {
              "group_by": "team",
              "roll_up": "1mo",
              "team_ids": [
                5273,
                58
              ],
              "requested_metrics": [
                {
                  "name": "branch.time_to_prod",
                  "agg": "p50"
                },
                {
                  "name": "branch.time_to_pr",
                  "agg": "avg"
                }
              ],
              "time_ranges": [
                {
                  "after": "2022-05-27",
                  "before": "2023-06-29"
                }
              ]
            }
          }
        }
      },
      "GetTeamsFullResponseModel": {
        "title": "GetTeamsFullResponseModel",
        "required": [
          "total",
          "items"
        ],
        "type": "object",
        "properties": {
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "items": {
            "title": "Items",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamModel"
            }
          }
        },
        "description": "Teams response model with full data. "
      },
      "GetTeamsPartialResponseModel": {
        "title": "GetTeamsPartialResponseModel",
        "required": [
          "total",
          "items"
        ],
        "type": "object",
        "properties": {
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "items": {
            "title": "Items",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamPartialResponseModel"
            }
          }
        },
        "description": "Teams response model with partial data. "
      },
      "GroupByEnum": {
        "title": "GroupByEnum",
        "enum": [
          "organization",
          "contributor",
          "team",
          "custom_metric",
          "repository",
          "label"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "GroupCreationModel": {
        "title": "GroupCreationModel",
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "initials": {
            "title": "Initials",
            "maxLength": 3,
            "minLength": 1,
            "type": "string"
          },
          "parent_id": {
            "title": "Parent Id",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "minLength": 3,
            "type": "string"
          },
          "contributors": {
            "title": "Contributors",
            "type": "array",
            "items": {
              "type": "integer"
            },
            "default": []
          },
          "color": {
            "title": "Color",
            "pattern": "^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6})$",
            "type": "string",
            "default": "#3B48B3"
          },
          "child_teams": {
            "title": "Child Teams",
            "type": "array",
            "items": {
              "type": "integer"
            },
            "default": []
          }
        },
        "additionalProperties": false
      },
      "GroupUpdateModel": {
        "title": "GroupUpdateModel",
        "type": "object",
        "properties": {
          "initials": {
            "title": "Initials",
            "maxLength": 3,
            "minLength": 1,
            "type": "string"
          },
          "parent_id": {
            "title": "Parent Id",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "minLength": 3,
            "type": "string"
          },
          "color": {
            "title": "Color",
            "type": "string"
          },
          "child_teams": {
            "title": "Child Teams",
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        },
        "additionalProperties": false
      },
      "IncidentPartial": {
        "title": "IncidentPartial",
        "required": [
          "provider_id",
          "http_url",
          "title",
          "issued_at",
          "status"
        ],
        "type": "object",
        "properties": {
          "provider_id": {
            "title": "Provider Id",
            "type": "string"
          },
          "http_url": {
            "title": "Http Url",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "issued_at": {
            "title": "Issued At",
            "type": "string"
          },
          "started_at": {
            "title": "Started At",
            "type": "string"
          },
          "ended_at": {
            "title": "Ended At",
            "type": "string"
          },
          "git_ref": {
            "title": "Git Ref",
            "type": "string"
          },
          "teams": {
            "title": "Teams",
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "services": {
            "title": "Services",
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "repositories": {
            "title": "Repositories",
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "description": "This model ovverides default functionality and remove nullable field from dict object\n\n:param BaseModel: the BaseModel"
      },
      "IncidentStatuses": {
        "title": "IncidentStatuses",
        "enum": [
          "open",
          "in-progress",
          "closed",
          "deleted"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "IncidentsSortByEnum": {
        "title": "IncidentsSortByEnum",
        "enum": [
          "issued_at",
          "started_at",
          "ended_at"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "MetricsAggregationEnum": {
        "title": "MetricsAggregationEnum",
        "enum": [
          "p75",
          "avg",
          "p50",
          "raw",
          "default"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "MetricsNamesEnum": {
        "title": "MetricsNamesEnum",
        "enum": [
          "branch.time_to_pr",
          "branch.time_to_approve",
          "branch.time_to_merge",
          "branch.time_to_review",
          "branch.review_time",
          "branch.time_to_prod",
          "branch.computed.cycle_time",
          "pr.merged",
          "pr.merged.size",
          "pr.new",
          "pr.review_depth",
          "pr.reviews",
          "commit.involved.repos.count",
          "pr.merged.without.review.count",
          "releases.count",
          "commit.total.count",
          "commit.activity.new_work.count",
          "commit.activity.rework.count",
          "commit.activity.refactor.count",
          "commit.total_changes",
          "commit.activity_days",
          "branch.state.computed.done",
          "pm.mttr",
          "pm.cfr.issues.done",
          "branch.state.active",
          "pr.maturity_ratio",
          "pr.reviewed"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "MetricsResponseModel": {
        "title": "MetricsResponseModel",
        "required": [
          "after",
          "before",
          "metrics"
        ],
        "type": "object",
        "properties": {
          "after": {
            "title": "After",
            "type": "string"
          },
          "before": {
            "title": "Before",
            "type": "string"
          },
          "metrics": {
            "title": "Metrics",
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "Permission": {
        "title": "Permission",
        "type": "object",
        "properties": {
          "role": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UserRole"
              }
            ],
            "default": "basic"
          },
          "team_scopes": {
            "title": "Team Scopes",
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "All Teams"
            ]
          },
          "view_dev_coaching": {
            "title": "View Dev Coaching",
            "type": "boolean",
            "example": false
          }
        },
        "additionalProperties": false
      },
      "PostCustomMetricModel": {
        "title": "PostCustomMetricModel",
        "required": [
          "metric_name",
          "timestamp"
        ],
        "type": "object",
        "properties": {
          "metric_name": {
            "title": "Metric Name",
            "maxLength": 255,
            "minLength": 1,
            "type": "string",
            "description": "The metric you are reporting"
          },
          "timestamp": {
            "title": "Timestamp",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              }
            ],
            "description": "Timestamp at which the event happened"
          },
          "value": {
            "title": "Value",
            "type": "number",
            "description": "Float value representing metric"
          },
          "source": {
            "title": "Source",
            "type": "string",
            "description": "Source of the event"
          },
          "entity": {
            "title": "Entity",
            "type": "object",
            "description": "Entity defining the branch/pr url being reported",
            "default": {}
          },
          "tags": {
            "title": "Tags",
            "type": "object",
            "description": "Any tags that can help identify the event later on",
            "default": {}
          }
        },
        "examples": {
          "example1": {
            "summary": "Example with all values",
            "description": "",
            "value": {
              "source": "gitstream",
              "timestamp": "2022-03-13 08:07:12.613",
              "metric_name": "ran_cm",
              "value": "2.5",
              "entity": {
                "pr_url": "https://github.com/hello/world/pull/1731"
              },
              "tags": {
                "my_tag": "my_value"
              }
            }
          },
          "example2": {
            "summary": "Example with commit_sha and pr url",
            "description": "",
            "value": {
              "timestamp": "2022-03-13 08:07:12.613",
              "metric_name": "ran_cm",
              "entity": {
                "pr_url": "https://github.com/testorg/testrepo/1234",
                "commit_sha": "my_commit_sha"
              }
            }
          },
          "example3": {
            "summary": "Example with timestamp that is EPOCH",
            "description": "",
            "value": {
              "timestamp": 1706622966150,
              "metric_name": "ran_cm",
              "entity": {
                "pr_url": "https://github.com/linear-b/linweb/pull/1731"
              }
            }
          }
        }
      },
      "PostCustomMetricResponseModel": {
        "title": "PostCustomMetricResponseModel",
        "required": [
          "message"
        ],
        "type": "object",
        "properties": {
          "message": {
            "title": "Message",
            "type": "string"
          },
          "event_uuid": {
            "title": "Event Uuid",
            "type": "string"
          }
        }
      },
      "RepositoryPaths": {
        "title": "RepositoryPaths",
        "required": [
          "id",
          "paths"
        ],
        "type": "object",
        "properties": {
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "paths": {
            "title": "Paths",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "RequestedMetric": {
        "title": "RequestedMetric",
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "anyOf": [
              {
                "$ref": "#/components/schemas/MetricsNamesEnum"
              },
              {
                "type": "string"
              }
            ]
          },
          "agg": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MetricsAggregationEnum"
              }
            ],
            "default": "default"
          },
          "filters": {
            "title": "Filters",
            "type": "object"
          },
          "offset": {
            "title": "Offset",
            "minimum": 0,
            "type": "integer",
            "default": 0
          },
          "limit": {
            "title": "Limit",
            "maximum": 5000,
            "exclusiveMinimum": 0,
            "type": "integer",
            "default": 100
          }
        }
      },
      "RollupEnum": {
        "title": "RollupEnum",
        "enum": [
          "1d",
          "1w",
          "1mo",
          "custom"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "SearchIncidentsRequestModel": {
        "title": "SearchIncidentsRequestModel",
        "type": "object",
        "properties": {
          "repository_urls": {
            "title": "Repository Urls",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The list of repos urls related to this incident"
          },
          "services": {
            "title": "Services",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The list of LinearB services monitoring this incident"
          },
          "teams": {
            "title": "Teams",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The list of LinearB teams names related to this incident"
          },
          "statuses": {
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IncidentStatuses"
            },
            "description": "The list of statuses of the incident"
          },
          "sort_by": {
            "allOf": [
              {
                "$ref": "#/components/schemas/IncidentsSortByEnum"
              }
            ],
            "default": "issued_at"
          },
          "sort_dir": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SortDirectionEnum"
              }
            ],
            "default": "desc"
          },
          "issued_at": {
            "title": "Issued At",
            "allOf": [
              {
                "$ref": "#/components/schemas/DateFilter"
              }
            ],
            "description": "The incident was open at this specific time"
          },
          "started_at": {
            "title": "Started At",
            "allOf": [
              {
                "$ref": "#/components/schemas/DateFilter"
              }
            ],
            "description": "The incident was started at this specific time"
          },
          "ended_at": {
            "title": "Ended At",
            "allOf": [
              {
                "$ref": "#/components/schemas/DateFilter"
              }
            ],
            "description": "The incident was resolved at this specific time"
          },
          "limit": {
            "title": "Limit",
            "maximum": 100,
            "exclusiveMinimum": 0,
            "type": "integer",
            "default": 25
          },
          "offset": {
            "title": "Offset",
            "minimum": 0,
            "type": "integer",
            "default": 0
          }
        },
        "description": "This model ovverides default functionality and remove nullable field from dict object\n\n:param BaseModel: the BaseModel",
        "examples": {
          "example1": {
            "summary": "Opened incidents after a date",
            "description": "",
            "value": {
              "limit": 50,
              "issued_at": {
                "after": "2021-12-01"
              },
              "statuses": [
                "open"
              ]
            }
          },
          "example2": {
            "summary": "Uncompleted incidents between dates at specific repo",
            "description": "",
            "value": {
              "limit": 50,
              "issued_at": {
                "after": "2021-01-01",
                "before": "2022-12-31"
              },
              "repository_urls": [
                "https://github.com/myorg/website.git"
              ],
              "statuses": [
                "open",
                "in-progress"
              ]
            }
          }
        }
      },
      "SearchIncidentsResponseModel": {
        "title": "SearchIncidentsResponseModel",
        "required": [
          "total",
          "items"
        ],
        "type": "object",
        "properties": {
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "items": {
            "title": "Items",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IncidentPartial"
            }
          }
        },
        "description": "This model ovverides default functionality and remove nullable field from dict object\n\n:param BaseModel: the BaseModel"
      },
      "SearchKeywordMatchTypeEnum": {
        "title": "SearchKeywordMatchTypeEnum",
        "enum": [
          "equals",
          "contains",
          "startswith"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "SearchTeamsFullResponseModel": {
        "title": "SearchTeamsFullResponseModel",
        "required": [
          "total",
          "items"
        ],
        "type": "object",
        "properties": {
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "items": {
            "title": "Items",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamModel"
            }
          }
        },
        "description": "Search teams response with full data "
      },
      "SearchTeamsPartialResponseModel": {
        "title": "SearchTeamsPartialResponseModel",
        "required": [
          "total",
          "items"
        ],
        "type": "object",
        "properties": {
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "items": {
            "title": "Items",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamPartialResponseModel"
            }
          }
        },
        "description": "Search teams response with full data "
      },
      "SearchTeamsRequestModel": {
        "title": "SearchTeamsRequestModel",
        "type": "object",
        "properties": {
          "partial": {
            "title": "Partial data response flag",
            "type": "boolean",
            "description": "Partial data response flag defines the output schema. If it is False, then will return full teams objects data. Otherwise only mappings for teams, contributors ids and names",
            "default": true
          },
          "keyword": {
            "title": "Keyword to search by in a teams names",
            "minLength": 3,
            "type": "string",
            "description": "When passed will filter teams by matches keyword with names (using type `keyword_match_type`)"
          },
          "keyword_match_type": {
            "title": "Type of the keyword search match",
            "allOf": [
              {
                "$ref": "#/components/schemas/SearchKeywordMatchTypeEnum"
              }
            ],
            "description": "Defines type of a match when search by keyword in teams names. Supports `matches` (exact team name match), `contains` (keyword is included in the team name string) and `startswith`(team name starts with a keyword)",
            "default": "contains"
          },
          "offset": {
            "title": "Pagination offset",
            "minimum": 0,
            "type": "integer",
            "description": "Offset(start position) of each pagination step",
            "default": 0
          },
          "limit": {
            "title": "Pagination limit",
            "maximum": 50,
            "minimum": 0,
            "type": "integer",
            "description": "Limit of teams to return for each pagination step",
            "default": 50
          },
          "nonmerged_members_only": {
            "title": "Non Merged Members Flag",
            "type": "boolean",
            "description": "If True, will return only contributors, that does not have parent contributor. Otherwise, will return only parents and stand-alone contributors",
            "default": false
          }
        }
      },
      "ServiceModel": {
        "title": "ServiceModel",
        "required": [
          "id",
          "name",
          "paths"
        ],
        "type": "object",
        "properties": {
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "paths": {
            "title": "Paths",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RepositoryPaths"
            }
          }
        },
        "description": "Model for service object after processing the raw response of the services API (linpr) "
      },
      "ServicesResponse": {
        "title": "ServicesResponse",
        "required": [
          "total",
          "items"
        ],
        "type": "object",
        "properties": {
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "items": {
            "title": "Items",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServiceModel"
            }
          }
        },
        "description": "Services endpoint response model.\nWe modify the output of linpr API for the final users. We return only id, names and paths for services, also include\nrepositories names in the paths strategies"
      },
      "SortDirectionEnum": {
        "title": "SortDirectionEnum",
        "enum": [
          "asc",
          "desc"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "TeamContributorsModel": {
        "title": "TeamContributorsModel",
        "required": [
          "contributors"
        ],
        "type": "object",
        "properties": {
          "contributors": {
            "title": "List of contributor\\s",
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Must have at least one item",
            "example": [
              12345
            ]
          }
        }
      },
      "TeamContributorsV2Model": {
        "title": "TeamContributorsV2Model",
        "required": [
          "contributorIds"
        ],
        "type": "object",
        "properties": {
          "contributorIds": {
            "title": "List of contributor ids",
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Must have at least one item",
            "example": [
              12345
            ]
          }
        }
      },
      "TeamCreationExperimentalModel": {
        "title": "TeamCreationExperimentalModel",
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "initials": {
            "title": "Initials",
            "maxLength": 3,
            "minLength": 1,
            "type": "string",
            "description": "Team initials must be between 1 to 3 characters."
          },
          "parent_id": {
            "title": "Parent Id",
            "type": "integer",
            "description": "The internal team ID of the parent team."
          },
          "name": {
            "title": "Name",
            "minLength": 3,
            "type": "string",
            "description": "Team name."
          },
          "contributors": {
            "title": "Contributors",
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "The list of contributor internal IDs must contain at least one contributor id."
          },
          "child_teams": {
            "title": "Child Teams",
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "The list of child team internal IDs must include at least one team ID."
          }
        },
        "additionalProperties": false
      },
      "TeamCreationModel": {
        "title": "TeamCreationModel",
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "initials": {
            "title": "Initials",
            "maxLength": 3,
            "minLength": 1,
            "type": "string"
          },
          "parent_id": {
            "title": "Parent Id",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "minLength": 3,
            "type": "string"
          },
          "contributors": {
            "title": "Contributors",
            "type": "array",
            "items": {
              "type": "integer"
            },
            "default": []
          },
          "color": {
            "title": "Color",
            "pattern": "^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6})$",
            "type": "string",
            "default": "#3B48B3"
          },
          "child_teams": {
            "title": "Child Teams",
            "type": "array",
            "items": {
              "type": "integer"
            },
            "default": []
          }
        },
        "additionalProperties": false
      },
      "TeamMembership": {
        "title": "TeamMembership",
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string",
            "example": "Ada engineering"
          },
          "joined_at": {
            "title": "Joined At",
            "type": "string",
            "description": "The date when the user joined the team (format: YYYY-MM-DD)",
            "example": "2025-01-01"
          }
        },
        "additionalProperties": false
      },
      "TeamMembershipEmail": {
        "title": "TeamMembershipEmail",
        "required": [
          "email"
        ],
        "type": "object",
        "properties": {
          "joined_at": {
            "title": "Joined At",
            "type": "string",
            "description": "The date when the user joined the team (format: YYYY-MM-DD)",
            "example": "2025-01-01"
          },
          "email": {
            "title": "Email",
            "type": "string",
            "description": "User email",
            "example": {
              "email": "user@example.com",
              "joined_at": "2025-06-13"
            }
          }
        },
        "additionalProperties": false
      },
      "TeamMembershipId": {
        "title": "TeamMembershipId",
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "joined_at": {
            "title": "Joined At",
            "type": "string",
            "description": "The date when the user joined the team (format: YYYY-MM-DD)",
            "example": "2025-01-01"
          },
          "id": {
            "title": "Id",
            "minimum": 1,
            "type": "integer",
            "description": "User id",
            "example": 12345
          }
        },
        "additionalProperties": false
      },
      "TeamModel": {
        "title": "TeamModel",
        "required": [
          "id",
          "organization_id",
          "name",
          "created_at"
        ],
        "type": "object",
        "properties": {
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "organization_id": {
            "title": "Organization Id",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "initials": {
            "title": "Initials",
            "type": "string"
          },
          "color": {
            "title": "Color",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          },
          "deleted_at": {
            "title": "Deleted At",
            "type": "string"
          },
          "extra": {
            "title": "Extra",
            "type": "object"
          },
          "established_at": {
            "title": "Established At",
            "type": "string"
          },
          "parent_id": {
            "title": "Parent Id",
            "type": "integer"
          },
          "provider_id": {
            "title": "Provider Id",
            "type": "string"
          },
          "contributors": {
            "title": "Contributors",
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ContributorModel"
                }
              },
              {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              }
            ]
          }
        }
      },
      "TeamPartialResponseModel": {
        "title": "TeamPartialResponseModel",
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "contributors": {
            "title": "Contributors",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContributorPartialResponseModel"
            }
          }
        },
        "description": "Team response model with partial data. "
      },
      "TeamToUserResponseModel": {
        "title": "TeamToUserResponseModel",
        "required": [
          "team_id",
          "user_identifier",
          "status"
        ],
        "type": "object",
        "properties": {
          "team_id": {
            "title": "Team Id",
            "type": "integer",
            "description": "The unique identifier of the team",
            "example": 285367
          },
          "user_identifier": {
            "title": "User Identifier",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ],
            "description": "The unique identifier of the user (can be numeric ID or email)",
            "example": 12345
          },
          "joined_at": {
            "title": "Joined At",
            "type": "string",
            "description": "The date when the user joined the team (ISO format) or null if not specified",
            "example": "2021-01-01"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TeamToUserStatus"
              }
            ],
            "description": "The association status of the user with the team",
            "example": "associated"
          }
        },
        "additionalProperties": false
      },
      "TeamToUserStatus": {
        "title": "TeamToUserStatus",
        "enum": [
          "associated",
          "not_found"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "TeamUpdateExperimentalModel": {
        "title": "TeamUpdateExperimentalModel",
        "type": "object",
        "properties": {
          "initials": {
            "title": "Initials",
            "maxLength": 3,
            "minLength": 1,
            "type": "string",
            "description": "Team initials must be between 1 to 3 characters."
          },
          "parent_id": {
            "title": "Parent Id",
            "type": "integer",
            "description": "The internal team ID of the parent team."
          },
          "name": {
            "title": "Name",
            "minLength": 3,
            "type": "string",
            "description": "Team name."
          },
          "contributors": {
            "title": "Contributors",
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "The list of contributor internal IDs must contain at least one contributor id."
          },
          "child_teams": {
            "title": "Child Teams",
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "The list of child team internal IDs must include at least one team ID."
          }
        },
        "additionalProperties": false
      },
      "TeamUpdateModel": {
        "title": "TeamUpdateModel",
        "type": "object",
        "properties": {
          "initials": {
            "title": "Initials",
            "maxLength": 3,
            "minLength": 1,
            "type": "string"
          },
          "parent_id": {
            "title": "Parent Id",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "minLength": 3,
            "type": "string"
          },
          "color": {
            "title": "Color",
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "TeamV2CreationModel": {
        "title": "TeamV2CreationModel",
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "maxLength": 100,
            "minLength": 3,
            "type": "string",
            "description": "Team name must be at least 3 characters long, start with a letter"
          },
          "parent_team": {
            "title": "Parent Team",
            "maxLength": 100,
            "minLength": 3,
            "type": "string",
            "description": "Team parent name must be at least 3 characters long, start with a letter"
          },
          "initials": {
            "title": "Initials",
            "maxLength": 3,
            "minLength": 1,
            "type": "string",
            "description": "Team initials must be 1 to 3 characters long and contain only letters or numbers."
          },
          "color": {
            "title": "Color",
            "type": "string",
            "description": "Team color must be a valid hex code in the format #RGB or #RRGGBB.",
            "default": "#3B48B3"
          }
        },
        "additionalProperties": false,
        "description": "Model for creating a team.\n\n:param name: Team name, required, must be at least 3 characters and start with a letter.\n:type name: str\n:param parent_team: Optional parent team name, must be at least 3 characters and start with a letter.\n:type parent_team: Optional[str]\n:param initials: Optional team initials, 1 to 3 alphanumeric characters.\n:type initials: Optional[str]\n:param color: Optional team color in hex format (#RGB or #RRGGBB). Defaults to '#3B48B3'.\n:type color: Optional[str]\n\nExtra fields are not permitted."
      },
      "TeamV2Model": {
        "title": "TeamV2Model",
        "required": [
          "created_at",
          "id",
          "name",
          "organization_id"
        ],
        "type": "object",
        "properties": {
          "color": {
            "title": "Color",
            "type": "string",
            "description": "The team's color in hex format"
          },
          "created_at": {
            "title": "Created At",
            "type": "string",
            "description": "The timestamp when the team was created"
          },
          "deleted_at": {
            "title": "Deleted At",
            "type": "string",
            "description": "The timestamp when the team was deleted, if applicable"
          },
          "established_at": {
            "title": "Established At",
            "type": "string",
            "description": "The timestamp when the team was established"
          },
          "extra": {
            "title": "Extra",
            "type": "object",
            "description": "Additional custom information about the team"
          },
          "id": {
            "title": "Id",
            "type": "integer",
            "description": "The unique identifier of the team"
          },
          "initials": {
            "title": "Initials",
            "type": "string",
            "description": "The team's initials (1-3 characters)"
          },
          "name": {
            "title": "Name",
            "type": "string",
            "description": "The name of the team"
          },
          "organization_id": {
            "title": "Organization Id",
            "type": "integer",
            "description": "The ID of the organization this team belongs to"
          },
          "parent_id": {
            "title": "Parent Id",
            "type": "integer",
            "description": "The ID of the parent team, if this team is a sub-team"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string",
            "description": "The timestamp when the team was last updated"
          },
          "contributors": {
            "title": "Contributors",
            "description": "List of contributors associated with the team"
          }
        },
        "description": "Model representing a team in the system.\n\nAttributes:\n    id (int): The unique identifier of the team.\n    organization_id (int): The ID of the organization this team belongs to.\n    name (str): The name of the team.\n    color (Optional[str]): The team's color in hex format.\n    created_at (str): The timestamp when the team was created.\n    updated_at (Optional[str]): The timestamp when the team was last updated.\n    deleted_at (Optional[str]): The timestamp when the team was deleted, if applicable.\n    established_at (Optional[str]): The timestamp when the team was established.\n    initials (Optional[str]): The team's initials (1-3 characters).\n    parent_id (Optional[int]): The ID of the parent team, if this team is a sub-team.\n    extra (Optional[Dict]): Additional custom information about the team."
      },
      "TeamV2PatchModel": {
        "title": "TeamV2PatchModel",
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "maxLength": 100,
            "minLength": 3,
            "type": "string",
            "description": "Team name must be at least 3 characters long, start with a letter"
          },
          "parent_team": {
            "title": "Parent Team",
            "maxLength": 100,
            "minLength": 3,
            "type": "string",
            "description": "Team parent name must be at least 3 characters long, start with a letter"
          },
          "initials": {
            "title": "Initials",
            "maxLength": 3,
            "minLength": 1,
            "type": "string",
            "description": "Team initials must be 1 to 3 characters long and contain only letters or numbers."
          },
          "color": {
            "title": "Color",
            "minLength": 1,
            "type": "string",
            "description": "Team color must be a valid hex code in the format #RGB or #RRGGBB."
          }
        },
        "additionalProperties": false,
        "description": "Model for patching a team. All fields are optional but at least one must be provided.\nInherits all validation rules from TeamV2CreationModel."
      },
      "TeamsToUsersRequestModel": {
        "title": "TeamsToUsersRequestModel",
        "type": "object",
        "properties": {
          "user_ids": {
            "title": "User Ids",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamMembershipId"
            },
            "description": "User ids",
            "example": [
              {
                "id": 12345,
                "joined_at": "2021-01-01"
              }
            ]
          },
          "emails": {
            "title": "Emails",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamMembershipEmail"
            },
            "description": "User emails",
            "example": [
              "user@example.com"
            ]
          }
        }
      },
      "TeamsV2PaginatedResponseModel": {
        "title": "TeamsV2PaginatedResponseModel",
        "required": [
          "total",
          "items"
        ],
        "type": "object",
        "properties": {
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "items": {
            "title": "Items",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamV2Model"
            }
          }
        },
        "description": "A paginated response model specifically for Teams V2 API.\n\nThis model represents a paginated response containing a list of teams and their total count.\nIt is specifically designed for the Teams V2 API endpoints to provide consistent pagination\nstructure across team-related responses.\n\nAttributes:\n    total (int): The total number of teams available across all pages.\n        This count represents the complete dataset size, not just the current page.\n\n    items (List[TeamV2Model]): The list of teams in the current page."
      },
      "TimeRangeModel": {
        "title": "TimeRangeModel",
        "required": [
          "before",
          "after"
        ],
        "type": "object",
        "properties": {
          "before": {
            "title": "Before",
            "type": "string"
          },
          "after": {
            "title": "After",
            "type": "string"
          }
        }
      },
      "UpdateIncidentRequestModel": {
        "title": "UpdateIncidentRequestModel",
        "type": "object",
        "properties": {
          "title": {
            "title": "Title",
            "maxLength": 255,
            "minLength": 1,
            "type": "string",
            "description": "The title of the incident",
            "default": "unset"
          },
          "issued_at": {
            "title": "Issued At",
            "type": "string",
            "description": "The incident was open at this specific time, can be ISO8601 or EPOCH timestmap",
            "default": "unset"
          },
          "started_at": {
            "title": "Started At",
            "type": "string",
            "description": "The incident was started at this specific time, can be ISO8601 or EPOCH timestmap",
            "default": "unset"
          },
          "ended_at": {
            "title": "Ended At",
            "type": "string",
            "description": "The incident was resolved at this specific time, can be ISO8601 or EPOCH timestmap",
            "default": "unset"
          },
          "git_ref": {
            "title": "Git Ref",
            "pattern": "^[!\\\"#\\$%&\\'()+,\\-0-9;<=>\\@A-Z\\]_`a-z{|}.]{5,40}$",
            "type": "string",
            "description": "The git reference of the release,                                                i.e. commit short or long sha or tag name",
            "default": "unset"
          },
          "teams": {
            "title": "Teams",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The list of LinearB teams names related to this incident",
            "default": []
          },
          "services": {
            "title": "Services",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The list of LinearB services monitoring this incident",
            "default": []
          },
          "repository_urls": {
            "title": "Repository Urls",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The list of repos urls related to this incident",
            "default": []
          }
        },
        "examples": {
          "example1": {
            "summary": "Update the incident",
            "description": "",
            "value": {
              "title": "This is changed title",
              "started_at": "2023-05-03 18:00",
              "repository_urls": [
                "https://github.com/myorg/repo2.git"
              ]
            }
          }
        }
      },
      "UserCreationModel": {
        "title": "UserCreationModel",
        "required": [
          "name",
          "email"
        ],
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "maxLength": 100,
            "minLength": 3,
            "type": "string",
            "description": "username must be at least 3 characters long, start with a letter",
            "example": "ada lovelace"
          },
          "email": {
            "title": "Email",
            "type": "string",
            "description": "User's email address",
            "example": "ada@lovelace.io"
          },
          "permission": {
            "$ref": "#/components/schemas/Permission"
          },
          "team_membership": {
            "title": "Team Membership",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamMembership"
            }
          },
          "custom_info": {
            "$ref": "#/components/schemas/CustomInfo"
          }
        },
        "additionalProperties": false
      },
      "UserModel": {
        "title": "UserModel",
        "required": [
          "id",
          "organization_id",
          "name",
          "created_at"
        ],
        "type": "object",
        "properties": {
          "id": {
            "title": "Id",
            "type": "integer",
            "description": "The unique identifier of the user"
          },
          "organization_id": {
            "title": "Organization Id",
            "type": "string",
            "description": "The ID of the organization this user belongs to"
          },
          "name": {
            "title": "Name",
            "type": "string",
            "description": "The full name of the user"
          },
          "email": {
            "title": "Email",
            "type": "string",
            "description": "The user's email address"
          },
          "avatar_url": {
            "title": "Avatar Url",
            "type": "string",
            "description": "URL to the user's avatar image"
          },
          "extra": {
            "title": "Extra",
            "type": "object",
            "description": "Additional custom information about the user"
          },
          "created_at": {
            "title": "Created At",
            "type": "string",
            "description": "The timestamp when the user was created"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string",
            "description": "The timestamp when the user was last updated"
          },
          "deleted_at": {
            "title": "Deleted At",
            "type": "string",
            "description": "The timestamp when the user was deleted, if applicable"
          },
          "team_membership": {
            "title": "Team Membership",
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "List of teams the user belongs to"
          },
          "user_type_id": {
            "title": "User Type Id",
            "type": "integer",
            "description": "The type identifier for this user"
          },
          "connected_users": {
            "title": "Connected Users",
            "allOf": [
              {
                "$ref": "#/components/schemas/ConnectedUsersModel"
              }
            ],
            "description": "Information about connected user accounts"
          },
          "permissions": {
            "title": "Permissions",
            "type": "object",
            "description": "User's permission settings"
          }
        },
        "description": "Model representing a user in the system.\n\nAttributes:\n    id (int): The unique identifier of the user.\n    organization_id (str): The ID of the organization this user belongs to.\n    name (str): The full name of the user.\n    email (str): The user's email address.\n    avatar_url (Optional[str]): URL to the user's avatar image.\n    extra (Optional[Dict]): Additional custom information about the user.\n    created_at (str): The timestamp when the user was created.\n    updated_at (Optional[str]): The timestamp when the user was last updated.\n    deleted_at (Optional[str]): The timestamp when the user was deleted, if applicable.\n    team_membership (List[Dict]): List of teams the user belongs to.\n    user_type_id (Optional[int]): The type identifier for this user.\n    connected_users (ConnectedUsersModel): Information about connected user accounts.\n    permissions (Dict): User's permission settings."
      },
      "UserPatchModel": {
        "title": "UserPatchModel",
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "maxLength": 100,
            "minLength": 3,
            "type": "string",
            "description": "username must be at least 3 characters long, start with a letter",
            "example": "ada lovelace"
          },
          "email": {
            "title": "Email",
            "type": "string",
            "description": "User's email address",
            "example": "ada@lovelace.io"
          },
          "permission": {
            "$ref": "#/components/schemas/Permission"
          },
          "team_membership": {
            "title": "Team Membership",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamMembership"
            }
          },
          "custom_info": {
            "$ref": "#/components/schemas/CustomInfo"
          }
        },
        "additionalProperties": false
      },
      "UserRole": {
        "title": "UserRole",
        "enum": [
          "admin",
          "editor",
          "viewer",
          "external",
          "basic"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "UsersPaginatedResponseModel": {
        "title": "UsersPaginatedResponseModel",
        "required": [
          "total",
          "items"
        ],
        "type": "object",
        "properties": {
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "items": {
            "title": "Items",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserModel"
            }
          }
        },
        "description": "A paginated response model specifically for Users API.\n\nThis model represents a paginated response containing a list of users and their total count.\nIt is specifically designed for the Users API endpoints to provide consistent pagination\nstructure across user-related responses.\n\nAttributes:\n    total (int): The total number of users available across all pages.\n        This count represents the complete dataset size, not just the current page.\n\n    items (List[UserModel]): The list of users in the current page."
      },
      "UserUnmergeRequestModel": {
        "title": "UserUnmergeRequestModel",
        "required": [
          "users"
        ],
        "type": "object",
        "properties": {
          "users": {
            "title": "Users",
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "IDs of the merged users to split back out"
          }
        }
      },
      "UserUnmergeResponseModel": {
        "title": "UserUnmergeResponseModel",
        "required": [
          "user_id",
          "primary_user",
          "merged_users",
          "unmerged_users"
        ],
        "type": "object",
        "properties": {
          "user_id": {
            "title": "User Id",
            "type": "integer"
          },
          "primary_user": {
            "title": "Primary User",
            "type": "integer"
          },
          "merged_users": {
            "title": "Merged Users",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "unmerged_users": {
            "title": "Unmerged Users",
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        }
      },
      "SetPrimaryUserRequestModel": {
        "title": "SetPrimaryUserRequestModel",
        "required": [
          "primary_user"
        ],
        "type": "object",
        "properties": {
          "primary_user": {
            "title": "Primary User",
            "type": "integer",
            "description": "ID of the already-merged user to promote to primary"
          }
        }
      },
      "SetPrimaryUserResponseModel": {
        "title": "SetPrimaryUserResponseModel",
        "required": [
          "user_id",
          "primary_user",
          "merged_users"
        ],
        "type": "object",
        "properties": {
          "user_id": {
            "title": "User Id",
            "type": "integer"
          },
          "primary_user": {
            "title": "Primary User",
            "type": "integer"
          },
          "merged_users": {
            "title": "Merged Users",
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        }
      },
      "AuditLogExportResponse": {
        "title": "AuditLogExportResponse",
        "required": [
          "url"
        ],
        "type": "object",
        "properties": {
          "url": {
            "title": "Url",
            "type": "string",
            "description": "Presigned S3 URL to download the exported file, valid for 1 hour"
          }
        }
      },
      "TokenCreateRequest": {
        "title": "TokenCreateRequest",
        "required": [
          "name"
        ],
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "title": "Name",
            "type": "string",
            "maxLength": 100,
            "description": "Display name of the token."
          },
          "expires_at": {
            "title": "Expires At",
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "The day the token stops working (UTC, YYYY-MM-DD only). Must be after today and at most 2 years ahead. Omit for no expiry."
          }
        }
      },
      "TokenUpdateRequest": {
        "title": "TokenUpdateRequest",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "title": "Name",
            "type": "string",
            "maxLength": 100,
            "nullable": true,
            "description": "New display name."
          },
          "status": {
            "title": "Status",
            "type": "string",
            "enum": [
              "revoked"
            ],
            "nullable": true,
            "description": "Set to `revoked` to revoke the token."
          },
          "expires_at": {
            "title": "Expires At",
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "The day the token stops working (UTC, YYYY-MM-DD only). Must be after today and at most 2 years ahead. null = never expires. Omit to keep the current expiry."
          }
        }
      },
      "TokenCreated": {
        "title": "TokenCreated",
        "required": [
          "id",
          "name",
          "token",
          "prefix",
          "source",
          "created_at"
        ],
        "type": "object",
        "properties": {
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "token": {
            "title": "Token",
            "type": "string",
            "description": "The token itself. It is shown only once, so store it now."
          },
          "prefix": {
            "title": "Prefix",
            "type": "string"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "expires_at": {
            "title": "Expires At",
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_at": {
            "title": "Created At",
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TokenItem": {
        "title": "TokenItem",
        "required": [
          "id",
          "name",
          "prefix",
          "status",
          "source",
          "created_at"
        ],
        "type": "object",
        "properties": {
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "prefix": {
            "title": "Prefix",
            "type": "string",
            "description": "First characters of the token, to recognize it. Not a secret."
          },
          "owner_email": {
            "title": "Owner Email",
            "type": "string",
            "nullable": true
          },
          "role": {
            "title": "Role",
            "type": "string",
            "nullable": true,
            "description": "Role of the account that owns the token."
          },
          "status": {
            "title": "Status",
            "type": "string",
            "description": "`active`, `revoked` or `expired`."
          },
          "source": {
            "title": "Source",
            "type": "string",
            "description": "`user`, `api` or `otel`."
          },
          "expires_at": {
            "title": "Expires At",
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Expiry time, UTC."
          },
          "created_at": {
            "title": "Created At",
            "type": "string",
            "format": "date-time",
            "description": "Creation time, UTC."
          },
          "last_used_at": {
            "title": "Last Used At",
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Last time the token was used, UTC."
          }
        }
      },
      "TokensList": {
        "title": "TokensList",
        "required": [
          "total",
          "items"
        ],
        "type": "object",
        "properties": {
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "items": {
            "title": "Items",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TokenItem"
            }
          }
        }
      },
      "UserClassificationFlagsModel": {
        "title": "UserClassificationFlagsModel",
        "type": "object",
        "additionalProperties": false,
        "description": "Flags for one user. Both are optional so a caller can set just one.",
        "properties": {
          "is_bot": {
            "title": "Is Bot",
            "type": "boolean",
            "nullable": true,
            "description": "Whether this user should be classified as a bot."
          },
          "is_excluded_from_metrics": {
            "title": "Is Excluded From Metrics",
            "type": "boolean",
            "nullable": true,
            "description": "Whether this user should be excluded from metrics."
          }
        }
      },
      "UsersClassificationRequestModel": {
        "title": "UsersClassificationRequestModel",
        "required": [
          "users"
        ],
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "users": {
            "title": "Users",
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/UserClassificationFlagsModel"
            },
            "description": "User id (a positive integer) -> flags to set. 1 to 25 entries; each entry must set at least one flag."
          },
          "apply_on_history": {
            "title": "Apply On History",
            "type": "boolean",
            "default": false,
            "description": "Whether to also back-fill historical metrics for the affected users."
          }
        }
      },
      "UsersClassificationResponseModel": {
        "title": "UsersClassificationResponseModel",
        "type": "object",
        "properties": {
          "skipped": {
            "title": "Skipped",
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "enum": [
                "not_a_git_contributor",
                "platform_user",
                "not_found"
              ]
            },
            "description": "User id -> reason it was not classified. Every requested id absent from this map was applied - flags are never echoed back."
          },
          "backfill_history": {
            "title": "Backfill History",
            "type": "string",
            "nullable": true,
            "enum": [
              "not_requested",
              "in_progress",
              "failed",
              null
            ],
            "description": "not_requested (apply_on_history was false), in_progress (a metrics back-fill was triggered), failed (publishing the back-fill failed), or null (no back-fill decision was reached)."
          }
        }
      },
      "EntityRefModel": {
        "properties": {
          "entity_provider_id": {
            "type": "string",
            "title": "Entity Provider Id"
          },
          "name": {
            "title": "Name",
            "type": "string",
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "entity_provider_id"
        ],
        "title": "EntityRefModel"
      },
      "EntitySelectionModel": {
        "properties": {
          "entity_provider_id": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1,
            "title": "Entity Provider Id",
            "description": "The entity id as the provider knows it"
          },
          "is_selected_for_collection": {
            "type": "boolean",
            "title": "Is Selected For Collection",
            "description": "Whether the entity is collected"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "entity_provider_id",
          "is_selected_for_collection"
        ],
        "title": "EntitySelectionModel"
      },
      "EntitySelectionRejectedModel": {
        "properties": {
          "entity_provider_id": {
            "type": "string",
            "title": "Entity Provider Id"
          },
          "is_selected_for_collection": {
            "type": "boolean",
            "title": "Is Selected For Collection"
          },
          "code": {
            "$ref": "#/components/schemas/EntitySelectionRejectionCode"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "used_by": {
            "description": "What still depends on the entity. Present only on `entity_in_use`",
            "allOf": [
              {
                "$ref": "#/components/schemas/UsedByModel"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "entity_provider_id",
          "is_selected_for_collection",
          "code",
          "message"
        ],
        "title": "EntitySelectionRejectedModel"
      },
      "EntitySelectionRejectionCode": {
        "type": "string",
        "enum": [
          "duplicate_entity",
          "entity_not_found",
          "entity_not_reachable",
          "entity_in_use",
          "used_by_unavailable"
        ],
        "title": "EntitySelectionRejectionCode",
        "description": "Why one entry of a selection call was not applied."
      },
      "EntitySelectionRequestModel": {
        "properties": {
          "entities": {
            "items": {
              "$ref": "#/components/schemas/EntitySelectionModel"
            },
            "type": "array",
            "maxItems": 1000,
            "minItems": 1,
            "title": "Entities",
            "description": "The selection changes to apply"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "entities"
        ],
        "title": "EntitySelectionRequestModel"
      },
      "EntitySelectionResponseModel": {
        "properties": {
          "integration_id": {
            "type": "integer",
            "title": "Integration Id"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "applied": {
            "items": {
              "$ref": "#/components/schemas/EntitySelectionModel"
            },
            "type": "array",
            "title": "Applied"
          },
          "rejected": {
            "items": {
              "$ref": "#/components/schemas/EntitySelectionRejectedModel"
            },
            "type": "array",
            "title": "Rejected"
          }
        },
        "type": "object",
        "required": [
          "integration_id",
          "type",
          "applied",
          "rejected"
        ],
        "title": "EntitySelectionResponseModel"
      },
      "PmEntitiesIntegrationModel": {
        "properties": {
          "integration_id": {
            "type": "integer",
            "title": "Integration Id"
          },
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "integration_name": {
            "title": "Integration Name",
            "type": "string",
            "nullable": true
          },
          "entities": {
            "items": {
              "$ref": "#/components/schemas/PmEntityModel"
            },
            "type": "array",
            "title": "Entities"
          }
        },
        "type": "object",
        "required": [
          "integration_id",
          "provider",
          "entities"
        ],
        "title": "PmEntitiesIntegrationModel"
      },
      "PmEntitiesResponseModel": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "offset": {
            "type": "integer",
            "title": "Offset"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "integrations": {
            "items": {
              "$ref": "#/components/schemas/PmEntitiesIntegrationModel"
            },
            "type": "array",
            "title": "Integrations"
          }
        },
        "type": "object",
        "required": [
          "total",
          "offset",
          "type",
          "integrations"
        ],
        "title": "PmEntitiesResponseModel"
      },
      "PmEntityModel": {
        "properties": {
          "entity_provider_id": {
            "type": "string",
            "title": "Entity Provider Id"
          },
          "name": {
            "title": "Name",
            "type": "string",
            "nullable": true
          },
          "state": {
            "title": "State",
            "type": "string",
            "nullable": true
          },
          "is_selected_for_collection": {
            "title": "Is Selected For Collection",
            "type": "boolean",
            "nullable": true
          },
          "selected_last_updated_at": {
            "title": "Selected Last Updated At",
            "type": "string",
            "nullable": true
          },
          "used_by": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UsedByModel"
              }
            ]
          },
          "parent_project": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EntityRefModel"
              }
            ]
          },
          "teams": {
            "title": "Teams",
            "items": {
              "$ref": "#/components/schemas/EntityRefModel"
            },
            "type": "array",
            "nullable": true
          },
          "field_type": {
            "title": "Field Type",
            "type": "string",
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "entity_provider_id"
        ],
        "title": "PmEntityModel"
      },
      "ProjectTeamAreasModel": {
        "properties": {
          "project": {
            "$ref": "#/components/schemas/EntityRefModel"
          },
          "team": {
            "$ref": "#/components/schemas/EntityRefModel"
          },
          "areas": {
            "items": {
              "$ref": "#/components/schemas/EntityRefModel"
            },
            "type": "array",
            "title": "Areas",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "project",
          "team"
        ],
        "title": "ProjectTeamAreasModel"
      },
      "ScopeEpicModel": {
        "properties": {
          "entity_provider_id": {
            "type": "string",
            "title": "Entity Provider Id"
          },
          "provider_key": {
            "title": "Provider Key",
            "type": "string",
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "entity_provider_id"
        ],
        "title": "ScopeEpicModel"
      },
      "ScopeFieldModel": {
        "properties": {
          "entity_provider_id": {
            "type": "string",
            "title": "Entity Provider Id"
          },
          "value": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Value",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "entity_provider_id"
        ],
        "title": "ScopeFieldModel"
      },
      "ScopeLabelModel": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "ScopeLabelModel"
      },
      "TeamScopeAppliedModel": {
        "properties": {
          "team_id": {
            "type": "integer",
            "title": "Team Id"
          },
          "integration_id": {
            "type": "integer",
            "title": "Integration Id"
          }
        },
        "type": "object",
        "required": [
          "team_id",
          "integration_id"
        ],
        "title": "TeamScopeAppliedModel"
      },
      "TeamScopeDocumentModel": {
        "properties": {
          "boards": {
            "title": "Boards",
            "items": {
              "$ref": "#/components/schemas/EntityRefModel"
            },
            "type": "array",
            "nullable": true
          },
          "epics": {
            "title": "Epics",
            "items": {
              "$ref": "#/components/schemas/ScopeEpicModel"
            },
            "type": "array",
            "nullable": true
          },
          "labels": {
            "title": "Labels",
            "items": {
              "$ref": "#/components/schemas/ScopeLabelModel"
            },
            "type": "array",
            "nullable": true
          },
          "fields": {
            "title": "Fields",
            "items": {
              "$ref": "#/components/schemas/ScopeFieldModel"
            },
            "type": "array",
            "nullable": true
          },
          "project_team_areas": {
            "title": "Project Team Areas",
            "items": {
              "$ref": "#/components/schemas/ProjectTeamAreasModel"
            },
            "type": "array",
            "nullable": true
          }
        },
        "type": "object",
        "title": "TeamScopeDocumentModel"
      },
      "TeamScopeItemModel": {
        "properties": {
          "integration_id": {
            "type": "integer",
            "title": "Integration Id"
          },
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "integration_name": {
            "title": "Integration Name",
            "type": "string",
            "nullable": true
          },
          "scope": {
            "$ref": "#/components/schemas/TeamScopeDocumentModel"
          },
          "methodology": {
            "type": "string",
            "title": "Methodology"
          }
        },
        "type": "object",
        "required": [
          "integration_id",
          "provider",
          "scope",
          "methodology"
        ],
        "title": "TeamScopeItemModel"
      },
      "TeamScopeRejectedModel": {
        "properties": {
          "team_id": {
            "type": "integer",
            "title": "Team Id"
          },
          "integration_id": {
            "type": "integer",
            "title": "Integration Id"
          },
          "status": {
            "type": "integer",
            "title": "Status",
            "description": "The HTTP status this document alone would have been refused with"
          },
          "code": {
            "$ref": "#/components/schemas/TeamScopeRejectionCode"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "team_id",
          "integration_id",
          "status",
          "code",
          "message"
        ],
        "title": "TeamScopeRejectedModel"
      },
      "TeamScopeRejectionCode": {
        "type": "string",
        "enum": [
          "team_not_found",
          "integration_not_found",
          "provider_not_supported",
          "integration_read_only",
          "scope_key_not_writable",
          "invalid_scope",
          "entity_not_found",
          "license_limit",
          "write_failed"
        ],
        "title": "TeamScopeRejectionCode",
        "description": "Why one (team, integration) document of a scope write was not applied."
      },
      "TeamScopeResponseModel": {
        "properties": {
          "team_id": {
            "type": "integer",
            "title": "Team Id"
          },
          "team_name": {
            "title": "Team Name",
            "type": "string",
            "nullable": true
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/TeamScopeItemModel"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "type": "object",
        "required": [
          "team_id",
          "items"
        ],
        "title": "TeamScopeResponseModel"
      },
      "TeamScopeWriteItemModel": {
        "properties": {
          "integration_id": {
            "type": "integer",
            "title": "Integration Id",
            "description": "The integration the document belongs to",
            "minimum": 0.0,
            "exclusiveMinimum": true
          },
          "scope": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TeamScopeWriteDocumentModel"
              }
            ],
            "description": "The scope keys to write, in the shape `GET /api/v1/pm/config/teams/{team_id}/scope` returns: jira `boards`, `epics`, `labels`, `fields`; azure `project_team_areas`"
          },
          "methodology": {
            "title": "Methodology",
            "description": "The team's methodology on this integration. Omitted leaves it unchanged",
            "type": "string",
            "enum": [
              "Scrum",
              "Kanban",
              null
            ],
            "nullable": true
          },
          "provider": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "title": "Provider",
            "description": "Returned by the read; accepted and ignored on a write"
          },
          "integration_name": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "title": "Integration Name",
            "description": "Returned by the read; accepted and ignored on a write"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "integration_id"
        ],
        "title": "TeamScopeWriteItemModel",
        "description": "One (team, integration) document to write."
      },
      "TeamScopeWriteRequestModel": {
        "properties": {
          "teams": {
            "items": {
              "$ref": "#/components/schemas/TeamScopeWriteTeamModel"
            },
            "type": "array",
            "minItems": 1,
            "title": "Teams",
            "description": "The teams to write. At most 25 team-and-integration items and 1000 entities per request, counted across all teams.",
            "maxItems": 25
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "teams"
        ],
        "title": "TeamScopeWriteRequestModel"
      },
      "TeamScopeWriteResponseModel": {
        "properties": {
          "applied": {
            "items": {
              "$ref": "#/components/schemas/TeamScopeAppliedModel"
            },
            "type": "array",
            "title": "Applied"
          },
          "rejected": {
            "items": {
              "$ref": "#/components/schemas/TeamScopeRejectedModel"
            },
            "type": "array",
            "title": "Rejected"
          }
        },
        "type": "object",
        "required": [
          "applied",
          "rejected"
        ],
        "title": "TeamScopeWriteResponseModel"
      },
      "TeamScopeWriteTeamModel": {
        "properties": {
          "team_id": {
            "type": "integer",
            "title": "Team Id",
            "description": "The team whose scope is written",
            "minimum": 0.0,
            "exclusiveMinimum": true
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/TeamScopeWriteItemModel"
            },
            "type": "array",
            "minItems": 1,
            "title": "Items",
            "description": "One per integration",
            "maxItems": 25
          },
          "team_name": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "title": "Team Name",
            "description": "Returned by the read; accepted and ignored on a write"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "team_id",
          "items"
        ],
        "title": "TeamScopeWriteTeamModel"
      },
      "UsedByModel": {
        "properties": {
          "teams": {
            "title": "Teams",
            "items": {
              "$ref": "#/components/schemas/UsedByRefModel"
            },
            "type": "array",
            "nullable": true
          },
          "projects": {
            "title": "Projects",
            "items": {
              "$ref": "#/components/schemas/UsedByRefModel"
            },
            "type": "array",
            "nullable": true
          },
          "boards": {
            "title": "Boards",
            "items": {
              "$ref": "#/components/schemas/EntityRefModel"
            },
            "type": "array",
            "nullable": true
          }
        },
        "type": "object",
        "title": "UsedByModel"
      },
      "UsedByRefModel": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ],
            "title": "Id"
          },
          "name": {
            "title": "Name",
            "type": "string",
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "UsedByRefModel"
      },
      "TeamScopeWriteDocumentModel": {
        "properties": {
          "boards": {
            "items": {
              "$ref": "#/components/schemas/ScopeEntityWriteModel"
            },
            "type": "array",
            "title": "Boards"
          },
          "epics": {
            "items": {
              "$ref": "#/components/schemas/ScopeEpicWriteModel"
            },
            "type": "array",
            "title": "Epics"
          },
          "labels": {
            "items": {
              "$ref": "#/components/schemas/ScopeLabelWriteModel"
            },
            "type": "array",
            "title": "Labels"
          },
          "fields": {
            "items": {
              "$ref": "#/components/schemas/ScopeFieldWriteModel"
            },
            "type": "array",
            "title": "Fields"
          },
          "project_team_areas": {
            "items": {
              "$ref": "#/components/schemas/ProjectTeamAreasWriteModel"
            },
            "type": "array",
            "title": "Project Team Areas"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "TeamScopeWriteDocumentModel",
        "description": "The published shape of a written scope: jira `boards`, `epics`, `labels`, `fields`; azure `project_team_areas`"
      },
      "ScopeEntityWriteModel": {
        "properties": {
          "entity_provider_id": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1,
            "title": "Entity Provider Id"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "title": "Name",
            "description": "Returned by the read; accepted and ignored on a write"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "entity_provider_id"
        ],
        "title": "ScopeEntityWriteModel",
        "description": "A board, or an azure project / team / area: accepts the `name` its read returns."
      },
      "ScopeEpicWriteModel": {
        "properties": {
          "entity_provider_id": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1,
            "title": "Entity Provider Id"
          },
          "provider_key": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "title": "Provider Key",
            "description": "Returned by the read; accepted and ignored on a write"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "entity_provider_id"
        ],
        "title": "ScopeEpicWriteModel",
        "description": "An epic: accepts the `provider_key` its read returns."
      },
      "ScopeLabelWriteModel": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1,
            "title": "Name"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "ScopeLabelWriteModel"
      },
      "ScopeFieldWriteModel": {
        "properties": {
          "entity_provider_id": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1,
            "title": "Entity Provider Id"
          },
          "value": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Value",
            "default": []
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "entity_provider_id"
        ],
        "title": "ScopeFieldWriteModel"
      },
      "ProjectTeamAreasWriteModel": {
        "properties": {
          "project": {
            "$ref": "#/components/schemas/ScopeEntityWriteModel"
          },
          "team": {
            "$ref": "#/components/schemas/ScopeEntityWriteModel"
          },
          "areas": {
            "items": {
              "$ref": "#/components/schemas/ScopeEntityWriteModel"
            },
            "type": "array",
            "minItems": 1,
            "title": "Areas"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "project",
          "team",
          "areas"
        ],
        "title": "ProjectTeamAreasWriteModel",
        "description": "A triple is written whole: a triple with no areas matches no issue, so at least one is required."
      },
      "IntegrationModel": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "The integration id. PM integration ids are what the PM configuration endpoints take; git integration ids are what the git repository endpoints take"
          },
          "type": {
            "type": "string",
            "enum": [
              "pm",
              "git"
            ],
            "title": "Type",
            "description": "`pm` or `git`"
          },
          "provider": {
            "type": "string",
            "enum": [
              "jira",
              "azure_boards",
              "bitbucket",
              "gitlab",
              "github",
              "bitbucket_server",
              "azure_devops"
            ],
            "title": "Provider",
            "description": "`jira` or `azure_boards` for PM; `github`, `gitlab`, `bitbucket`, `bitbucket_server` or `azure_devops` for git"
          },
          "name": {
            "title": "Name",
            "description": "The integration display name",
            "type": "string",
            "nullable": true
          },
          "state": {
            "title": "State",
            "description": "The integration state, e.g. `ok`, `failing`, `in-progress`",
            "type": "string",
            "nullable": true
          },
          "auth_type": {
            "title": "Auth Type",
            "description": "How the integration is connected",
            "type": "string",
            "nullable": true
          },
          "failing_reason": {
            "title": "Failing Reason",
            "description": "Why the integration is failing, in the Health Center wording. Present only when it has one",
            "type": "string",
            "nullable": true
          },
          "deleted_at": {
            "title": "Deleted At",
            "description": "When the integration was deleted. Present only under `include_invalid=true`",
            "type": "string",
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "type",
          "provider"
        ],
        "title": "IntegrationModel"
      },
      "IntegrationsResponseModel": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/IntegrationModel"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "type": "object",
        "required": [
          "items"
        ],
        "title": "IntegrationsResponseModel"
      },
      "TeamScopeReplaceTeamModel": {
        "properties": {
          "team_id": {
            "type": "integer",
            "title": "Team Id",
            "description": "The team whose scope is written",
            "minimum": 0.0,
            "exclusiveMinimum": true
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/TeamScopeReplaceItemModel"
            },
            "type": "array",
            "minItems": 1,
            "title": "Items",
            "description": "One per integration",
            "maxItems": 25
          },
          "team_name": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "title": "Team Name",
            "description": "Returned by the read; accepted and ignored on a write"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "team_id",
          "items"
        ],
        "title": "TeamScopeReplaceTeamModel"
      },
      "TeamScopeReplaceItemModel": {
        "properties": {
          "integration_id": {
            "type": "integer",
            "title": "Integration Id",
            "description": "The integration the document belongs to",
            "minimum": 0.0,
            "exclusiveMinimum": true
          },
          "scope": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TeamScopeWriteDocumentModel"
              }
            ],
            "description": "The scope keys to write, in the shape `GET /api/v1/pm/config/teams/{team_id}/scope` returns: jira `boards`, `epics`, `labels`, `fields`; azure `project_team_areas`. A replace must name at least one key.",
            "minProperties": 1
          },
          "methodology": {
            "title": "Methodology",
            "description": "The team's methodology on this integration. Omitted leaves it unchanged",
            "type": "string",
            "enum": [
              "Scrum",
              "Kanban",
              null
            ],
            "nullable": true
          },
          "provider": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "title": "Provider",
            "description": "Returned by the read; accepted and ignored on a write"
          },
          "integration_name": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "title": "Integration Name",
            "description": "Returned by the read; accepted and ignored on a write"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "integration_id",
          "scope"
        ],
        "title": "TeamScopeReplaceItemModel",
        "description": "One (team, integration) document to replace. Names at least one scope key."
      },
      "TeamScopeReplaceRequestModel": {
        "properties": {
          "teams": {
            "items": {
              "$ref": "#/components/schemas/TeamScopeReplaceTeamModel"
            },
            "type": "array",
            "minItems": 1,
            "title": "Teams",
            "description": "The teams to write. At most 25 team-and-integration items and 1000 entities per request, counted across all teams.",
            "maxItems": 25
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "teams"
        ],
        "title": "TeamScopeReplaceRequestModel",
        "description": "A replace: every item names at least one scope key, so clearing a whole document is never implicit."
      },
      "CodingTimeStrategyWriteModel": {
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "first_commit",
              "issue_state_pr"
            ],
            "title": "Method",
            "description": "`first_commit`: the first commit on the branch; `issue_state_pr`: the linked issue moving to in progress",
            "example": "first_commit"
          },
          "backfill_days": {
            "type": "integer",
            "enum": [
              1,
              90
            ],
            "title": "Backfill Days",
            "description": "How far back history is recomputed after this change: `90` (default) recomputes the last 90 days, `1` skips the recompute. The recompute runs asynchronously",
            "default": 90
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "method"
        ],
        "title": "CodingTimeStrategyWriteModel",
        "description": "When coding time starts. Changing it recomputes history asynchronously."
      },
      "DefaultBranchModel": {
        "properties": {
          "branch_name": {
            "type": "string",
            "title": "Branch Name",
            "description": "`null` uses the provider's default branch",
            "example": "main",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "DefaultBranchModel",
        "description": "The branch every merge comparison is based on."
      },
      "DraftPullRequestsModel": {
        "properties": {
          "labels": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Labels",
            "description": "Labels that mark a pull request as a draft (case-insensitive)",
            "example": [
              "wip",
              "do not merge"
            ]
          },
          "title_pattern": {
            "type": "string",
            "title": "Title Pattern",
            "description": "Regular expression matched against the title; `null` or empty: no title rule",
            "example": "^.*wip.*$",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "DraftPullRequestsModel",
        "description": "How draft pull requests are recognized; a pull request matching either rule is a draft."
      },
      "GitRepositoriesPaginatedResponseModel": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/GitRepositoryModel"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "type": "object",
        "required": [
          "total",
          "items"
        ],
        "title": "GitRepositoriesPaginatedResponseModel",
        "description": "Paginated list of Git repositories for an organization.\n\nAttributes:\n    total (int): Total number of repositories matching the filters.\n    items (List[GitRepositoryModel]): Repositories on the current page."
      },
      "GitRepositoriesStateRequestModel": {
        "properties": {
          "repositories": {
            "items": {
              "$ref": "#/components/schemas/GitRepositoryStateModel"
            },
            "type": "array",
            "maxItems": 100,
            "minItems": 1,
            "title": "Repositories",
            "description": "The monitoring changes to apply"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "repositories"
        ],
        "title": "GitRepositoriesStateRequestModel",
        "description": "Body of PATCH /api/v1/git/repositories."
      },
      "GitRepositoriesStateResponseModel": {
        "properties": {
          "applied": {
            "items": {
              "$ref": "#/components/schemas/GitRepositoryStateModel"
            },
            "type": "array",
            "title": "Applied"
          },
          "rejected": {
            "items": {
              "$ref": "#/components/schemas/GitRepositoryRejectedModel"
            },
            "type": "array",
            "title": "Rejected"
          }
        },
        "type": "object",
        "required": [
          "applied",
          "rejected"
        ],
        "title": "GitRepositoriesStateResponseModel"
      },
      "GitRepositoryModel": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "LinearB repository id"
          },
          "provider_id": {
            "type": "string",
            "title": "Provider Id",
            "description": "Repository id in the provider (GitHub/GitLab/etc.)",
            "nullable": true
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Repository name"
          },
          "http_url": {
            "type": "string",
            "title": "Http Url",
            "description": "Repository URL"
          },
          "provider": {
            "type": "string",
            "enum": [
              "bitbucket",
              "gitlab",
              "github",
              "bitbucket_server",
              "azure_devops"
            ],
            "title": "Provider",
            "description": "The Git provider: `github`, `gitlab`, `bitbucket`, `bitbucket_server` or `azure_devops`",
            "nullable": true
          },
          "integration_id": {
            "type": "integer",
            "title": "Integration Id",
            "description": "The Git integration the repository belongs to, as listed by GET /api/v1/integrations",
            "nullable": true
          },
          "visibility": {
            "type": "string",
            "enum": [
              "public",
              "private",
              "internal"
            ],
            "title": "Visibility",
            "description": "Repository visibility on the provider: `public`, `private` or `internal`; null when the provider does not report it",
            "nullable": true
          },
          "state": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RepositoryState"
              }
            ],
            "description": "Monitoring state: monitored, not_monitored, discovered, or failing"
          },
          "failing_reason": {
            "type": "string",
            "title": "Failing Reason",
            "description": "Reason for failure; null unless state is failing",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "title": "Created At",
            "description": "When the repository was first registered in LinearB"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At",
            "description": "When the repository record was last updated in LinearB"
          },
          "provider_last_pushed_at": {
            "type": "string",
            "title": "Provider Last Pushed At",
            "description": "Most recent push timestamp reported by the provider",
            "nullable": true
          },
          "has_webhook": {
            "type": "boolean",
            "title": "Has Webhook",
            "description": "Whether an active webhook is registered for this repo"
          },
          "is_onprem": {
            "type": "boolean",
            "title": "Is Onprem",
            "description": "True for OPA/on-prem repos, false for cloud"
          },
          "ai_tool_rules": {
            "type": "object",
            "title": "Ai Tool Rules",
            "description": "Detected AI tool rule files (e.g. .cursorrules, CLAUDE.md), raw JSONB from the linta scanner",
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "http_url",
          "state",
          "created_at",
          "updated_at",
          "has_webhook",
          "is_onprem"
        ],
        "title": "GitRepositoryModel",
        "description": "A single repository, as exposed by GET /api/v1/git/repositories."
      },
      "GitRepositoryRejectedModel": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "state": {
            "$ref": "#/components/schemas/SettableRepositoryState"
          },
          "code": {
            "$ref": "#/components/schemas/GitRepositoryRejectionCode"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "id",
          "state",
          "code",
          "message"
        ],
        "title": "GitRepositoryRejectedModel"
      },
      "GitRepositoryRejectionCode": {
        "type": "string",
        "enum": [
          "duplicate_repository",
          "repository_not_found",
          "integration_not_available",
          "backfill_in_progress",
          "never_monitored",
          "state_changed",
          "write_failed"
        ],
        "title": "GitRepositoryRejectionCode",
        "description": "Why one entry of a monitoring call was not applied."
      },
      "GitRepositoryStateModel": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "LinearB repository id, as listed by GET /api/v1/git/repositories",
            "minimum": 1.0
          },
          "state": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SettableRepositoryState"
              }
            ],
            "description": "`monitored` starts collecting the repository; `not_monitored` stops collecting it. Data already collected is kept"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "state"
        ],
        "title": "GitRepositoryStateModel",
        "description": "One repository's requested monitoring state."
      },
      "PatternsModel": {
        "properties": {
          "patterns": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Patterns",
            "description": "Regular expressions, one per entry",
            "example": [
              "^main$",
              "^release/.*"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "PatternsModel",
        "description": "A list of regular expressions. Changing it recomputes history asynchronously."
      },
      "ReleasesDetectionWriteModel": {
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "tags",
              "pr_to_branch",
              "merge_to_branch",
              "api"
            ],
            "title": "Method",
            "description": "`tags`, `pr_to_branch`, `merge_to_branch` or `api`",
            "example": "tags"
          },
          "pattern": {
            "type": "string",
            "title": "Pattern",
            "description": "Regular expression for the release tags (`tags`) or the dedicated branch (`pr_to_branch`, `merge_to_branch`); required for those, not allowed with `api`",
            "example": ".*",
            "nullable": true
          },
          "backfill_days": {
            "type": "integer",
            "enum": [
              1,
              90
            ],
            "title": "Backfill Days",
            "description": "How far back history is recomputed after this change: `90` (default) recomputes the last 90 days, `1` skips the recompute. The recompute runs asynchronously",
            "default": 90
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "method"
        ],
        "title": "ReleasesDetectionWriteModel",
        "description": "How releases are detected. Changing it recomputes history asynchronously."
      },
      "RepositoryConfigResponseModel": {
        "properties": {
          "repository_id": {
            "type": "integer",
            "title": "Repository Id",
            "example": 80231
          },
          "repository_name": {
            "type": "string",
            "title": "Repository Name",
            "example": "api",
            "nullable": true
          },
          "settings": {
            "additionalProperties": {
              "$ref": "#/components/schemas/RepositorySettingSectionModel"
            },
            "type": "object",
            "title": "Settings"
          }
        },
        "type": "object",
        "required": [
          "repository_id",
          "settings"
        ],
        "title": "RepositoryConfigResponseModel",
        "description": "A repository's settings, each section marked as inherited (`global`) or overridden (`repository`)."
      },
      "RepositorySettingSectionModel": {
        "properties": {
          "value": {
            "type": "object",
            "title": "Value",
            "description": "The value in effect for the repository, shaped like the same section of `GET /api/v1/git/config`"
          },
          "source": {
            "type": "string",
            "enum": [
              "global",
              "repository"
            ],
            "title": "Source",
            "description": "`repository`: the repository overrides it; `global`: the organization default applies"
          },
          "global_default": {
            "type": "object",
            "title": "Global Default",
            "description": "The organization default, returned when the repository overrides it",
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "value",
          "source"
        ],
        "title": "RepositorySettingSectionModel",
        "description": "One section of a repository's settings."
      },
      "RepositorySettingsWriteModel": {
        "properties": {
          "releases_detection": {
            "$ref": "#/components/schemas/ReleasesDetectionWriteModel",
            "nullable": true
          },
          "draft_pull_requests": {
            "$ref": "#/components/schemas/DraftPullRequestsModel",
            "nullable": true
          },
          "default_branch": {
            "$ref": "#/components/schemas/DefaultBranchModel",
            "nullable": true
          },
          "exclude_branches": {
            "$ref": "#/components/schemas/PatternsModel",
            "description": "Changing it recomputes history asynchronously",
            "nullable": true
          },
          "exclude_base_branches": {
            "$ref": "#/components/schemas/PatternsModel",
            "description": "Changing it recomputes history asynchronously",
            "nullable": true
          },
          "exclude_file_extensions": {
            "$ref": "#/components/schemas/PatternsModel",
            "description": "Changing it recomputes history asynchronously",
            "nullable": true
          },
          "coding_time_strategy": {
            "$ref": "#/components/schemas/CodingTimeStrategyWriteModel",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "RepositorySettingsWriteModel",
        "description": "The setting sections to write, at least one. Each section sent replaces that section."
      },
      "RepositoryState": {
        "type": "string",
        "enum": [
          "monitored",
          "not_monitored",
          "failing",
          "discovered"
        ],
        "title": "RepositoryState",
        "description": "Monitoring state of a repository in LinearB, using the customer-facing vocabulary.\n\nThe internal `repository.state` column stores `active | inactive | failing | discovered`;\nthis enum is the public translation: `active -> monitored`, `inactive -> not_monitored`."
      },
      "SettableRepositoryState": {
        "type": "string",
        "enum": [
          "monitored",
          "not_monitored"
        ],
        "title": "SettableRepositoryState",
        "description": "The monitoring states a caller may set; `failing` and `discovered` are assigned by LinearB."
      },
      "BotPrAttributionModel": {
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "merge_actor",
              "assignee",
              "none"
            ],
            "title": "Method",
            "description": "`merge_actor`: whoever merged it; `assignee`: its assignees; `none`: left on the bot",
            "example": "merge_actor"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "method"
        ],
        "title": "BotPrAttributionModel",
        "description": "Who a pull request opened by a bot is attributed to."
      },
      "CodingTimeStrategyModel": {
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "first_commit",
              "issue_state_pr"
            ],
            "title": "Method",
            "description": "`first_commit`: the first commit on the branch; `issue_state_pr`: the linked issue moving to in progress",
            "example": "first_commit"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "method"
        ],
        "title": "CodingTimeStrategyModel",
        "description": "When coding time starts."
      },
      "GitConfigResponseModel": {
        "properties": {
          "settings": {
            "$ref": "#/components/schemas/GitSettingsModel"
          }
        },
        "type": "object",
        "required": [
          "settings"
        ],
        "title": "GitConfigResponseModel",
        "description": "The organization-wide default of every repository setting section, and the organization-wide only sections."
      },
      "GitSettingsModel": {
        "properties": {
          "releases_detection": {
            "$ref": "#/components/schemas/ReleasesDetectionModel"
          },
          "draft_pull_requests": {
            "$ref": "#/components/schemas/DraftPullRequestsModel"
          },
          "default_branch": {
            "$ref": "#/components/schemas/DefaultBranchModel"
          },
          "exclude_branches": {
            "$ref": "#/components/schemas/PatternsModel"
          },
          "exclude_base_branches": {
            "$ref": "#/components/schemas/PatternsModel"
          },
          "exclude_file_extensions": {
            "$ref": "#/components/schemas/PatternsModel"
          },
          "coding_time_strategy": {
            "$ref": "#/components/schemas/CodingTimeStrategyModel"
          },
          "bot_pr_attribution": {
            "$ref": "#/components/schemas/BotPrAttributionModel"
          },
          "include_file_extensions": {
            "$ref": "#/components/schemas/IncludeFileExtensionsModel"
          },
          "active_branches_duration": {
            "$ref": "#/components/schemas/ActiveBranchesDurationModel"
          },
          "issue_start_time": {
            "$ref": "#/components/schemas/IssueStartTimeModel"
          }
        },
        "type": "object",
        "required": [
          "releases_detection",
          "draft_pull_requests",
          "default_branch",
          "exclude_branches",
          "exclude_base_branches",
          "exclude_file_extensions",
          "coding_time_strategy",
          "bot_pr_attribution",
          "include_file_extensions",
          "active_branches_duration",
          "issue_start_time"
        ],
        "title": "GitSettingsModel",
        "description": "The organization-wide Git setting sections."
      },
      "GitSettingsWriteModel": {
        "properties": {
          "releases_detection": {
            "$ref": "#/components/schemas/ReleasesDetectionWriteModel",
            "nullable": true
          },
          "draft_pull_requests": {
            "$ref": "#/components/schemas/DraftPullRequestsModel",
            "nullable": true
          },
          "default_branch": {
            "$ref": "#/components/schemas/DefaultBranchModel",
            "nullable": true
          },
          "exclude_branches": {
            "$ref": "#/components/schemas/PatternsModel",
            "description": "Changing it recomputes history asynchronously",
            "nullable": true
          },
          "exclude_base_branches": {
            "$ref": "#/components/schemas/PatternsModel",
            "description": "Changing it recomputes history asynchronously",
            "nullable": true
          },
          "exclude_file_extensions": {
            "$ref": "#/components/schemas/PatternsModel",
            "description": "Changing it recomputes history asynchronously",
            "nullable": true
          },
          "coding_time_strategy": {
            "$ref": "#/components/schemas/CodingTimeStrategyWriteModel",
            "nullable": true
          },
          "bot_pr_attribution": {
            "$ref": "#/components/schemas/BotPrAttributionModel",
            "description": "Organization-wide only; it cannot be set per repository",
            "nullable": true
          },
          "include_file_extensions": {
            "$ref": "#/components/schemas/IncludeFileExtensionsModel",
            "description": "Organization-wide only; it cannot be set per repository. Changing it recomputes history asynchronously",
            "nullable": true
          },
          "active_branches_duration": {
            "$ref": "#/components/schemas/ActiveBranchesDurationWriteModel",
            "description": "Organization-wide only; it cannot be set per repository",
            "nullable": true
          },
          "issue_start_time": {
            "$ref": "#/components/schemas/IssueStartTimeModel",
            "description": "Organization-wide only; it cannot be set per repository",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "GitSettingsWriteModel"
      },
      "ReleasesDetectionModel": {
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "tags",
              "pr_to_branch",
              "merge_to_branch",
              "api",
              "deployment"
            ],
            "title": "Method",
            "description": "`tags`: release tags; `pr_to_branch`: pull requests to a dedicated branch; `merge_to_branch`: direct merges to a dedicated branch; `api`: releases reported via the API. `deployment` is read-only",
            "example": "tags"
          },
          "pattern": {
            "type": "string",
            "title": "Pattern",
            "description": "Regular expression for the release tags (`tags`) or the dedicated branch (`pr_to_branch`, `merge_to_branch`); required for those, not allowed with `api`",
            "example": ".*",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "method"
        ],
        "title": "ReleasesDetectionModel",
        "description": "How releases are detected."
      },
      "TeamGitScopeRepositoryModel": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "The repository id, as `GET /api/v1/git/repositories` returns it",
            "example": 101,
            "minimum": 1.0
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The repository name",
            "example": "api",
            "nullable": true
          },
          "url": {
            "type": "string",
            "title": "Url",
            "description": "The repository URL",
            "example": "https://github.com/acme/api",
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "TeamGitScopeRepositoryModel",
        "description": "A repository in a team's Git scope."
      },
      "TeamGitScopeResponseModel": {
        "properties": {
          "team_id": {
            "type": "integer",
            "title": "Team Id",
            "description": "The team id",
            "example": 123
          },
          "team_name": {
            "type": "string",
            "title": "Team Name",
            "description": "The team name",
            "example": "Payments",
            "nullable": true
          },
          "repositories": {
            "items": {
              "$ref": "#/components/schemas/TeamGitScopeRepositoryModel"
            },
            "type": "array",
            "title": "Repositories",
            "description": "The repositories in the team's Git scope"
          },
          "services": {
            "items": {
              "$ref": "#/components/schemas/TeamGitScopeServiceModel"
            },
            "type": "array",
            "title": "Services",
            "description": "The services in the team's Git scope"
          }
        },
        "type": "object",
        "required": [
          "team_id"
        ],
        "title": "TeamGitScopeResponseModel",
        "description": "A team's own Git scope: the repositories and services assigned to the team itself.\n\nScope assigned to descendant teams is not included; a group returns only what was assigned to the group.\nOnly monitored repositories are listed."
      },
      "TeamGitScopeServiceModel": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "The service id, as `GET /api/v1/services` returns it",
            "example": 201,
            "minimum": 1.0
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The service name",
            "example": "checkout",
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "TeamGitScopeServiceModel",
        "description": "A service in a team's Git scope."
      },
      "TeamGitScopeWriteRequestModel": {
        "properties": {
          "repository_ids": {
            "items": {
              "type": "integer",
              "minimum": 1.0
            },
            "type": "array",
            "maxItems": 10000,
            "title": "Repository Ids",
            "description": "Repository ids; `[]` clears the key",
            "example": [
              101,
              102
            ],
            "nullable": true
          },
          "service_ids": {
            "items": {
              "type": "integer",
              "minimum": 1.0
            },
            "type": "array",
            "maxItems": 10000,
            "title": "Service Ids",
            "description": "Service ids; `[]` clears the key",
            "example": [
              201
            ],
            "nullable": true
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "TeamGitScopeWriteRequestModel",
        "description": "The scope keys a Git scope write sets: `repository_ids` and/or `service_ids` - at least one.\n\nIds are the ones `GET /api/v1/git/repositories` and `GET /api/v1/services` return. Repositories must be\nmonitored. Duplicate ids are ignored."
      },
      "ActiveBranchesDurationModel": {
        "properties": {
          "days": {
            "type": "integer",
            "maximum": 14.0,
            "minimum": 3.0,
            "title": "Days",
            "description": "Days, from 3 to 14",
            "example": 7
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "days"
        ],
        "title": "ActiveBranchesDurationModel",
        "description": "How long a branch stays active after its last update before it becomes stale."
      },
      "ActiveBranchesDurationWriteModel": {
        "properties": {
          "days": {
            "type": "integer",
            "enum": [
              3,
              7,
              14
            ],
            "title": "Days",
            "description": "Days: `3`, `7` or `14`, as Company Settings offers",
            "example": 7
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "days"
        ],
        "title": "ActiveBranchesDurationWriteModel",
        "description": "How long a branch stays active after its last update before it becomes stale."
      },
      "IncludeFileExtensionsModel": {
        "properties": {
          "patterns": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Patterns",
            "description": "Regular expressions, one per entry; `.*$` includes every file",
            "example": [
              "\\.js$",
              "\\.ts$"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "IncludeFileExtensionsModel",
        "description": "The files scanned: only files matching one of the patterns, out of those left after the excluded file extensions.\nChanging it recomputes history asynchronously."
      },
      "IssueStartTimeModel": {
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "first_transition",
              "last_transition"
            ],
            "title": "Method",
            "description": "`first_transition`: the first move to in progress; `last_transition`: the last one",
            "example": "last_transition"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "method"
        ],
        "title": "IssueStartTimeModel",
        "description": "Which transition to the in progress state is the issue start time; it affects coding time and MTTR."
      }
    },
    "securitySchemes": {
      "APIKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    }
  },
  "tags": [
    {
      "name": "Deployments",
      "description": "Deployment Tracking API"
    },
    {
      "name": "Measurements V2",
      "description": "Measurements V2 API"
    },
    {
      "name": "Teams V2",
      "description": "Teams V2 API"
    },
    {
      "name": "Users",
      "description": "Users API"
    },
    {
      "name": "Services",
      "description": "Services API"
    },
    {
      "name": "Incidents",
      "description": "Incidents API"
    },
    {
      "name": "Report Metric",
      "description": "Report Metric"
    },
    {
      "name": "Audit Log",
      "description": "Audit Log API"
    },
    {
      "name": "Integrations",
      "description": "The organization's PM and git integrations"
    },
    {
      "name": "PM Configuration",
      "description": "PM integrations, the entities selected for collection, and team PM scope"
    },
    {
      "name": "API Tokens",
      "description": "API Tokens API"
    },
    {
      "name": "Git Repositories",
      "description": "Git repositories, their monitoring state and per-repository settings"
    },
    {
      "name": "Git Configuration",
      "description": "Organization-wide Git settings, and the Git scope of a team"
    }
  ],
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}