[DOCS] Add get reporters to open API spec (#135326)

This commit is contained in:
Lisa Cawley 2022-06-30 11:04:48 -07:00 committed by GitHub
parent 7f776252d9
commit 40359a6e2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 325 additions and 15 deletions

View file

@ -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": "ahunley@imf.usa.gov",
"username": "ahunley"
},
{
"full_name": "Rat Hustler",
"email": "jrhustler@aol.com",
"username": "rhustler"
}
{"username":"elastic","full_name":null,"email":null},
{"username":"user1","full_name":"User 1","email":"user1@elastic.co"},
{"username":"user2","full_name":"User 2","email":"user2@elastic.co"}
]
--------------------------------------------------

View file

@ -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": "user1@elastic.co"
},
{
"username": "user2",
"full_name": "User 2",
"email": "user2@elastic.co"
}
]
},
"add_comment_request": {
"summary": "Adds a comment to a case.",
"value": {

View file

@ -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: user1@elastic.co
- username: user2
full_name: User 2
email: user2@elastic.co
add_comment_request:
summary: Adds a comment to a case.
value:

View file

@ -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":"user1@elastic.co"},
{"username":"user2","full_name":"User 2","email":"user2@elastic.co"}
]

View file

@ -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@cases@reporters.yaml'
'/api/cases/reporters':
$ref: 'paths/api@cases@reporters.yaml'
# '/api/cases/status':
# $ref: 'paths/api@cases@status.yaml'
# '/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@cases@reporters.yaml'
'/s/{spaceId}/api/cases/reporters':
$ref: 'paths/s@{spaceid}@api@cases@reporters.yaml'
# '/s/{spaceId}/api/cases/status':
# $ref: 'paths/s@{spaceid}@api@cases@status.yaml'
# '/s/{spaceId}/api/cases/tags':

View file

@ -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

View file

@ -0,0 +1,39 @@
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.yaml'
- $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