-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DOCS] Add get reporters to open API spec (#135326)
- Loading branch information
Showing
7 changed files
with
325 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,14 @@ Returns information about the users who opened cases. | |
You must have `read` privileges for the *Cases* feature in the *Management*, | ||
*{observability}*, or *Security* section of the | ||
<<kibana-feature-privileges,{kib} feature privileges>>, depending on the | ||
`owner` of the cases you're seeking. | ||
`owner` of the cases. | ||
|
||
=== {api-description-title} | ||
|
||
The API returns information about the users as they existed at the time of the | ||
case creation, including their name, full name, and email address. If any of | ||
those details change thereafter or if a user is deleted, the information | ||
returned by this API is unchanged. | ||
|
||
=== {api-query-parms-title} | ||
|
||
|
@@ -46,15 +53,8 @@ The API returns a JSON object with the retrieved reporters. For example: | |
[source,json] | ||
-------------------------------------------------- | ||
[ | ||
{ | ||
"full_name": "Alan Hunley", | ||
"email": "[email protected]", | ||
"username": "ahunley" | ||
}, | ||
{ | ||
"full_name": "Rat Hustler", | ||
"email": "[email protected]", | ||
"username": "rhustler" | ||
} | ||
{"username":"elastic","full_name":null,"email":null}, | ||
{"username":"user1","full_name":"User 1","email":"[email protected]"}, | ||
{"username":"user2","full_name":"User 2","email":"[email protected]"} | ||
] | ||
-------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2518,6 +2518,62 @@ | |
} | ||
] | ||
}, | ||
"/api/cases/reporters": { | ||
"get": { | ||
"summary": "Returns information about the users who opened cases.", | ||
"description": "You must have read privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases. The API returns information about the users as they existed at the time of the case creation, including their name, full name, and email address. If any of those details change thereafter or if a user is deleted, the information returned by this API is unchanged.\n", | ||
"tags": [ | ||
"cases", | ||
"kibana" | ||
], | ||
"parameters": [ | ||
{ | ||
"$ref": "#/components/parameters/owner" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Indicates a successful call.", | ||
"content": { | ||
"application/json; charset=utf-8": { | ||
"schema": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"email": { | ||
"type": "string" | ||
}, | ||
"full_name": { | ||
"type": "string" | ||
}, | ||
"username": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"examples": { | ||
"getReportersResponse": { | ||
"$ref": "#/components/examples/get_reporters_response" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "https://localhost:5601" | ||
} | ||
] | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "https://localhost:5601" | ||
} | ||
] | ||
}, | ||
"/api/cases/{caseId}/comments": { | ||
"post": { | ||
"summary": "Adds a comment or alert to a case.", | ||
|
@@ -5719,6 +5775,65 @@ | |
} | ||
] | ||
}, | ||
"/s/{spaceId}/api/cases/reporters": { | ||
"get": { | ||
"summary": "Returns information about the users who opened cases.", | ||
"description": "You must have read privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases. The API returns information about the users as they existed at the time of the case creation, including their name, full name, and email address. If any of those details change thereafter or if a user is deleted, the information returned by this API is unchanged.\n", | ||
"tags": [ | ||
"cases", | ||
"kibana" | ||
], | ||
"parameters": [ | ||
{ | ||
"$ref": "#/components/parameters/space_id" | ||
}, | ||
{ | ||
"$ref": "#/components/parameters/owner" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Indicates a successful call.", | ||
"content": { | ||
"application/json; charset=utf-8": { | ||
"schema": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"email": { | ||
"type": "string" | ||
}, | ||
"full_name": { | ||
"type": "string" | ||
}, | ||
"username": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"examples": { | ||
"getReportersResponse": { | ||
"$ref": "#/components/examples/get_reporters_response" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "https://localhost:5601" | ||
} | ||
] | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "https://localhost:5601" | ||
} | ||
] | ||
}, | ||
"/s/{spaceId}/api/cases/{caseId}/comments": { | ||
"post": { | ||
"summary": "Adds a comment or alert to a case.", | ||
|
@@ -7172,6 +7287,26 @@ | |
} | ||
] | ||
}, | ||
"get_reporters_response": { | ||
"summary": "A list of three users that opened cases", | ||
"value": [ | ||
{ | ||
"username": "elastic", | ||
"full_name": null, | ||
"email": null | ||
}, | ||
{ | ||
"username": "user1", | ||
"full_name": "User 1", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"username": "user2", | ||
"full_name": "User 2", | ||
"email": "[email protected]" | ||
} | ||
] | ||
}, | ||
"add_comment_request": { | ||
"summary": "Adds a comment to a case.", | ||
"value": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2134,6 +2134,45 @@ paths: | |
- url: https://localhost:5601 | ||
servers: | ||
- url: https://localhost:5601 | ||
/api/cases/reporters: | ||
get: | ||
summary: Returns information about the users who opened cases. | ||
description: > | ||
You must have read privileges for the **Cases** feature in the | ||
**Management**, **Observability**, or **Security** section of the Kibana | ||
feature privileges, depending on the owner of the cases. The API returns | ||
information about the users as they existed at the time of the case | ||
creation, including their name, full name, and email address. If any of | ||
those details change thereafter or if a user is deleted, the information | ||
returned by this API is unchanged. | ||
tags: | ||
- cases | ||
- kibana | ||
parameters: | ||
- $ref: '#/components/parameters/owner' | ||
responses: | ||
'200': | ||
description: Indicates a successful call. | ||
content: | ||
application/json; charset=utf-8: | ||
schema: | ||
type: array | ||
items: | ||
type: object | ||
properties: | ||
email: | ||
type: string | ||
full_name: | ||
type: string | ||
username: | ||
type: string | ||
examples: | ||
getReportersResponse: | ||
$ref: '#/components/examples/get_reporters_response' | ||
servers: | ||
- url: https://localhost:5601 | ||
servers: | ||
- url: https://localhost:5601 | ||
/api/cases/{caseId}/comments: | ||
post: | ||
summary: Adds a comment or alert to a case. | ||
|
@@ -4807,6 +4846,46 @@ paths: | |
- url: https://localhost:5601 | ||
servers: | ||
- url: https://localhost:5601 | ||
/s/{spaceId}/api/cases/reporters: | ||
get: | ||
summary: Returns information about the users who opened cases. | ||
description: > | ||
You must have read privileges for the **Cases** feature in the | ||
**Management**, **Observability**, or **Security** section of the Kibana | ||
feature privileges, depending on the owner of the cases. The API returns | ||
information about the users as they existed at the time of the case | ||
creation, including their name, full name, and email address. If any of | ||
those details change thereafter or if a user is deleted, the information | ||
returned by this API is unchanged. | ||
tags: | ||
- cases | ||
- kibana | ||
parameters: | ||
- $ref: '#/components/parameters/space_id' | ||
- $ref: '#/components/parameters/owner' | ||
responses: | ||
'200': | ||
description: Indicates a successful call. | ||
content: | ||
application/json; charset=utf-8: | ||
schema: | ||
type: array | ||
items: | ||
type: object | ||
properties: | ||
email: | ||
type: string | ||
full_name: | ||
type: string | ||
username: | ||
type: string | ||
examples: | ||
getReportersResponse: | ||
$ref: '#/components/examples/get_reporters_response' | ||
servers: | ||
- url: https://localhost:5601 | ||
servers: | ||
- url: https://localhost:5601 | ||
/s/{spaceId}/api/cases/{caseId}/comments: | ||
post: | ||
summary: Adds a comment or alert to a case. | ||
|
@@ -5981,6 +6060,18 @@ components: | |
isPreconfigured: false | ||
isDeprecated: false | ||
referencedByCount: 0 | ||
get_reporters_response: | ||
summary: A list of three users that opened cases | ||
value: | ||
- username: elastic | ||
full_name: null | ||
email: null | ||
- username: user1 | ||
full_name: User 1 | ||
email: [email protected] | ||
- username: user2 | ||
full_name: User 2 | ||
email: [email protected] | ||
add_comment_request: | ||
summary: Adds a comment to a case. | ||
value: | ||
|
7 changes: 7 additions & 0 deletions
7
x-pack/plugins/cases/docs/openapi/components/examples/get_reporters_response.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
summary: A list of three users that opened cases | ||
value: | ||
[ | ||
{"username":"elastic","full_name":null,"email":null}, | ||
{"username":"user1","full_name":"User 1","email":"[email protected]"}, | ||
{"username":"user2","full_name":"User 2","email":"[email protected]"} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,8 +29,8 @@ paths: | |
$ref: paths/api@cases@configure@{configurationid}.yaml | ||
'/api/cases/configure/connectors/_find': | ||
$ref: paths/api@cases@configure@connectors@_find.yaml | ||
# '/api/cases/reporters': | ||
# $ref: 'paths/api@[email protected]' | ||
'/api/cases/reporters': | ||
$ref: 'paths/api@[email protected]' | ||
# '/api/cases/status': | ||
# $ref: 'paths/api@[email protected]' | ||
# '/api/cases/tags': | ||
|
@@ -60,8 +60,8 @@ paths: | |
$ref: paths/s@{spaceid}@api@cases@configure@{configurationid}.yaml | ||
'/s/{spaceId}/api/cases/configure/connectors/_find': | ||
$ref: paths/s@{spaceid}@api@cases@configure@connectors@_find.yaml | ||
# '/s/{spaceId}/api/cases/reporters': | ||
# $ref: 'paths/s@{spaceid}@api@[email protected]' | ||
'/s/{spaceId}/api/cases/reporters': | ||
$ref: 'paths/s@{spaceid}@api@[email protected]' | ||
# '/s/{spaceId}/api/cases/status': | ||
# $ref: 'paths/s@{spaceid}@api@[email protected]' | ||
# '/s/{spaceId}/api/cases/tags': | ||
|
38 changes: 38 additions & 0 deletions
38
x-pack/plugins/cases/docs/openapi/paths/api@[email protected]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
get: | ||
summary: Returns information about the users who opened cases. | ||
description: > | ||
You must have read privileges for the **Cases** feature in the **Management**, | ||
**Observability**, or **Security** section of the Kibana feature privileges, | ||
depending on the owner of the cases. | ||
The API returns information about the users as they existed at the time of | ||
the case creation, including their name, full name, and email address. If | ||
any of those details change thereafter or if a user is deleted, the | ||
information returned by this API is unchanged. | ||
tags: | ||
- cases | ||
- kibana | ||
parameters: | ||
- $ref: '../components/parameters/owner.yaml' | ||
responses: | ||
'200': | ||
description: Indicates a successful call. | ||
content: | ||
application/json; charset=utf-8: | ||
schema: | ||
type: array | ||
items: | ||
type: object | ||
properties: | ||
email: | ||
type: string | ||
full_name: | ||
type: string | ||
username: | ||
type: string | ||
examples: | ||
getReportersResponse: | ||
$ref: '../components/examples/get_reporters_response.yaml' | ||
servers: | ||
- url: https://localhost:5601 | ||
servers: | ||
- url: https://localhost:5601 |
Oops, something went wrong.