Skip to content

Commit

Permalink
[OpenAPI][Fleet] Add missing operation summaries (elastic#199548)
Browse files Browse the repository at this point in the history
(cherry picked from commit ef0428f)
  • Loading branch information
lcawl committed Nov 8, 2024
1 parent cf4870d commit d961497
Show file tree
Hide file tree
Showing 16 changed files with 415 additions and 27,986 deletions.
27,965 changes: 0 additions & 27,965 deletions oas_docs/output/kibana.serverless.yaml

This file was deleted.

100 changes: 100 additions & 0 deletions x-pack/plugins/fleet/server/routes/agent/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
fleetAuthz: {
fleet: { readAgents: true },
},
summary: `Get an agent`,
description: `Get an agent by ID.`,
options: {
tags: ['oas-tag:Elastic Agents'],
},
})
.addVersion(
{
Expand All @@ -97,6 +102,11 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
fleetAuthz: {
fleet: { allAgents: true },
},
summary: `Update an agent`,
description: `Update an agent by ID.`,
options: {
tags: ['oas-tag:Elastic Agents'],
},
})
.addVersion(
{
Expand All @@ -113,6 +123,10 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
fleetAuthz: {
fleet: { allAgents: true },
},
summary: `Bulk update agent tags`,
options: {
tags: ['oas-tag:Elastic Agent actions'],
},
})
.addVersion(
{
Expand All @@ -129,6 +143,11 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
fleetAuthz: {
fleet: { allAgents: true },
},
summary: `Delete an agent`,
description: `Delete an agent by ID.`,
options: {
tags: ['oas-tag:Elastic Agents'],
},
})
.addVersion(
{
Expand All @@ -146,6 +165,10 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
fleetAuthz: {
fleet: { readAgents: true },
},
summary: `Get agents`,
options: {
tags: ['oas-tag:Elastic Agents'],
},
})
.addVersion(
{
Expand All @@ -162,6 +185,10 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
fleetAuthz: {
fleet: { readAgents: true },
},
summary: `Get agent tags`,
options: {
tags: ['oas-tag:Elastic Agents'],
},
})
.addVersion(
{
Expand All @@ -178,6 +205,10 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
fleetAuthz: {
fleet: { allAgents: true },
},
summary: `Create an agent action`,
options: {
tags: ['oas-tag:Elastic Agent actions'],
},
})
.addVersion(
{
Expand All @@ -198,6 +229,10 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
fleetAuthz: {
fleet: { allAgents: true },
},
summary: `Cancel an agent action`,
options: {
tags: ['oas-tag:Elastic Agent actions'],
},
})
.addVersion(
{
Expand All @@ -219,6 +254,10 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
fleetAuthz: {
fleet: { readAgents: true },
},
summary: `Get agents by action ids`,
options: {
tags: ['oas-tag:Elastic Agents'],
},
})
.addVersion(
{
Expand All @@ -234,6 +273,9 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
fleetAuthz: {
fleet: { allAgents: true },
},
summary: `Unenroll an agent`,
options: {
tags: ['oas-tag:Elastic Agent actions'],
})
.addVersion(
{
Expand Down Expand Up @@ -265,6 +307,10 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
fleetAuthz: {
fleet: { allAgents: true },
},
summary: `Reassign an agent`,
options: {
tags: ['oas-tag:Elastic Agent actions'],
},
})
.addVersion(
{
Expand All @@ -280,6 +326,10 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
fleetAuthz: {
fleet: { readAgents: true },
},
summary: `Request agent diagnostics`,
options: {
tags: ['oas-tag:Elastic Agent actions'],
},
})
.addVersion(
{
Expand All @@ -295,6 +345,10 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
fleetAuthz: {
fleet: { readAgents: true },
},
summary: `Bulk request diagnostics from agents`,
options: {
tags: ['oas-tag:Elastic Agent actions'],
},
})
.addVersion(
{
Expand All @@ -310,6 +364,10 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
fleetAuthz: {
fleet: { readAgents: true },
},
summary: `Get agent uploads`,
options: {
tags: ['oas-tag:Elastic Agents'],
},
})
.addVersion(
{
Expand All @@ -325,6 +383,11 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
fleetAuthz: {
fleet: { readAgents: true },
},
summary: `Get an uploaded file`,
description: `Get a file uploaded by an agent.`,
options: {
tags: ['oas-tag:Elastic Agents'],
},
})
.addVersion(
{
Expand All @@ -340,6 +403,11 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
fleetAuthz: {
fleet: { allAgents: true },
},
summary: `Delete an uploaded file`,
description: `Delete a file uploaded by an agent.`,
options: {
tags: ['oas-tag:Elastic Agents'],
},
})
.addVersion(
{
Expand All @@ -358,6 +426,10 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
fleetAuthz,
getRouteRequiredAuthz('get', AGENT_API_ROUTES.STATUS_PATTERN)
).granted,
summary: `Get an agent status summary`,
options: {
tags: ['oas-tag:Elastic Agent status'],
},
})
.addVersion(
{
Expand Down Expand Up @@ -387,6 +459,10 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
fleetAuthz: {
fleet: { readAgents: true },
},
summary: `Get incoming agent data`,
options: {
tags: ['oas-tag:Elastic Agents'],
},
})
.addVersion(
{
Expand All @@ -403,6 +479,10 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
fleetAuthz: {
fleet: { allAgents: true },
},
summary: `Upgrade an agent`,
options: {
tags: ['oas-tag:Elastic Agent actions'],
},
})
.addVersion(
{
Expand All @@ -418,6 +498,10 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
fleetAuthz: {
fleet: { allAgents: true },
},
summary: `Bulk upgrade agents`,
options: {
tags: ['oas-tag:Elastic Agent actions'],
},
})
.addVersion(
{
Expand All @@ -434,6 +518,10 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
fleetAuthz: {
fleet: { readAgents: true },
},
summary: `Get an agent action status`,
options: {
tags: ['oas-tag:Elastic Agent actions'],
},
})
.addVersion(
{
Expand All @@ -450,6 +538,10 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
fleetAuthz: {
fleet: { allAgents: true },
},
summary: `Bulk reassign agents`,
options: {
tags: ['oas-tag:Elastic Agent actions'],
},
})
.addVersion(
{
Expand All @@ -466,6 +558,10 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
fleetAuthz: {
fleet: { allAgents: true },
},
summary: `Bulk unenroll agents`,
options: {
tags: ['oas-tag:Elastic Agent actions'],
},
})
.addVersion(
{
Expand All @@ -482,6 +578,10 @@ export const registerAPIRoutes = (router: FleetAuthzRouter, config: FleetConfigT
fleetAuthz: {
fleet: { readAgents: true },
},
summary: `Get available agent versions`,
options: {
tags: ['oas-tag:Elastic Agents'],
},
})
.addVersion(
{
Expand Down
Loading

0 comments on commit d961497

Please sign in to comment.