Skip to content

Commit

Permalink
[8.x] Improves Entity Analytics API content (#193404) (#204913)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.x`:
- [Improves Entity Analytics API content
(#193404)](#193404)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"natasha-moore-elastic","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-20T10:26:54Z","message":"Improves
Entity Analytics API content (#193404)\n\n## Summary\r\n\r\nResolves
elastic/security-docs-internal#39
by\r\nimproving the Entity Analytics API docs content. Adds missing
and\r\nimproves existing operation summaries and operation descriptions
to\r\nadhere to our
[OAS\r\nstandards](https://elasticco.atlassian.net/wiki/spaces/DOC/pages/450494532/API+reference+docs).\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"d49f7e4a6bdcd133c0dc05170eae9592bfc59c63","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","v9.0.0","docs","Team:
SecuritySolution","APIDocs","Team:Entity
Analytics"],"number":193404,"url":"https://github.com/elastic/kibana/pull/193404","mergeCommit":{"message":"Improves
Entity Analytics API content (#193404)\n\n## Summary\r\n\r\nResolves
elastic/security-docs-internal#39
by\r\nimproving the Entity Analytics API docs content. Adds missing
and\r\nimproves existing operation summaries and operation descriptions
to\r\nadhere to our
[OAS\r\nstandards](https://elasticco.atlassian.net/wiki/spaces/DOC/pages/450494532/API+reference+docs).\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"d49f7e4a6bdcd133c0dc05170eae9592bfc59c63"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193404","number":193404,"mergeCommit":{"message":"Improves
Entity Analytics API content (#193404)\n\n## Summary\r\n\r\nResolves
elastic/security-docs-internal#39
by\r\nimproving the Entity Analytics API docs content. Adds missing
and\r\nimproves existing operation summaries and operation descriptions
to\r\nadhere to our
[OAS\r\nstandards](https://elasticco.atlassian.net/wiki/spaces/DOC/pages/450494532/API+reference+docs).\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"d49f7e4a6bdcd133c0dc05170eae9592bfc59c63"}}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
natasha-moore-elastic and kibanamachine authored Dec 19, 2024
1 parent e1bbd3e commit 013c054
Show file tree
Hide file tree
Showing 11 changed files with 118 additions and 56 deletions.
27 changes: 17 additions & 10 deletions oas_docs/output/kibana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6229,7 +6229,7 @@ paths:
- APM sourcemaps
/api/asset_criticality:
delete:
description: Delete the asset criticality record for a specific asset if it exists.
description: Delete the asset criticality record for a specific entity.
operationId: DeleteAssetCriticalityRecord
parameters:
- description: The ID value of the asset.
Expand Down Expand Up @@ -6271,11 +6271,11 @@ paths:
description: Successful response
'400':
description: Invalid request
summary: Delete Criticality Record
summary: Delete an asset criticality record
tags:
- Security Entity Analytics API
get:
description: Get the criticality record for a specific asset.
description: Get the asset criticality record for a specific entity.
operationId: GetAssetCriticalityRecord
parameters:
- description: The ID value of the asset.
Expand All @@ -6302,11 +6302,14 @@ paths:
description: Invalid request
'404':
description: Criticality record not found
summary: Get Criticality Record
summary: Get an asset criticality record
tags:
- Security Entity Analytics API
post:
description: Create or update a criticality record for a specific asset.
description: |
Create or update an asset criticality record for a specific entity.

If a record already exists for the specified entity, that record is overwritten with the specified value. If a record doesn't exist for the specified entity, a new record is created.
operationId: CreateAssetCriticalityRecord
requestBody:
content:
Expand All @@ -6331,12 +6334,15 @@ paths:
description: Successful response
'400':
description: Invalid request
summary: Upsert Criticality Record
summary: Upsert an asset criticality record
tags:
- Security Entity Analytics API
/api/asset_criticality/bulk:
post:
description: Bulk upsert up to 1000 asset criticality records, creating or updating them as needed.
description: |
Bulk upsert up to 1000 asset criticality records.

If asset criticality records already exist for the specified entities, those records are overwritten with the specified values. If asset criticality records don't exist for the specified entities, new records are created.
operationId: BulkUpsertAssetCriticalityRecords
requestBody:
content:
Expand Down Expand Up @@ -6387,7 +6393,7 @@ paths:
description: Bulk upload successful
'413':
description: File too large
summary: Bulk Upsert Asset Criticality Records
summary: Bulk upsert asset criticality records
tags:
- Security Entity Analytics API
/api/asset_criticality/list:
Expand Down Expand Up @@ -6463,7 +6469,7 @@ paths:
- per_page
- total
description: Bulk upload successful
summary: List Asset Criticality Records
summary: List asset criticality records
tags:
- Security Entity Analytics API
/api/cases:
Expand Down Expand Up @@ -20054,6 +20060,7 @@ paths:
- Security Entity Analytics API
/api/risk_score/engine/schedule_now:
post:
description: Schedule the risk scoring engine to run as soon as possible. You can use this to recalculate entity risk scores after updating their asset criticality.
operationId: ScheduleRiskEngineNow
requestBody:
content:
Expand All @@ -20077,7 +20084,7 @@ paths:
schema:
$ref: '#/components/schemas/Security_Entity_Analytics_API_RiskEngineScheduleNowErrorResponse'
description: Unexpected error
summary: Schedule the risk engine to run as soon as possible
summary: Run the risk scoring engine
tags:
- Security Entity Analytics API
/api/saved_objects/_bulk_create:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ paths:
x-labels: [ess, serverless]
x-codegen-enabled: true
operationId: BulkUpsertAssetCriticalityRecords
summary: Bulk Upsert Asset Criticality Records
description: Bulk upsert up to 1000 asset criticality records, creating or updating them as needed.
summary: Bulk upsert asset criticality records
description: |
Bulk upsert up to 1000 asset criticality records.
If asset criticality records already exist for the specified entities, those records are overwritten with the specified values. If asset criticality records don't exist for the specified entities, new records are created.
requestBody:
content:
application/json:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ paths:
x-labels: [ess, serverless]
x-codegen-enabled: true
operationId: CreateAssetCriticalityRecord
summary: Upsert Criticality Record
description: Create or update a criticality record for a specific asset.
summary: Upsert an asset criticality record
description: |
Create or update an asset criticality record for a specific entity.
If a record already exists for the specified entity, that record is overwritten with the specified value. If a record doesn't exist for the specified entity, a new record is created.
requestBody:
required: true
content:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ paths:
x-labels: [ess, serverless]
x-codegen-enabled: true
operationId: DeleteAssetCriticalityRecord
summary: Delete Criticality Record
description: Delete the asset criticality record for a specific asset if it exists.
summary: Delete an asset criticality record
description: Delete the asset criticality record for a specific entity.
parameters:
- name: id_value
in: query
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ paths:
x-labels: [ess, serverless]
x-codegen-enabled: true
operationId: GetAssetCriticalityRecord
summary: Get Criticality Record
description: Get the criticality record for a specific asset.
summary: Get an asset criticality record
description: Get the asset criticality record for a specific entity.
parameters:
- name: id_value
in: query
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ paths:
x-labels: [ess, serverless]
x-codegen-enabled: true
operationId: FindAssetCriticalityRecords
summary: List Asset Criticality Records
summary: List asset criticality records
description: List asset criticality records, paging, sorting and filtering as needed.
parameters:
- name: sort_field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ paths:
x-labels: [ess, serverless]
x-codegen-enabled: true
operationId: ScheduleRiskEngineNow
summary: Schedule the risk engine to run as soon as possible
summary: Run the risk scoring engine
description: Schedule the risk scoring engine to run as soon as possible. You can use this to recalculate entity risk scores after updating their asset criticality.
requestBody:
content:
application/json: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,11 @@ after 30 days. It also deletes other artifacts specific to the migration impleme
.catch(catchAxiosErrorFormatAndThrow);
}
/**
* Bulk upsert up to 1000 asset criticality records, creating or updating them as needed.
*/
* Bulk upsert up to 1000 asset criticality records.
If asset criticality records already exist for the specified entities, those records are overwritten with the specified values. If asset criticality records don't exist for the specified entities, new records are created.
*/
async bulkUpsertAssetCriticalityRecords(props: BulkUpsertAssetCriticalityRecordsProps) {
this.log.info(`${new Date().toISOString()} Calling API BulkUpsertAssetCriticalityRecords`);
return this.kbnClient
Expand Down Expand Up @@ -663,8 +666,11 @@ Migrations are initiated per index. While the process is neither destructive nor
.catch(catchAxiosErrorFormatAndThrow);
}
/**
* Create or update a criticality record for a specific asset.
*/
* Create or update an asset criticality record for a specific entity.
If a record already exists for the specified entity, that record is overwritten with the specified value. If a record doesn't exist for the specified entity, a new record is created.
*/
async createAssetCriticalityRecord(props: CreateAssetCriticalityRecordProps) {
this.log.info(`${new Date().toISOString()} Calling API CreateAssetCriticalityRecord`);
return this.kbnClient
Expand Down Expand Up @@ -752,7 +758,7 @@ Migrations are initiated per index. While the process is neither destructive nor
.catch(catchAxiosErrorFormatAndThrow);
}
/**
* Delete the asset criticality record for a specific asset if it exists.
* Delete the asset criticality record for a specific entity.
*/
async deleteAssetCriticalityRecord(props: DeleteAssetCriticalityRecordProps) {
this.log.info(`${new Date().toISOString()} Calling API DeleteAssetCriticalityRecord`);
Expand Down Expand Up @@ -1275,7 +1281,7 @@ finalize it.
.catch(catchAxiosErrorFormatAndThrow);
}
/**
* Get the criticality record for a specific asset.
* Get the asset criticality record for a specific entity.
*/
async getAssetCriticalityRecord(props: GetAssetCriticalityRecordProps) {
this.log.info(`${new Date().toISOString()} Calling API GetAssetCriticalityRecord`);
Expand Down Expand Up @@ -2042,6 +2048,9 @@ detection engine rules.
})
.catch(catchAxiosErrorFormatAndThrow);
}
/**
* Schedule the risk scoring engine to run as soon as possible. You can use this to recalculate entity risk scores after updating their asset criticality.
*/
async scheduleRiskEngineNow() {
this.log.info(`${new Date().toISOString()} Calling API ScheduleRiskEngineNow`);
return this.kbnClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ servers:
paths:
/api/asset_criticality:
delete:
description: Delete the asset criticality record for a specific asset if it exists.
description: Delete the asset criticality record for a specific entity.
operationId: DeleteAssetCriticalityRecord
parameters:
- description: The ID value of the asset.
Expand Down Expand Up @@ -57,11 +57,11 @@ paths:
description: Successful response
'400':
description: Invalid request
summary: Delete Criticality Record
summary: Delete an asset criticality record
tags:
- Security Entity Analytics API
get:
description: Get the criticality record for a specific asset.
description: Get the asset criticality record for a specific entity.
operationId: GetAssetCriticalityRecord
parameters:
- description: The ID value of the asset.
Expand All @@ -88,11 +88,17 @@ paths:
description: Invalid request
'404':
description: Criticality record not found
summary: Get Criticality Record
summary: Get an asset criticality record
tags:
- Security Entity Analytics API
post:
description: Create or update a criticality record for a specific asset.
description: >
Create or update an asset criticality record for a specific entity.
If a record already exists for the specified entity, that record is
overwritten with the specified value. If a record doesn't exist for the
specified entity, a new record is created.
operationId: CreateAssetCriticalityRecord
requestBody:
content:
Expand All @@ -119,14 +125,19 @@ paths:
description: Successful response
'400':
description: Invalid request
summary: Upsert Criticality Record
summary: Upsert an asset criticality record
tags:
- Security Entity Analytics API
/api/asset_criticality/bulk:
post:
description: >-
Bulk upsert up to 1000 asset criticality records, creating or updating
them as needed.
description: >
Bulk upsert up to 1000 asset criticality records.
If asset criticality records already exist for the specified entities,
those records are overwritten with the specified values. If asset
criticality records don't exist for the specified entities, new records
are created.
operationId: BulkUpsertAssetCriticalityRecords
requestBody:
content:
Expand Down Expand Up @@ -177,7 +188,7 @@ paths:
description: Bulk upload successful
'413':
description: File too large
summary: Bulk Upsert Asset Criticality Records
summary: Bulk upsert asset criticality records
tags:
- Security Entity Analytics API
/api/asset_criticality/list:
Expand Down Expand Up @@ -253,7 +264,7 @@ paths:
- per_page
- total
description: Bulk upload successful
summary: List Asset Criticality Records
summary: List asset criticality records
tags:
- Security Entity Analytics API
/api/entity_store/enable:
Expand Down Expand Up @@ -637,6 +648,10 @@ paths:
- Security Entity Analytics API
/api/risk_score/engine/schedule_now:
post:
description: >-
Schedule the risk scoring engine to run as soon as possible. You can use
this to recalculate entity risk scores after updating their asset
criticality.
operationId: ScheduleRiskEngineNow
requestBody:
content:
Expand All @@ -660,7 +675,7 @@ paths:
schema:
$ref: '#/components/schemas/RiskEngineScheduleNowErrorResponse'
description: Unexpected error
summary: Schedule the risk engine to run as soon as possible
summary: Run the risk scoring engine
tags:
- Security Entity Analytics API
components:
Expand Down
Loading

0 comments on commit 013c054

Please sign in to comment.