mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 13:37:30 +00:00
211 lines
5 KiB
JSON
211 lines
5 KiB
JSON
|
|
{
|
||
|
|
"openapi": "3.0.0",
|
||
|
|
"info": {
|
||
|
|
"title": "Fleet Premium API",
|
||
|
|
"description": "API for managing teams and related functionalities in Fleet Premium",
|
||
|
|
"version": "1.0.0"
|
||
|
|
},
|
||
|
|
"servers": [
|
||
|
|
{
|
||
|
|
"url": "https://rbx.cloud.fleetdm.com/"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"paths": {
|
||
|
|
"/api/v1/fleet/teams": {
|
||
|
|
"get": {
|
||
|
|
"summary": "List teams",
|
||
|
|
"parameters": [
|
||
|
|
{
|
||
|
|
"name": "page",
|
||
|
|
"in": "query",
|
||
|
|
"description": "Page number of the results to fetch.",
|
||
|
|
"schema": {
|
||
|
|
"type": "integer"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"name": "per_page",
|
||
|
|
"in": "query",
|
||
|
|
"description": "Results per page.",
|
||
|
|
"schema": {
|
||
|
|
"type": "integer"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"name": "order_key",
|
||
|
|
"in": "query",
|
||
|
|
"description": "What to order results by. Can be any column in the teams table.",
|
||
|
|
"schema": {
|
||
|
|
"type": "string"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"name": "order_direction",
|
||
|
|
"in": "query",
|
||
|
|
"description": "The direction of the order given the order key. Options include asc and desc. Default is asc.",
|
||
|
|
"schema": {
|
||
|
|
"type": "string",
|
||
|
|
"enum": ["asc", "desc"]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"name": "query",
|
||
|
|
"in": "query",
|
||
|
|
"description": "Search query keywords. Searchable fields include name.",
|
||
|
|
"schema": {
|
||
|
|
"type": "string"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"responses": {
|
||
|
|
"200": {
|
||
|
|
"description": "List of teams",
|
||
|
|
"content": {
|
||
|
|
"application/json": {
|
||
|
|
"schema": {
|
||
|
|
"type": "object",
|
||
|
|
"properties": {
|
||
|
|
"teams": {
|
||
|
|
"type": "array",
|
||
|
|
"items": {
|
||
|
|
"$ref": "#/components/schemas/Team"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"post": {
|
||
|
|
"summary": "Create team",
|
||
|
|
"requestBody": {
|
||
|
|
"description": "Team details",
|
||
|
|
"required": true,
|
||
|
|
"content": {
|
||
|
|
"application/json": {
|
||
|
|
"schema": {
|
||
|
|
"$ref": "#/components/schemas/TeamCreateRequest"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"responses": {
|
||
|
|
"200": {
|
||
|
|
"description": "Team created successfully",
|
||
|
|
"content": {
|
||
|
|
"application/json": {
|
||
|
|
"schema": {
|
||
|
|
"$ref": "#/components/schemas/Team"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"/api/v1/fleet/teams/{id}": {
|
||
|
|
"get": {
|
||
|
|
"summary": "Get team",
|
||
|
|
"parameters": [
|
||
|
|
{
|
||
|
|
"name": "id",
|
||
|
|
"in": "path",
|
||
|
|
"required": true,
|
||
|
|
"description": "The desired team's ID.",
|
||
|
|
"schema": {
|
||
|
|
"type": "integer"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"responses": {
|
||
|
|
"200": {
|
||
|
|
"description": "Team details",
|
||
|
|
"content": {
|
||
|
|
"application/json": {
|
||
|
|
"schema": {
|
||
|
|
"$ref": "#/components/schemas/Team"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"delete": {
|
||
|
|
"summary": "Delete team",
|
||
|
|
"parameters": [
|
||
|
|
{
|
||
|
|
"name": "id",
|
||
|
|
"in": "path",
|
||
|
|
"required": true,
|
||
|
|
"description": "The desired team's ID.",
|
||
|
|
"schema": {
|
||
|
|
"type": "integer"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"responses": {
|
||
|
|
"200": {
|
||
|
|
"description": "Team deleted successfully"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"components": {
|
||
|
|
"schemas": {
|
||
|
|
"Team": {
|
||
|
|
"type": "object",
|
||
|
|
"properties": {
|
||
|
|
"id": {
|
||
|
|
"type": "integer"
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"type": "string"
|
||
|
|
},
|
||
|
|
"description": {
|
||
|
|
"type": "string"
|
||
|
|
},
|
||
|
|
"agent_options": {
|
||
|
|
"type": "string"
|
||
|
|
},
|
||
|
|
"secrets": {
|
||
|
|
"type": "array",
|
||
|
|
"items": {
|
||
|
|
"type": "object",
|
||
|
|
"properties": {
|
||
|
|
"secret": {
|
||
|
|
"type": "string"
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"type": "string",
|
||
|
|
"format": "date-time"
|
||
|
|
},
|
||
|
|
"team_id": {
|
||
|
|
"type": "integer"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"TeamCreateRequest": {
|
||
|
|
"type": "object",
|
||
|
|
"properties": {
|
||
|
|
"name": {
|
||
|
|
"type": "string"
|
||
|
|
},
|
||
|
|
"description": {
|
||
|
|
"type": "string"
|
||
|
|
},
|
||
|
|
"agent_options": {
|
||
|
|
"type": "string"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"required": ["name"]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|