/** * This file was auto-generated by openapi-typescript. * Do not make direct changes to the file. */ export interface paths { "/controlplane/agent": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List agents * @description Lists agents within an organization. */ get: operations["agent:list"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/controlplane/agent/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Read an agent * @description Retrieve a specific agent by its ID. */ get: operations["agent:read"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/controlplane/agent_command": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Execute command * @description Executes a command on a specific agent. */ post: operations["agent_command:execute"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/controlplane/log/config": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List log configurations * @description List log configurations for a specific organization and account. */ get: operations["log_config:list"]; put?: never; /** * Create a log configuration * @description Creates a new log configuration or overwrites an existing one, replacing any previous values. */ post: operations["log_config:create"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/controlplane/log/config/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Read a log configuration * @description Read a specific log configuration. */ get: operations["log_config:read"]; put?: never; post?: never; /** * Delete a log configuration * @description Delete a specific log configuration by its ID. */ delete: operations["log_config:delete"]; options?: never; head?: never; patch?: never; trace?: never; }; "/controlplane/log/spec": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List log specifications * @description List of all log specifications. */ get: operations["log_specification:list"]; put?: never; /** * Create log specification * @description Create a new log specification. */ post: operations["log_specification:create"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/controlplane/log/spec/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Read log specification * @description Retrieve a specific log specification by its ID. */ get: operations["log_specification:read"]; put?: never; post?: never; /** * Delete log specification * @description Delete a specific log specification by its ID. */ delete: operations["log_specification:delete"]; options?: never; head?: never; /** * Update log specification * @description Updates an existing log specification by its ID. */ patch: operations["log_specification:update"]; trace?: never; }; "/controlplane/template": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List templates * @description List log templates without their content. A log template configures how a telemetry provider collects logs for a capability; use 'np log template read' to get one template's content. */ get: operations["log_template:list"]; put?: never; /** * Create template * @description Create a new template. */ post: operations["log_template:create"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/controlplane/template/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Read a template * @description Retrieve a specific template by its ID. */ get: operations["log_template:read"]; put?: never; post?: never; /** * Delete template * @description Delete a specific template by its ID. */ delete: operations["log_template:delete"]; options?: never; head?: never; patch?: never; trace?: never; }; } export type webhooks = Record; export interface components { schemas: { logConfigListResponse: { paging: { /** * @description The starting point for pagination. Defaults to 0 if not provided. * @example 0 */ offset: number; /** * @description The maximum number of results to return per page. The maximum allowed value is 200. * @example 200 */ limit: number; }; results: components["schemas"]["logConfig"][]; }; logSpecListResponse: { paging: { /** * @description The starting point for pagination. Defaults to 0 if not provided. * @example 0 */ offset: number; /** * @description The maximum number of results to return per page. The maximum allowed value is 200. * @example 200 */ limit: number; }; results: components["schemas"]["logSpecResponse"][]; }; logConfigCreate: { /** * @description Defines whether this log configuration is the default. * > * > **Note**: If true, it requires the `agent:log_config:create-default` permission; otherwise, it requires `agent:log_config:create`. * > * @enum {boolean} */ is_default: true | false; /** * @description If the log configuration is not default, an expiration date must be specified. * @example 2024-07-12T15:00:00Z */ expires_at?: string; /** * @description Applicable if the log specification is at the account level. * @example 2345 */ account_id?: number; /** * @description The tags to be matched to apply the log configuration * @example { * "environment": "production" * } */ selector: Record; /** * @description The log configuration as defined in the log specification. * @example { * "log_level": "debug", * "no_error_sampling": 50 * } */ configuration: Record; }; logConfig: { /** * @description Defines whether this log configuration is the default. * > * > **Note**: If true, it requires the `agent:log_config:create-default` permission; otherwise, it requires `agent:log_config:create`. * > * @enum {boolean} */ is_default?: true | false; /** * @description If the log configuration is not default, an expiration date must be specified. * @example 2024-07-12T15:00:00Z */ expires_at?: string; /** * @description Applicable if the log specification is at the account level. * @example 2345 */ account_id?: number; /** * @description The tags to be matched to apply the log configuration. * @example { * "environment": "production" * } */ selector?: Record; /** * @description The log configuration as defined in the log specification. * @example { * "log_level": "debug", * "no_error_sampling": 50 * } */ configuration?: Record; created_configuration_defaults?: components["schemas"]["configurationDefault"][]; }; configurationDefault: { template_id?: string; template_name?: string; capability_category?: string; capability_provider?: string; default_configuration_id?: string; }; logSpecRequest: { /** * @description The ID of the organization. * @example 1234 */ organization_id?: number; /** * @description The ID of the account. * @example 2345 */ account_id?: number; templates?: components["schemas"]["templateSpec"][]; template_vars?: { [key: string]: components["schemas"]["templateVar"]; }; selector_definition?: { [key: string]: { input_type?: string; allow_wildcard?: boolean; }; }; selector?: { [key: string]: string; }; }; templateSpec: { capability_category?: string; capability_provider?: string; template_name?: string; add_tags?: { [key: string]: string; }; }; templateVar: { input_type?: string; required?: boolean; default?: number; }; logSpecResponse: { /** * @description The ID of the log specification. * @example 3456 */ id?: string; /** * @description The ID of the organization. * @example 1234 */ organization_id?: number; /** * @description The ID of the account. * @example 2345 */ account_id?: number; templates?: { add_tags?: { [key: string]: string; }; template_id?: string; template_name?: string; capability_category?: string; capability_provider?: string; }[]; template_vars?: { [key: string]: { type?: string; required?: boolean; input_type?: string; default?: number; }; }; selector_definition?: { [key: string]: { input_type?: string; allow_wildcard?: boolean; }; }; selector?: { [key: string]: string; }; /** @description The name of the log. */ name?: string; /** * Format: date-time * @description The ISO-8601 UTC timestamp of when the log was created. * @example 2021-01-02T00:00:00Z */ created_at?: string; /** * Format: date-time * @description The ISO-8601 UTC timestamp of when the log was last updated. * @example 2021-01-02T00:00:00Z */ updated_at?: string | null; }; logSpecUpdateRequest: { templates?: components["schemas"]["templateSpec"][]; template_vars?: { [key: string]: components["schemas"]["templateVar"]; }; selector_definition?: { [key: string]: { input_type?: string; allow_wildcard?: boolean; }; }; selector?: { [key: string]: string; }; }; templateCreationRequest: { /** * @description The ID of the organization. * @example 1234 */ organization_id?: number; /** * @description The ID of the account. * @example 2345 */ account_id?: number; /** @description The name of the template. */ name?: string; capability_category?: string; capability_provider?: string; content?: string; content_encoding?: string; template_vars?: { [key: string]: components["schemas"]["templateVarTemplate"]; }; }; templateVarTemplate: { type?: string; default?: string | number; description?: string; }; templateResponse: { /** * @description The ID of the organization. * @example 1234 */ organization_id?: number; /** * @description The ID of the account. * @example 2345 */ account_id?: number; /** @description The name of the template. */ name?: string; capability_category?: string; capability_provider?: string; content?: string; content_encoding?: string; template_vars?: { [key: string]: components["schemas"]["templateVarTemplate"]; }; }; templateListResponse: { paging: { /** * @description The starting point for pagination. Defaults to 0 if not provided. * @example 0 */ offset: number; /** * @description The maximum number of results to return per page. The maximum allowed value is 200. * @example 200 */ limit: number; }; results: components["schemas"]["templateResponse"][]; }; agentListResponse: { paging: { /** * @description The starting point for pagination. Defaults to 0 if not provided. * @example 0 */ offset: number; /** * @description The maximum number of results to return per page. The maximum allowed value is 200. * @example 200 */ limit: number; }; results: components["schemas"]["agent"][]; }; agent: { /** * @description A system-wide unique ID for the agent. * @example f47ac10b-58cc-4372-a567-0e02b2c3d479 */ id: string; /** * @description The name of the agent. * @example my-agent-name */ name: string | null; /** * Format: date-time * @description The ISO-8601 UTC timestamp of the last heartbeat from the agent. * @example 2021-01-02T00:00:00Z */ last_heartbeat: string; /** * @description The runtime of the agent. * @example k8s */ runtime: string; /** * @description The version of the agent. * @example 1.0.0 */ version: string; /** * @description Object containing key-value pairs representing tags to be matched for applying the configuration. * @example environment:production,node_name:node-1 */ tags: Record; /** * @description The status of the agent. * @example active * @enum {string} */ status: "active"; /** * Format: date-time * @description The ISO-8601 UTC timestamp of when the agent was created. * @example 2021-01-02T00:00:00Z */ created_at: string; /** * Format: date-time * @description The ISO-8601 UTC timestamp of when the agent was last updated. * @example 2021-01-02T00:00:00Z */ updated_at?: string | null; capabilities?: components["schemas"]["capability"][]; }; capability: { /** * @description A system-wide unique ID for the capability. * @example commandexecutor1 */ id?: string; /** * @description Object containing key-value pairs representing tags to be matched for applying the capability. * @example environment:production,node_name:node-1 */ tags?: Record; /** * @description The status of the capability. * @example active * @enum {string} */ status?: "active"; /** * @description The version of the capability. * @example 1.0.0 */ version?: string; /** * @description The ID of the configuration. * @example config1 */ configuration_id?: string; /** * @description The ID of the desired configuration. * @example desired_config1 */ desired_configuration_id?: string; /** * @description Defines whether this capability is the default configuration. * @example true * @enum {boolean} */ is_default_configuration?: true | false; /** * Format: date-time * @description The expiration date of the current configuration. * @example 2024-07-12T15:00:00Z */ current_configuration_expires_at?: string | null; /** * @description The provider of the capability. * @example commandexecutor1 */ provider?: string; /** * @description The category of the capability. * @example executor1 */ category?: string; /** * Format: date-time * @description The ISO-8601 UTC timestamp of when the capability was created. * @example 2021-01-02T00:00:00Z */ created_at?: string; /** * Format: date-time * @description The ISO-8601 UTC timestamp of when the capability was last updated. * @example 2021-01-02T00:00:00Z */ updated_at?: string | null; }; agentCommandRequest: { /** @description Describes the command the agent will execute. */ command?: { /** * @description The command type of the agent. * * > . `exec`: Executes a command line with optional environment variables and arguments. * > * > . `refresh-sources`: Refreshes the agent's sources. This command does not require additional data. * @example exec * @enum {string} */ type?: "exec" | "refresh-sources"; /** @description The command line and environment variables. */ data?: { /** * @description The command line to be executed. * > **Note**: The path to the command line should point to the folder where the agent is installed. * @example path-to-cmd-file/cmd */ cmdline?: string; /** * @description The environment variables for the command. * > **Note**: The environment variables should be in the format `KEY: VALUE`. * @example { * "NP_ACTION_CONTEXT": "'${NOTIFICATION_CONTEXT}" * } */ environment?: Record; /** * @description The arguments to be passed to the command line. * @example [ * "arg1", * "arg2" * ] */ arguments?: string[]; }; }; /** * @description The selector for the agent. * @example { * "environment": "local" * } */ selector?: Record; }; agentCommandResponse: { /** * @description The selector for the agent. * @example { * "environment": "local" * } */ selector?: Record; /** @description Describes the command the agent will execute. */ command?: { /** * @description The command type of the agent. * @example exec * @enum {string} */ type?: "exec"; /** @description The command line and environment variables. */ data?: { /** * @description The command line to be executed. * > **Note**: The path to the command line should point to the folder where the agent is installed. * @example path-to-cmd-file/cmd */ cmdline?: string; /** * @description The environment variables for the command. * > **Note**: The environment variables should be in the format `key: value`. * @example { * "NP_ACTION_CONTEXT": "'${NOTIFICATION_CONTEXT}'" * } */ environment?: Record; /** * @description The arguments to be passed to the command line. * @example [ * "arg1", * "arg2" * ] */ arguments?: string[]; }; }; }; }; responses: { /** @description Client error responses due to invalid input or missing parameters. */ "4XX": { headers: { [name: string]: unknown; }; content: { "application/json": { /** * @description HTTP status code representing the specific client error (e.g., 400, 401, 403, 404). * @example 400 */ statusCode: number; /** * @description A machine-readable error code that categorizes the server failure. * @example bad_request */ code?: string; /** * @description A brief, human-readable description of the error type (e.g., "Bad Request", "Unauthorized"). * @example Bad Request */ error: string; /** * @description Additional details about the error. * @example The request was malformed or contained invalid parameters. */ message: string; }; }; }; /** @description Server error responses indicating an issue on the API side. */ "5XX": { headers: { [name: string]: unknown; }; content: { "application/json": { /** * @description HTTP status code representing the specific server error (e.g., 500, 502, 503). * @example 500 */ statusCode: number; /** * @description A machine-readable error code that categorizes the server failure. * @example internal_server_error */ code?: string; /** * @description A brief, human-readable description of the error type (e.g., "Internal Server Error", "Service Unavailable"). * @example Internal Server Error */ error: string; /** * @description Additional details about the error. * @example An unexpected error occurred. Please try again later. */ message: string; }; }; }; }; parameters: never; requestBodies: never; headers: never; pathItems: never; } export type $defs = Record; export interface operations { "agent:list": { parameters: { query: { /** * @description The ID of the organization. * @example 1234 */ organization_id: number; /** * @description The ID of the account. * @example 2345 */ account_id?: number; /** @description Status of the scope. */ status?: "active" | "inactive"; /** * @description Object containing key-value pairs representing tags to be matched for applying the configuration. * @example environment:production,service:api */ tags?: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description The list of agents matching the query. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["agentListResponse"]; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "agent:read": { parameters: { query?: never; header?: never; path: { /** * @description The unique ID of the agent. * @example f47ac10b-58cc-4372-a567-0e02b2c3d479 */ id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The operation was successful. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["agent"]; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "agent_command:execute": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["agentCommandRequest"]; }; }; responses: { /** @description Command executed successfully. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["agentCommandResponse"]; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "log_config:list": { parameters: { query: { /** * @description The ID of the organization. * @example 1234 */ organization_id: number; /** * @description The ID of the account. * @example 2345 */ account_id: number; /** * @description An object containing key-value pairs representing tags to be matched for applying the log configuration. For example: `{ "environment": "production", "service": "api" }`. * @example { * "environment": "production", * "service": "api" * } */ selector?: Record; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description A list of log configurations. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["logConfigListResponse"]; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "log_config:create": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["logConfigCreate"]; }; }; responses: { /** @description The operation was successful. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["logConfig"]; }; }; }; }; "log_config:read": { parameters: { query?: never; header?: never; path: { /** @description The unique ID of the log configuration. */ id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The operation was successful. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["logConfig"]; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "log_config:delete": { parameters: { query?: never; header?: never; path: { /** @description The unique ID of the log configuration to delete. */ id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Log configuration successfully deleted. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "log_specification:list": { parameters: { query: { /** @description Limit for the number of items to be returned. */ limit?: number; /** @description Offset from the start of the collection. */ offset?: number; /** * @description The ID of the organization. * @example 1234 */ organization_id: number; /** * @description The ID of the account. * @example 2345 */ account_id?: number; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description A paged list of log specifications */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["logSpecListResponse"]; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "log_specification:create": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["logSpecRequest"]; }; }; responses: { /** @description Log specification created successfully. */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["logSpecResponse"]; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "log_specification:read": { parameters: { query?: never; header?: never; path: { /** * @description The unique ID of the log specification to update. * @example f47ac10b-58cc-4372-a567-0e02b2c3d479 */ id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The operation was successful. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "log_specification:delete": { parameters: { query?: never; header?: never; path: { /** * @description The unique ID of the log specification to delete. * @example 3456 */ id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Log specification successfully deleted. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "log_specification:update": { parameters: { query?: never; header?: never; path: { /** * @description The unique ID of the log specification to update. * @example 3456 */ id: string; }; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["logSpecUpdateRequest"]; }; }; responses: { /** @description Log specification updated successfully. */ 204: { headers: { [name: string]: unknown; }; content?: never; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "log_template:list": { parameters: { query: { /** * @description The ID of the organization. * @example 1234 */ organization_id: number; /** * @description The ID of the account. * @example 2345 */ account_id?: number; /** @description The name of the template. */ name?: string; /** @description Narrow the result to templates for this capability category, e.g. logs or metrics. */ capability_category?: string; /** @description Narrow the result to templates for this telemetry provider, e.g. datadog or loki. */ capability_provider?: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description The operation was successful. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["templateListResponse"][]; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "log_template:create": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { "application/json": components["schemas"]["templateCreationRequest"]; }; }; responses: { /** @description Template created successfully. */ 201: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["templateResponse"]; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "log_template:read": { parameters: { query?: never; header?: never; path: { /** * @description The unique ID of the template. * @example 4567 */ id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description The operation was successful. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["templateResponse"]; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "log_template:delete": { parameters: { query?: never; header?: never; path: { /** * @description The unique ID of the template. * @example 4567 */ id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Template successfully deleted. */ 200: { headers: { [name: string]: unknown; }; content?: never; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; }