Skip to content

Commit f1b8762

Browse files
committed
Add specification for post even to an analytics collection
1 parent 16be4de commit f1b8762

File tree

7 files changed

+276
-4
lines changed

7 files changed

+276
-4
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 57 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 123 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/validation-errors.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,8 @@
619619
},
620620
"search_application.post_behavioral_analytics_event": {
621621
"request": [
622-
"Missing request & response"
622+
"Request: missing json spec query parameter 'debug'",
623+
"Request: should have a body definition"
623624
],
624625
"response": []
625626
},

output/typescript/types.ts

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_doc_ids/table.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ autoscaling-get-autoscaling-capacity,https://www.elastic.co/guide/en/elasticsear
1818
autoscaling-get-autoscaling-policy,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/autoscaling-get-autoscaling-policy.html
1919
autoscaling-put-autoscaling-policy,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/autoscaling-put-autoscaling-policy.html
2020
avoid-index-pattern-collisions,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/index-templates.html#avoid-index-pattern-collisions
21+
behavioral-analytics-event-reference,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/behavioral-analytics-event-reference.html
2122
byte-units,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/api-conventions.html#byte-units
2223
bytes-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/bytes-processor.html
2324
calendar-and-fixed-intervals,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/search-aggregations-bucket-datehistogram-aggregation.html#calendar_and_fixed_intervals
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
import { RequestBase } from '@_types/Base'
20+
import { Name } from '@_types/common'
21+
import { EventType } from '../_types/AnalyticsEvent'
22+
23+
/**
24+
* Create a behavioral analytics collection event.
25+
* @rest_spec_name search_application.post_behavioral_analytics_event
26+
* @availability stack stability=experimental visibility=public
27+
* @doc_tag analytics
28+
* @ext_doc_id behavioral-analytics-event-reference
29+
*/
30+
export interface Request extends RequestBase {
31+
path_parts: {
32+
/**
33+
* The name of the behavioral analytics collection.
34+
*/
35+
collection_name: Name
36+
/**
37+
* The analytics event type.
38+
*/
39+
event_type: EventType
40+
}
41+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
export class Response {
21+
body: {}
22+
exceptions: [
23+
{
24+
/**
25+
* Event has been accepted and will be ingested.
26+
*/
27+
statusCodes: [202]
28+
},
29+
{
30+
/**
31+
* Either the event type is unknown or the event payload contains invalid data.
32+
*/
33+
statusCodes: [400]
34+
},
35+
{
36+
/**
37+
* Analytics collection does not exist.
38+
*/
39+
statusCodes: [404]
40+
}
41+
]
42+
}

0 commit comments

Comments
 (0)