Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 157 additions & 0 deletions oas_docs/bundle.json
Original file line number Diff line number Diff line change
Expand Up @@ -25832,6 +25832,163 @@
"x-state": "Technical Preview; added in 9.2.0"
}
},
"/api/fleet/cloud_connectors/{cloudConnectorId}/usage": {
"get": {
"description": "[Required authorization] Route required privileges: fleet-agent-policies-read OR integrations-read.",
"operationId": "get-fleet-cloud-connectors-cloudconnectorid-usage",
"parameters": [
{
"description": "The unique identifier of the cloud connector.",
"in": "path",
"name": "cloudConnectorId",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "The page number for pagination.",
"in": "query",
"name": "page",
"required": false,
"schema": {
"minimum": 1,
"type": "number"
}
},
{
"description": "The number of items per page.",
"in": "query",
"name": "perPage",
"required": false,
"schema": {
"minimum": 1,
"type": "number"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"items": {
"items": {
"additionalProperties": false,
"properties": {
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"package": {
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"title": {
"type": "string"
},
"version": {
"type": "string"
}
},
"required": [
"name",
"title",
"version"
],
"type": "object"
},
"policy_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"updated_at": {
"type": "string"
}
},
"required": [
"id",
"name",
"policy_ids",
"created_at",
"updated_at"
],
"type": "object"
},
"type": "array"
},
"page": {
"type": "number"
},
"perPage": {
"type": "number"
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total",
"page",
"perPage"
],
"type": "object"
}
}
},
"description": "OK: A successful request."
},
"400": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"description": "Generic Error",
"properties": {
"attributes": {},
"error": {
"type": "string"
},
"errorType": {
"type": "string"
},
"message": {
"type": "string"
},
"statusCode": {
"type": "number"
}
},
"required": [
"message",
"attributes"
],
"type": "object"
}
}
},
"description": "A bad request."
}
},
"summary": "Get cloud connector usage (package policies using the connector)",
"tags": [
"Fleet cloud connectors"
],
"x-state": "Technical Preview; added in 9.2.0"
}
},
"/api/fleet/data_streams": {
"get": {
"description": "[Required authorization] Route required privileges: fleet-agents-all AND fleet-agent-policies-all AND fleet-settings-all.",
Expand Down
157 changes: 157 additions & 0 deletions oas_docs/bundle.serverless.json
Original file line number Diff line number Diff line change
Expand Up @@ -25832,6 +25832,163 @@
"x-state": "Technical Preview"
}
},
"/api/fleet/cloud_connectors/{cloudConnectorId}/usage": {
"get": {
"description": "[Required authorization] Route required privileges: fleet-agent-policies-read OR integrations-read.",
"operationId": "get-fleet-cloud-connectors-cloudconnectorid-usage",
"parameters": [
{
"description": "The unique identifier of the cloud connector.",
"in": "path",
"name": "cloudConnectorId",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "The page number for pagination.",
"in": "query",
"name": "page",
"required": false,
"schema": {
"minimum": 1,
"type": "number"
}
},
{
"description": "The number of items per page.",
"in": "query",
"name": "perPage",
"required": false,
"schema": {
"minimum": 1,
"type": "number"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"items": {
"items": {
"additionalProperties": false,
"properties": {
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"package": {
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"title": {
"type": "string"
},
"version": {
"type": "string"
}
},
"required": [
"name",
"title",
"version"
],
"type": "object"
},
"policy_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"updated_at": {
"type": "string"
}
},
"required": [
"id",
"name",
"policy_ids",
"created_at",
"updated_at"
],
"type": "object"
},
"type": "array"
},
"page": {
"type": "number"
},
"perPage": {
"type": "number"
},
"total": {
"type": "number"
}
},
"required": [
"items",
"total",
"page",
"perPage"
],
"type": "object"
}
}
},
"description": "OK: A successful request."
},
"400": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"description": "Generic Error",
"properties": {
"attributes": {},
"error": {
"type": "string"
},
"errorType": {
"type": "string"
},
"message": {
"type": "string"
},
"statusCode": {
"type": "number"
}
},
"required": [
"message",
"attributes"
],
"type": "object"
}
}
},
"description": "A bad request."
}
},
"summary": "Get cloud connector usage (package policies using the connector)",
"tags": [
"Fleet cloud connectors"
],
"x-state": "Technical Preview"
}
},
"/api/fleet/data_streams": {
"get": {
"description": "[Required authorization] Route required privileges: fleet-agents-all AND fleet-agent-policies-all AND fleet-settings-all.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export const CLOUD_CONNECTOR_API_ROUTES = {
CREATE_PATTERN: `${CLOUD_CONNECTOR_API_ROOT}`,
UPDATE_PATTERN: `${CLOUD_CONNECTOR_API_ROOT}/{cloudConnectorId}`,
DELETE_PATTERN: `${CLOUD_CONNECTOR_API_ROOT}/{cloudConnectorId}`,
USAGE_PATTERN: `${CLOUD_CONNECTOR_API_ROOT}/{cloudConnectorId}/usage`,
};

// Kubernetes Manifest API routes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,23 @@ export interface UpdateCloudConnectorResponse {
export interface DeleteCloudConnectorResponse {
id: string;
}

export interface CloudConnectorUsageItem {
id: string;
name: string;
package?: {
name: string;
title: string;
version: string;
};
policy_ids: string[];
created_at: string;
updated_at: string;
}

export interface GetCloudConnectorUsageResponse {
items: CloudConnectorUsageItem[];
total: number;
page: number;
perPage: number;
}
Loading