Skip to content

Commit 4fac389

Browse files
_project/tags endpoint
1 parent 09b1498 commit 4fac389

File tree

7 files changed

+147
-4
lines changed

7 files changed

+147
-4
lines changed

specification/_doc_ids/table.csv

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ ccr-put-follow,https://www.elastic.co/docs/api/doc/elasticsearch/operation/opera
8989
ccr-resume-auto-follow-pattern,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-resume-auto-follow-pattern,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-resume-auto-follow-pattern.html,
9090
ccs-network-delays,https://www.elastic.co/docs/solutions/search/cross-cluster-search#ccs-network-delays,,
9191
ccs-privileges,https://www.elastic.co/docs/deploy-manage/remote-clusters/remote-clusters-cert#remote-clusters-privileges-ccs,,
92-
chunking-strategies,https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#chunking-strategies,
92+
chunking-strategies,https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#chunking-strategies,,
9393
clean-up-snapshot-repo,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/self-managed#snapshots-repository-cleanup,,
9494
clear-repositories-metering-archive-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-clear-repositories-metering-archive,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/clear-repositories-metering-archive-api.html,
9595
clear-scroll-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-clear-scroll,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/clear-scroll-api.html,
@@ -157,10 +157,10 @@ dangling-indices-list,https://www.elastic.co/docs/api/doc/elasticsearch/operatio
157157
data-processor,https://www.elastic.co/docs/reference/enrich-processor/date-processor,,
158158
data-stream-delete,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-stream,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-delete-data-stream.html,
159159
data-stream-delete-lifecycle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/data-streams-delete-lifecycle.html,
160-
data-stream-delete-options,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-stream-options,
160+
data-stream-delete-options,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-stream-options,,
161161
data-stream-explain-lifecycle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-explain-data-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/data-streams-explain-lifecycle.html,
162162
data-stream-get,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-get-data-stream.html,
163-
data-stream-get-options,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream-options,
163+
data-stream-get-options,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream-options,,
164164
data-stream-get-lifecycle,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-lifecycle,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/data-streams-get-lifecycle.html,
165165
data-stream-lifecycle,https://www.elastic.co/docs/manage-data/lifecycle/data-stream,,
166166
data-stream-lifecycle-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-lifecycle-stats,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/data-streams-get-lifecycle-stats.html,
@@ -522,6 +522,7 @@ point-in-time-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/op
522522
prevalidate-node-removal,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cluster,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster.html,
523523
preview-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-preview-data-frame-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/preview-dfanalytics.html,
524524
preview-transform,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-preview-transform,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/preview-transform.html,
525+
project-tags,todo,,
525526
put-analytics-collection,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-put-behavioral-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-analytics-collection.html,
526527
put-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-data-frame-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-dfanalytics.html,
527528
put-enrich-policy-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-put-policy,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-enrich-policy-api.html,
@@ -634,7 +635,7 @@ reroute-processor,https://www.elastic.co/docs/reference/enrich-processor/reroute
634635
render-search-template-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-render-search-template,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/render-search-template-api.html,
635636
reset-transform,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-reset-transform,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/reset-transform.html,
636637
restore-snapshot,https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/restore-snapshot,,
637-
retrieve-stored-fields,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-stored-fields,
638+
retrieve-stored-fields,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrieve-stored-fields,,
638639
role-restriction,https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/role-restriction,,
639640
rollup-agg-limitations,https://www.elastic.co/docs/manage-data/lifecycle/rollup/rollup-aggregation-limitations,,
640641
rollup-delete-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-delete-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rollup-delete-job.html,
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"project.tags":{
3+
"documentation":{
4+
"url":"",
5+
"description":"Return tags defined for the project"
6+
},
7+
"stability":"experimental",
8+
"visibility":"public",
9+
"headers":{
10+
"accept": ["application/json"]
11+
},
12+
"url":{
13+
"paths":[
14+
{
15+
"path":"/_project/tags",
16+
"methods":[
17+
"GET"
18+
]
19+
}
20+
]
21+
}
22+
}
23+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
import { RequestBase } from '@_types/Base'
21+
22+
/**
23+
* @doc_id project-tags
24+
* @rest_spec_name project.tags
25+
* @availability serverless stability=experimental visibility=public
26+
* @cluster_privileges monitor
27+
*/
28+
export interface Request extends RequestBase {
29+
urls: [
30+
{
31+
path: '/_project/tags'
32+
methods: ['GET']
33+
}
34+
]
35+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+
import { AdditionalProperties, AdditionalProperty } from '@spec_utils/behaviors'
21+
import { Dictionary } from '@spec_utils/Dictionary'
22+
23+
24+
/**
25+
* @behavior_meta AdditionalProperties fieldname=user_defined_tags description="Additional tags defined by user."
26+
*/
27+
class Tags implements AdditionalProperties<string, string> {
28+
_id: string
29+
_alias: string
30+
_type: string
31+
_organisation: string
32+
}
33+
34+
/**
35+
* @behavior_meta AdditionalProperty key=string value=Tags
36+
*/
37+
class ProjectTags implements AdditionalProperty<string, Tags> {
38+
linked_projects?: Dictionary<string, Tags>
39+
}
40+
41+
export class Response {
42+
/**
43+
* @codegen_name project-tags
44+
*/
45+
body: ProjectTags
46+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
method_request: GET /_project/tags
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
summary: Porject tags
2+
description: A successful response from `GET /_project/tags`
3+
# type: response
4+
# response_code: 200
5+
value: |-
6+
{
7+
"c56c4f8849c64cc6ae59c261f40bd195": {
8+
"_id": "c56c4f8849c64cc6ae59c261f40bd195"
9+
"_type": "elasticsearch",
10+
"_alias": "project-1",
11+
"_csp": "aws",
12+
"_region": "us-east-1"
13+
"mytag1": "foo",
14+
"mytag2": "bar"
15+
}
16+
"linked_projects": {
17+
"a3b88ea3f195a336ae59c261f40bd195": {
18+
"_id": "a3b88ea3f195a336ae59c261f40bd195"
19+
"_type": "security",
20+
"_alias": "project-2",
21+
"_csp": "aws",
22+
"_region": "us-east-1"
23+
"mytag1": "foo",
24+
"mytag2": "bar"
25+
},
26+
"f40bd195389s3761023ca7aa8a3r0932": {
27+
"_id": "f40bd195389s3761023ca7aa8a3r0932"
28+
"_type": "observability",
29+
"_alias": "project-3",
30+
"_csp": "aws",
31+
"_region": "us-east-1"
32+
"mytag1": "foo",
33+
"mytag2": "bar"
34+
}
35+
}
36+
}

specification/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"@ml/*": ["ml/*"],
4343
"@monitoring/*": ["monitoring/*"],
4444
"@nodes/*": ["nodes/*"],
45+
"@project/*": ["project/*"],
4546
"@query_ruleset/*": ["query_ruleset/*"],
4647
"@rollup/*": ["rollup/*"],
4748
"@searchable_snapshots/*": ["searchable_snapshots/*"],

0 commit comments

Comments
 (0)