Skip to content

Commit

Permalink
[8.16] Improves Entity Analytics API content (elastic#193404) (elasti…
Browse files Browse the repository at this point in the history
…c#204919)

# Backport

This will backport the following commits from `main` to `8.16`:
- [Improves Entity Analytics API content
(elastic#193404)](elastic#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":"137783811+natasha-moore-elastic@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-09-20T10:26:54Z","message":"Improves
Entity Analytics API content (elastic#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
<42973632+kibanamachine@users.noreply.github.com>","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 (elastic#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
<42973632+kibanamachine@users.noreply.github.com>","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 (elastic#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
<42973632+kibanamachine@users.noreply.github.com>","sha":"d49f7e4a6bdcd133c0dc05170eae9592bfc59c63"}}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
natasha-moore-elastic and kibanamachine authored Dec 19, 2024
1 parent 62cb929 commit 360e200
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 @@ -6114,7 +6114,7 @@ paths:
- APM annotations
/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 @@ -6156,11 +6156,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 @@ -6187,11 +6187,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 @@ -6216,12 +6219,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 @@ -6272,7 +6278,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 @@ -6348,7 +6354,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 @@ -17596,6 +17602,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 @@ -17619,7 +17626,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 @@ -521,8 +521,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 @@ -618,8 +621,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 @@ -694,7 +700,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 @@ -1199,7 +1205,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 @@ -1821,6 +1827,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/engines:
Expand Down Expand Up @@ -598,6 +609,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 @@ -621,7 +636,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 360e200

Please sign in to comment.