Skip to main content

nominal_api_conjure/conjure/endpoints/scout/datasource/
data_source_service.rs

1use conjure_http::endpoint;
2/// Data sources are data input to runs, including databases, CSV, video, and streaming data. They contain channels that represent the series data.
3/// The DataSource Service is responsible for indexing and searching channels across data sources.
4#[conjure_http::conjure_endpoints(
5    name = "DataSourceService",
6    use_legacy_error_serialization
7)]
8pub trait DataSourceService {
9    /// Returns channels that match the search criteria. Results are sorted by similarity score.
10    #[endpoint(
11        method = POST,
12        path = "/data-source/v1/data-sources/search-channels",
13        name = "searchChannels",
14        produces = conjure_http::server::StdResponseSerializer
15    )]
16    fn search_channels(
17        &self,
18        #[auth]
19        auth_: conjure_object::BearerToken,
20        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
21        query: super::super::super::super::objects::datasource::api::SearchChannelsRequest,
22    ) -> Result<
23        super::super::super::super::objects::datasource::api::SearchChannelsResponse,
24        conjure_http::private::Error,
25    >;
26    /// Returns channels that match the search criteria. Results are sorted by similarity score.
27    /// If neither minDataUpdatedTime nor maxDataStartTime is provided, the search is bounded to a
28    /// default one-month lookback ending now rather than scanning the data source's full history.
29    #[endpoint(
30        method = POST,
31        path = "/data-source/v1/data-sources/search-filtered-channels",
32        name = "searchFilteredChannels",
33        produces = conjure_http::server::StdResponseSerializer
34    )]
35    fn search_filtered_channels(
36        &self,
37        #[auth]
38        auth_: conjure_object::BearerToken,
39        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
40        query: super::super::super::super::objects::datasource::api::SearchFilteredChannelsRequest,
41    ) -> Result<
42        super::super::super::super::objects::datasource::api::SearchFilteredChannelsResponse,
43        conjure_http::private::Error,
44    >;
45    /// Returns only channels that are direct children of the parent. Returns results sorted alphabetically.
46    /// If dataScopeFilters is not provided, the search is bounded to a default one-month lookback ending
47    /// now rather than scanning the data source's full history.
48    #[endpoint(
49        method = POST,
50        path = "/data-source/v1/data-sources/search-hierarchical-channels",
51        name = "searchHierarchicalChannels",
52        produces = conjure_http::server::StdResponseSerializer
53    )]
54    fn search_hierarchical_channels(
55        &self,
56        #[auth]
57        auth_: conjure_object::BearerToken,
58        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
59        query: super::super::super::super::objects::datasource::api::SearchHierarchicalChannelsRequest,
60    ) -> Result<
61        super::super::super::super::objects::datasource::api::SearchHierarchicalChannelsResponse,
62        conjure_http::private::Error,
63    >;
64    /// Indexes the channel prefix tree for a specified data source. This operation constructs a prefix tree from the
65    /// channels available in the data source.
66    #[endpoint(
67        method = POST,
68        path = "/data-source/v1/data-sources/index-channel-prefix-tree",
69        name = "indexChannelPrefixTree",
70        produces = conjure_http::server::StdResponseSerializer
71    )]
72    fn index_channel_prefix_tree(
73        &self,
74        #[auth]
75        auth_: conjure_object::BearerToken,
76        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
77        request: super::super::super::super::objects::datasource::api::IndexChannelPrefixTreeRequest,
78    ) -> Result<
79        super::super::super::super::objects::datasource::api::ChannelPrefixTree,
80        conjure_http::private::Error,
81    >;
82    /// Clears the channel hierarchy delimiter for a specified data source, removing any previously indexed
83    /// prefix tree. After calling this endpoint, the data source will no longer have hierarchical channel browsing
84    /// enabled until a new delimiter is set via indexChannelPrefixTree.
85    #[endpoint(
86        method = POST,
87        path = "/data-source/v1/data-sources/clear-channel-prefix-tree",
88        name = "clearChannelPrefixTree"
89    )]
90    fn clear_channel_prefix_tree(
91        &self,
92        #[auth]
93        auth_: conjure_object::BearerToken,
94        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
95        request: super::super::super::super::objects::datasource::api::ClearChannelPrefixTreeRequest,
96    ) -> Result<(), conjure_http::private::Error>;
97    /// Returns the channel prefix tree for each of the specified data sources. If the tree for a data source has not
98    /// been indexed, it will be omitted from the map.
99    #[endpoint(
100        method = POST,
101        path = "/data-source/v1/data-sources/batch-get-channel-prefix-tree",
102        name = "batchGetChannelPrefixTrees",
103        produces = conjure_http::server::StdResponseSerializer
104    )]
105    fn batch_get_channel_prefix_trees(
106        &self,
107        #[auth]
108        auth_: conjure_object::BearerToken,
109        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
110        request: super::super::super::super::objects::datasource::api::BatchGetChannelPrefixTreeRequest,
111    ) -> Result<
112        super::super::super::super::objects::datasource::api::BatchGetChannelPrefixTreeResponse,
113        conjure_http::private::Error,
114    >;
115    /// Returns the the set of all tag keys and their values that are available for the specified channel given an
116    /// initial set of filters.
117    #[endpoint(
118        method = POST,
119        path = "/data-source/v1/data-sources/get-available-tags",
120        name = "getAvailableTagsForChannel",
121        produces = conjure_http::server::StdResponseSerializer
122    )]
123    fn get_available_tags_for_channel(
124        &self,
125        #[auth]
126        auth_: conjure_object::BearerToken,
127        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
128        request: super::super::super::super::objects::datasource::api::GetAvailableTagsForChannelRequest,
129    ) -> Result<
130        super::super::super::super::objects::datasource::api::GetAvailableTagsForChannelResponse,
131        conjure_http::private::Error,
132    >;
133    /// Returns the maximum data timestamps for the specified data scopes. Responses are returned
134    /// in the same order as requests.
135    #[endpoint(
136        method = POST,
137        path = "/data-source/v1/data-sources/get-data-scope-bounds",
138        name = "getDataScopeBounds",
139        produces = conjure_http::server::StdResponseSerializer
140    )]
141    fn get_data_scope_bounds(
142        &self,
143        #[auth]
144        auth_: conjure_object::BearerToken,
145        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
146        request: super::super::super::super::objects::datasource::api::BatchGetDataScopeBoundsRequest,
147    ) -> Result<
148        super::super::super::super::objects::datasource::api::BatchGetDataScopeBoundsResponse,
149        conjure_http::private::Error,
150    >;
151    /// Returns the maximum data timestamp across all specified data scopes using aggregate storage queries.
152    /// At most 100 data scopes may be requested.
153    #[endpoint(
154        method = POST,
155        path = "/data-source/v1/data-sources/get-latest-data-scope-end-time",
156        name = "getLatestDataScopeEndTime",
157        produces = conjure_http::server::StdResponseSerializer
158    )]
159    fn get_latest_data_scope_end_time(
160        &self,
161        #[auth]
162        auth_: conjure_object::BearerToken,
163        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
164        request: super::super::super::super::objects::datasource::api::GetLatestDataScopeEndTimeRequest,
165    ) -> Result<
166        super::super::super::super::objects::datasource::api::GetLatestDataScopeEndTimeResponse,
167        conjure_http::private::Error,
168    >;
169    /// Returns available tag values for a given data source for a set of tag keys. For Nominal data sources, a time
170    /// range can be provided to filter tag values to those present within the months spanned by the range. If no
171    /// time range is provided, this defaults to the last month. For external data sources, the range must not be
172    /// specified, as all tag values are returned.
173    #[endpoint(
174        method = POST,
175        path = "/data-source/v1/data-sources/{dataSourceRid}/get-tags",
176        name = "getTagValuesForDataSource",
177        produces = conjure_http::server::conjure::CollectionResponseSerializer
178    )]
179    fn get_tag_values_for_data_source(
180        &self,
181        #[auth]
182        auth_: conjure_object::BearerToken,
183        #[path(
184            name = "dataSourceRid",
185            decoder = conjure_http::server::conjure::FromPlainDecoder,
186            log_as = "dataSourceRid",
187            safe
188        )]
189        data_source_rid: super::super::super::super::objects::api::rids::DataSourceRid,
190        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
191        request: super::super::super::super::objects::datasource::api::GetTagValuesForDataSourceRequest,
192    ) -> Result<
193        std::collections::BTreeMap<
194            super::super::super::super::objects::api::TagName,
195            std::collections::BTreeSet<
196                super::super::super::super::objects::api::TagValue,
197            >,
198        >,
199        conjure_http::private::Error,
200    >;
201    /// Paged endpoint returning the set of all tag keys that are available for the specified channel given an
202    /// initial set of filters.
203    /// If any tag filters are supplied, their tag keys are omitted from the result.
204    #[endpoint(
205        method = POST,
206        path = "/data-source/v1/data-sources/{dataSourceRid}/get-tag-keys",
207        name = "getAvailableTagKeys",
208        produces = conjure_http::server::StdResponseSerializer
209    )]
210    fn get_available_tag_keys(
211        &self,
212        #[auth]
213        auth_: conjure_object::BearerToken,
214        #[path(
215            name = "dataSourceRid",
216            decoder = conjure_http::server::conjure::FromPlainDecoder,
217            log_as = "dataSourceRid",
218            safe
219        )]
220        data_source_rid: super::super::super::super::objects::api::rids::DataSourceRid,
221        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
222        request: super::super::super::super::objects::datasource::api::GetAvailableTagKeysRequest,
223    ) -> Result<
224        super::super::super::super::objects::datasource::api::GetAvailableTagKeysResponse,
225        conjure_http::private::Error,
226    >;
227    /// Paged endpoint returning the set of all tag values that are available for the specified tag and datasource
228    /// given an initial set of filters.
229    #[endpoint(
230        method = POST,
231        path = "/data-source/v1/data-sources/{dataSourceRid}/get-tag-values",
232        name = "getAvailableTagValues",
233        produces = conjure_http::server::StdResponseSerializer
234    )]
235    fn get_available_tag_values(
236        &self,
237        #[auth]
238        auth_: conjure_object::BearerToken,
239        #[path(
240            name = "dataSourceRid",
241            decoder = conjure_http::server::conjure::FromPlainDecoder,
242            log_as = "dataSourceRid",
243            safe
244        )]
245        data_source_rid: super::super::super::super::objects::api::rids::DataSourceRid,
246        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
247        request: super::super::super::super::objects::datasource::api::GetAvailableTagValuesRequest,
248    ) -> Result<
249        super::super::super::super::objects::datasource::api::GetAvailableTagValuesResponse,
250        conjure_http::private::Error,
251    >;
252    /// Returns the set of all tag keys and their values for each specified channel given
253    /// initial sets of filters. Each response corresponds positionally to the input request.
254    #[endpoint(
255        method = POST,
256        path = "/data-source/v1/data-sources/batch-get-available-tags",
257        name = "batchGetAvailableTagsForChannel",
258        produces = conjure_http::server::StdResponseSerializer
259    )]
260    fn batch_get_available_tags_for_channel(
261        &self,
262        #[auth]
263        auth_: conjure_object::BearerToken,
264        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
265        request: super::super::super::super::objects::datasource::api::BatchGetAvailableTagsForChannelRequest,
266    ) -> Result<
267        super::super::super::super::objects::datasource::api::BatchGetAvailableTagsForChannelResponse,
268        conjure_http::private::Error,
269    >;
270    /// Returns the number of distinct series matching each request's datasource, channel, range,
271    /// and tag filters. Each response corresponds positionally to the input request.
272    /// Returns empty seriesCount for non-Nominal datasources.
273    #[endpoint(
274        method = POST,
275        path = "/data-source/v1/data-sources/batch-get-series-count",
276        name = "batchGetSeriesCount",
277        produces = conjure_http::server::StdResponseSerializer
278    )]
279    fn batch_get_series_count(
280        &self,
281        #[auth]
282        auth_: conjure_object::BearerToken,
283        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
284        request: super::super::super::super::objects::datasource::api::BatchGetSeriesCountRequest,
285    ) -> Result<
286        super::super::super::super::objects::datasource::api::BatchGetSeriesCountResponse,
287        conjure_http::private::Error,
288    >;
289    /// Returns (channel, full-tag-map) entries for a specific channel in a dataset.
290    /// If tags are provided, each entry must match all provided key/value pairs; extra tags may still be present.
291    /// Only numeric-data series are returned; video series are excluded.
292    #[endpoint(
293        method = POST,
294        path = "/data-source/v1/data-sources/get-matching-channels-with-tags",
295        name = "getMatchingChannelsWithTags",
296        produces = conjure_http::server::StdResponseSerializer
297    )]
298    fn get_matching_channels_with_tags(
299        &self,
300        #[auth]
301        auth_: conjure_object::BearerToken,
302        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
303        request: super::super::super::super::objects::datasource::api::GetMatchingChannelsWithTagsRequest,
304    ) -> Result<
305        super::super::super::super::objects::datasource::api::GetMatchingChannelsWithTagsResponse,
306        conjure_http::private::Error,
307    >;
308}
309/// Data sources are data input to runs, including databases, CSV, video, and streaming data. They contain channels that represent the series data.
310/// The DataSource Service is responsible for indexing and searching channels across data sources.
311#[conjure_http::conjure_endpoints(
312    name = "DataSourceService",
313    use_legacy_error_serialization
314)]
315pub trait AsyncDataSourceService {
316    /// Returns channels that match the search criteria. Results are sorted by similarity score.
317    #[endpoint(
318        method = POST,
319        path = "/data-source/v1/data-sources/search-channels",
320        name = "searchChannels",
321        produces = conjure_http::server::StdResponseSerializer
322    )]
323    async fn search_channels(
324        &self,
325        #[auth]
326        auth_: conjure_object::BearerToken,
327        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
328        query: super::super::super::super::objects::datasource::api::SearchChannelsRequest,
329    ) -> Result<
330        super::super::super::super::objects::datasource::api::SearchChannelsResponse,
331        conjure_http::private::Error,
332    >;
333    /// Returns channels that match the search criteria. Results are sorted by similarity score.
334    /// If neither minDataUpdatedTime nor maxDataStartTime is provided, the search is bounded to a
335    /// default one-month lookback ending now rather than scanning the data source's full history.
336    #[endpoint(
337        method = POST,
338        path = "/data-source/v1/data-sources/search-filtered-channels",
339        name = "searchFilteredChannels",
340        produces = conjure_http::server::StdResponseSerializer
341    )]
342    async fn search_filtered_channels(
343        &self,
344        #[auth]
345        auth_: conjure_object::BearerToken,
346        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
347        query: super::super::super::super::objects::datasource::api::SearchFilteredChannelsRequest,
348    ) -> Result<
349        super::super::super::super::objects::datasource::api::SearchFilteredChannelsResponse,
350        conjure_http::private::Error,
351    >;
352    /// Returns only channels that are direct children of the parent. Returns results sorted alphabetically.
353    /// If dataScopeFilters is not provided, the search is bounded to a default one-month lookback ending
354    /// now rather than scanning the data source's full history.
355    #[endpoint(
356        method = POST,
357        path = "/data-source/v1/data-sources/search-hierarchical-channels",
358        name = "searchHierarchicalChannels",
359        produces = conjure_http::server::StdResponseSerializer
360    )]
361    async fn search_hierarchical_channels(
362        &self,
363        #[auth]
364        auth_: conjure_object::BearerToken,
365        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
366        query: super::super::super::super::objects::datasource::api::SearchHierarchicalChannelsRequest,
367    ) -> Result<
368        super::super::super::super::objects::datasource::api::SearchHierarchicalChannelsResponse,
369        conjure_http::private::Error,
370    >;
371    /// Indexes the channel prefix tree for a specified data source. This operation constructs a prefix tree from the
372    /// channels available in the data source.
373    #[endpoint(
374        method = POST,
375        path = "/data-source/v1/data-sources/index-channel-prefix-tree",
376        name = "indexChannelPrefixTree",
377        produces = conjure_http::server::StdResponseSerializer
378    )]
379    async fn index_channel_prefix_tree(
380        &self,
381        #[auth]
382        auth_: conjure_object::BearerToken,
383        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
384        request: super::super::super::super::objects::datasource::api::IndexChannelPrefixTreeRequest,
385    ) -> Result<
386        super::super::super::super::objects::datasource::api::ChannelPrefixTree,
387        conjure_http::private::Error,
388    >;
389    /// Clears the channel hierarchy delimiter for a specified data source, removing any previously indexed
390    /// prefix tree. After calling this endpoint, the data source will no longer have hierarchical channel browsing
391    /// enabled until a new delimiter is set via indexChannelPrefixTree.
392    #[endpoint(
393        method = POST,
394        path = "/data-source/v1/data-sources/clear-channel-prefix-tree",
395        name = "clearChannelPrefixTree"
396    )]
397    async fn clear_channel_prefix_tree(
398        &self,
399        #[auth]
400        auth_: conjure_object::BearerToken,
401        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
402        request: super::super::super::super::objects::datasource::api::ClearChannelPrefixTreeRequest,
403    ) -> Result<(), conjure_http::private::Error>;
404    /// Returns the channel prefix tree for each of the specified data sources. If the tree for a data source has not
405    /// been indexed, it will be omitted from the map.
406    #[endpoint(
407        method = POST,
408        path = "/data-source/v1/data-sources/batch-get-channel-prefix-tree",
409        name = "batchGetChannelPrefixTrees",
410        produces = conjure_http::server::StdResponseSerializer
411    )]
412    async fn batch_get_channel_prefix_trees(
413        &self,
414        #[auth]
415        auth_: conjure_object::BearerToken,
416        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
417        request: super::super::super::super::objects::datasource::api::BatchGetChannelPrefixTreeRequest,
418    ) -> Result<
419        super::super::super::super::objects::datasource::api::BatchGetChannelPrefixTreeResponse,
420        conjure_http::private::Error,
421    >;
422    /// Returns the the set of all tag keys and their values that are available for the specified channel given an
423    /// initial set of filters.
424    #[endpoint(
425        method = POST,
426        path = "/data-source/v1/data-sources/get-available-tags",
427        name = "getAvailableTagsForChannel",
428        produces = conjure_http::server::StdResponseSerializer
429    )]
430    async fn get_available_tags_for_channel(
431        &self,
432        #[auth]
433        auth_: conjure_object::BearerToken,
434        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
435        request: super::super::super::super::objects::datasource::api::GetAvailableTagsForChannelRequest,
436    ) -> Result<
437        super::super::super::super::objects::datasource::api::GetAvailableTagsForChannelResponse,
438        conjure_http::private::Error,
439    >;
440    /// Returns the maximum data timestamps for the specified data scopes. Responses are returned
441    /// in the same order as requests.
442    #[endpoint(
443        method = POST,
444        path = "/data-source/v1/data-sources/get-data-scope-bounds",
445        name = "getDataScopeBounds",
446        produces = conjure_http::server::StdResponseSerializer
447    )]
448    async fn get_data_scope_bounds(
449        &self,
450        #[auth]
451        auth_: conjure_object::BearerToken,
452        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
453        request: super::super::super::super::objects::datasource::api::BatchGetDataScopeBoundsRequest,
454    ) -> Result<
455        super::super::super::super::objects::datasource::api::BatchGetDataScopeBoundsResponse,
456        conjure_http::private::Error,
457    >;
458    /// Returns the maximum data timestamp across all specified data scopes using aggregate storage queries.
459    /// At most 100 data scopes may be requested.
460    #[endpoint(
461        method = POST,
462        path = "/data-source/v1/data-sources/get-latest-data-scope-end-time",
463        name = "getLatestDataScopeEndTime",
464        produces = conjure_http::server::StdResponseSerializer
465    )]
466    async fn get_latest_data_scope_end_time(
467        &self,
468        #[auth]
469        auth_: conjure_object::BearerToken,
470        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
471        request: super::super::super::super::objects::datasource::api::GetLatestDataScopeEndTimeRequest,
472    ) -> Result<
473        super::super::super::super::objects::datasource::api::GetLatestDataScopeEndTimeResponse,
474        conjure_http::private::Error,
475    >;
476    /// Returns available tag values for a given data source for a set of tag keys. For Nominal data sources, a time
477    /// range can be provided to filter tag values to those present within the months spanned by the range. If no
478    /// time range is provided, this defaults to the last month. For external data sources, the range must not be
479    /// specified, as all tag values are returned.
480    #[endpoint(
481        method = POST,
482        path = "/data-source/v1/data-sources/{dataSourceRid}/get-tags",
483        name = "getTagValuesForDataSource",
484        produces = conjure_http::server::conjure::CollectionResponseSerializer
485    )]
486    async fn get_tag_values_for_data_source(
487        &self,
488        #[auth]
489        auth_: conjure_object::BearerToken,
490        #[path(
491            name = "dataSourceRid",
492            decoder = conjure_http::server::conjure::FromPlainDecoder,
493            log_as = "dataSourceRid",
494            safe
495        )]
496        data_source_rid: super::super::super::super::objects::api::rids::DataSourceRid,
497        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
498        request: super::super::super::super::objects::datasource::api::GetTagValuesForDataSourceRequest,
499    ) -> Result<
500        std::collections::BTreeMap<
501            super::super::super::super::objects::api::TagName,
502            std::collections::BTreeSet<
503                super::super::super::super::objects::api::TagValue,
504            >,
505        >,
506        conjure_http::private::Error,
507    >;
508    /// Paged endpoint returning the set of all tag keys that are available for the specified channel given an
509    /// initial set of filters.
510    /// If any tag filters are supplied, their tag keys are omitted from the result.
511    #[endpoint(
512        method = POST,
513        path = "/data-source/v1/data-sources/{dataSourceRid}/get-tag-keys",
514        name = "getAvailableTagKeys",
515        produces = conjure_http::server::StdResponseSerializer
516    )]
517    async fn get_available_tag_keys(
518        &self,
519        #[auth]
520        auth_: conjure_object::BearerToken,
521        #[path(
522            name = "dataSourceRid",
523            decoder = conjure_http::server::conjure::FromPlainDecoder,
524            log_as = "dataSourceRid",
525            safe
526        )]
527        data_source_rid: super::super::super::super::objects::api::rids::DataSourceRid,
528        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
529        request: super::super::super::super::objects::datasource::api::GetAvailableTagKeysRequest,
530    ) -> Result<
531        super::super::super::super::objects::datasource::api::GetAvailableTagKeysResponse,
532        conjure_http::private::Error,
533    >;
534    /// Paged endpoint returning the set of all tag values that are available for the specified tag and datasource
535    /// given an initial set of filters.
536    #[endpoint(
537        method = POST,
538        path = "/data-source/v1/data-sources/{dataSourceRid}/get-tag-values",
539        name = "getAvailableTagValues",
540        produces = conjure_http::server::StdResponseSerializer
541    )]
542    async fn get_available_tag_values(
543        &self,
544        #[auth]
545        auth_: conjure_object::BearerToken,
546        #[path(
547            name = "dataSourceRid",
548            decoder = conjure_http::server::conjure::FromPlainDecoder,
549            log_as = "dataSourceRid",
550            safe
551        )]
552        data_source_rid: super::super::super::super::objects::api::rids::DataSourceRid,
553        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
554        request: super::super::super::super::objects::datasource::api::GetAvailableTagValuesRequest,
555    ) -> Result<
556        super::super::super::super::objects::datasource::api::GetAvailableTagValuesResponse,
557        conjure_http::private::Error,
558    >;
559    /// Returns the set of all tag keys and their values for each specified channel given
560    /// initial sets of filters. Each response corresponds positionally to the input request.
561    #[endpoint(
562        method = POST,
563        path = "/data-source/v1/data-sources/batch-get-available-tags",
564        name = "batchGetAvailableTagsForChannel",
565        produces = conjure_http::server::StdResponseSerializer
566    )]
567    async fn batch_get_available_tags_for_channel(
568        &self,
569        #[auth]
570        auth_: conjure_object::BearerToken,
571        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
572        request: super::super::super::super::objects::datasource::api::BatchGetAvailableTagsForChannelRequest,
573    ) -> Result<
574        super::super::super::super::objects::datasource::api::BatchGetAvailableTagsForChannelResponse,
575        conjure_http::private::Error,
576    >;
577    /// Returns the number of distinct series matching each request's datasource, channel, range,
578    /// and tag filters. Each response corresponds positionally to the input request.
579    /// Returns empty seriesCount for non-Nominal datasources.
580    #[endpoint(
581        method = POST,
582        path = "/data-source/v1/data-sources/batch-get-series-count",
583        name = "batchGetSeriesCount",
584        produces = conjure_http::server::StdResponseSerializer
585    )]
586    async fn batch_get_series_count(
587        &self,
588        #[auth]
589        auth_: conjure_object::BearerToken,
590        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
591        request: super::super::super::super::objects::datasource::api::BatchGetSeriesCountRequest,
592    ) -> Result<
593        super::super::super::super::objects::datasource::api::BatchGetSeriesCountResponse,
594        conjure_http::private::Error,
595    >;
596    /// Returns (channel, full-tag-map) entries for a specific channel in a dataset.
597    /// If tags are provided, each entry must match all provided key/value pairs; extra tags may still be present.
598    /// Only numeric-data series are returned; video series are excluded.
599    #[endpoint(
600        method = POST,
601        path = "/data-source/v1/data-sources/get-matching-channels-with-tags",
602        name = "getMatchingChannelsWithTags",
603        produces = conjure_http::server::StdResponseSerializer
604    )]
605    async fn get_matching_channels_with_tags(
606        &self,
607        #[auth]
608        auth_: conjure_object::BearerToken,
609        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
610        request: super::super::super::super::objects::datasource::api::GetMatchingChannelsWithTagsRequest,
611    ) -> Result<
612        super::super::super::super::objects::datasource::api::GetMatchingChannelsWithTagsResponse,
613        conjure_http::private::Error,
614    >;
615}
616/// Data sources are data input to runs, including databases, CSV, video, and streaming data. They contain channels that represent the series data.
617/// The DataSource Service is responsible for indexing and searching channels across data sources.
618#[conjure_http::conjure_endpoints(
619    name = "DataSourceService",
620    use_legacy_error_serialization,
621    local
622)]
623pub trait LocalAsyncDataSourceService {
624    /// Returns channels that match the search criteria. Results are sorted by similarity score.
625    #[endpoint(
626        method = POST,
627        path = "/data-source/v1/data-sources/search-channels",
628        name = "searchChannels",
629        produces = conjure_http::server::StdResponseSerializer
630    )]
631    async fn search_channels(
632        &self,
633        #[auth]
634        auth_: conjure_object::BearerToken,
635        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
636        query: super::super::super::super::objects::datasource::api::SearchChannelsRequest,
637    ) -> Result<
638        super::super::super::super::objects::datasource::api::SearchChannelsResponse,
639        conjure_http::private::Error,
640    >;
641    /// Returns channels that match the search criteria. Results are sorted by similarity score.
642    /// If neither minDataUpdatedTime nor maxDataStartTime is provided, the search is bounded to a
643    /// default one-month lookback ending now rather than scanning the data source's full history.
644    #[endpoint(
645        method = POST,
646        path = "/data-source/v1/data-sources/search-filtered-channels",
647        name = "searchFilteredChannels",
648        produces = conjure_http::server::StdResponseSerializer
649    )]
650    async fn search_filtered_channels(
651        &self,
652        #[auth]
653        auth_: conjure_object::BearerToken,
654        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
655        query: super::super::super::super::objects::datasource::api::SearchFilteredChannelsRequest,
656    ) -> Result<
657        super::super::super::super::objects::datasource::api::SearchFilteredChannelsResponse,
658        conjure_http::private::Error,
659    >;
660    /// Returns only channels that are direct children of the parent. Returns results sorted alphabetically.
661    /// If dataScopeFilters is not provided, the search is bounded to a default one-month lookback ending
662    /// now rather than scanning the data source's full history.
663    #[endpoint(
664        method = POST,
665        path = "/data-source/v1/data-sources/search-hierarchical-channels",
666        name = "searchHierarchicalChannels",
667        produces = conjure_http::server::StdResponseSerializer
668    )]
669    async fn search_hierarchical_channels(
670        &self,
671        #[auth]
672        auth_: conjure_object::BearerToken,
673        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
674        query: super::super::super::super::objects::datasource::api::SearchHierarchicalChannelsRequest,
675    ) -> Result<
676        super::super::super::super::objects::datasource::api::SearchHierarchicalChannelsResponse,
677        conjure_http::private::Error,
678    >;
679    /// Indexes the channel prefix tree for a specified data source. This operation constructs a prefix tree from the
680    /// channels available in the data source.
681    #[endpoint(
682        method = POST,
683        path = "/data-source/v1/data-sources/index-channel-prefix-tree",
684        name = "indexChannelPrefixTree",
685        produces = conjure_http::server::StdResponseSerializer
686    )]
687    async fn index_channel_prefix_tree(
688        &self,
689        #[auth]
690        auth_: conjure_object::BearerToken,
691        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
692        request: super::super::super::super::objects::datasource::api::IndexChannelPrefixTreeRequest,
693    ) -> Result<
694        super::super::super::super::objects::datasource::api::ChannelPrefixTree,
695        conjure_http::private::Error,
696    >;
697    /// Clears the channel hierarchy delimiter for a specified data source, removing any previously indexed
698    /// prefix tree. After calling this endpoint, the data source will no longer have hierarchical channel browsing
699    /// enabled until a new delimiter is set via indexChannelPrefixTree.
700    #[endpoint(
701        method = POST,
702        path = "/data-source/v1/data-sources/clear-channel-prefix-tree",
703        name = "clearChannelPrefixTree"
704    )]
705    async fn clear_channel_prefix_tree(
706        &self,
707        #[auth]
708        auth_: conjure_object::BearerToken,
709        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
710        request: super::super::super::super::objects::datasource::api::ClearChannelPrefixTreeRequest,
711    ) -> Result<(), conjure_http::private::Error>;
712    /// Returns the channel prefix tree for each of the specified data sources. If the tree for a data source has not
713    /// been indexed, it will be omitted from the map.
714    #[endpoint(
715        method = POST,
716        path = "/data-source/v1/data-sources/batch-get-channel-prefix-tree",
717        name = "batchGetChannelPrefixTrees",
718        produces = conjure_http::server::StdResponseSerializer
719    )]
720    async fn batch_get_channel_prefix_trees(
721        &self,
722        #[auth]
723        auth_: conjure_object::BearerToken,
724        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
725        request: super::super::super::super::objects::datasource::api::BatchGetChannelPrefixTreeRequest,
726    ) -> Result<
727        super::super::super::super::objects::datasource::api::BatchGetChannelPrefixTreeResponse,
728        conjure_http::private::Error,
729    >;
730    /// Returns the the set of all tag keys and their values that are available for the specified channel given an
731    /// initial set of filters.
732    #[endpoint(
733        method = POST,
734        path = "/data-source/v1/data-sources/get-available-tags",
735        name = "getAvailableTagsForChannel",
736        produces = conjure_http::server::StdResponseSerializer
737    )]
738    async fn get_available_tags_for_channel(
739        &self,
740        #[auth]
741        auth_: conjure_object::BearerToken,
742        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
743        request: super::super::super::super::objects::datasource::api::GetAvailableTagsForChannelRequest,
744    ) -> Result<
745        super::super::super::super::objects::datasource::api::GetAvailableTagsForChannelResponse,
746        conjure_http::private::Error,
747    >;
748    /// Returns the maximum data timestamps for the specified data scopes. Responses are returned
749    /// in the same order as requests.
750    #[endpoint(
751        method = POST,
752        path = "/data-source/v1/data-sources/get-data-scope-bounds",
753        name = "getDataScopeBounds",
754        produces = conjure_http::server::StdResponseSerializer
755    )]
756    async fn get_data_scope_bounds(
757        &self,
758        #[auth]
759        auth_: conjure_object::BearerToken,
760        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
761        request: super::super::super::super::objects::datasource::api::BatchGetDataScopeBoundsRequest,
762    ) -> Result<
763        super::super::super::super::objects::datasource::api::BatchGetDataScopeBoundsResponse,
764        conjure_http::private::Error,
765    >;
766    /// Returns the maximum data timestamp across all specified data scopes using aggregate storage queries.
767    /// At most 100 data scopes may be requested.
768    #[endpoint(
769        method = POST,
770        path = "/data-source/v1/data-sources/get-latest-data-scope-end-time",
771        name = "getLatestDataScopeEndTime",
772        produces = conjure_http::server::StdResponseSerializer
773    )]
774    async fn get_latest_data_scope_end_time(
775        &self,
776        #[auth]
777        auth_: conjure_object::BearerToken,
778        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
779        request: super::super::super::super::objects::datasource::api::GetLatestDataScopeEndTimeRequest,
780    ) -> Result<
781        super::super::super::super::objects::datasource::api::GetLatestDataScopeEndTimeResponse,
782        conjure_http::private::Error,
783    >;
784    /// Returns available tag values for a given data source for a set of tag keys. For Nominal data sources, a time
785    /// range can be provided to filter tag values to those present within the months spanned by the range. If no
786    /// time range is provided, this defaults to the last month. For external data sources, the range must not be
787    /// specified, as all tag values are returned.
788    #[endpoint(
789        method = POST,
790        path = "/data-source/v1/data-sources/{dataSourceRid}/get-tags",
791        name = "getTagValuesForDataSource",
792        produces = conjure_http::server::conjure::CollectionResponseSerializer
793    )]
794    async fn get_tag_values_for_data_source(
795        &self,
796        #[auth]
797        auth_: conjure_object::BearerToken,
798        #[path(
799            name = "dataSourceRid",
800            decoder = conjure_http::server::conjure::FromPlainDecoder,
801            log_as = "dataSourceRid",
802            safe
803        )]
804        data_source_rid: super::super::super::super::objects::api::rids::DataSourceRid,
805        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
806        request: super::super::super::super::objects::datasource::api::GetTagValuesForDataSourceRequest,
807    ) -> Result<
808        std::collections::BTreeMap<
809            super::super::super::super::objects::api::TagName,
810            std::collections::BTreeSet<
811                super::super::super::super::objects::api::TagValue,
812            >,
813        >,
814        conjure_http::private::Error,
815    >;
816    /// Paged endpoint returning the set of all tag keys that are available for the specified channel given an
817    /// initial set of filters.
818    /// If any tag filters are supplied, their tag keys are omitted from the result.
819    #[endpoint(
820        method = POST,
821        path = "/data-source/v1/data-sources/{dataSourceRid}/get-tag-keys",
822        name = "getAvailableTagKeys",
823        produces = conjure_http::server::StdResponseSerializer
824    )]
825    async fn get_available_tag_keys(
826        &self,
827        #[auth]
828        auth_: conjure_object::BearerToken,
829        #[path(
830            name = "dataSourceRid",
831            decoder = conjure_http::server::conjure::FromPlainDecoder,
832            log_as = "dataSourceRid",
833            safe
834        )]
835        data_source_rid: super::super::super::super::objects::api::rids::DataSourceRid,
836        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
837        request: super::super::super::super::objects::datasource::api::GetAvailableTagKeysRequest,
838    ) -> Result<
839        super::super::super::super::objects::datasource::api::GetAvailableTagKeysResponse,
840        conjure_http::private::Error,
841    >;
842    /// Paged endpoint returning the set of all tag values that are available for the specified tag and datasource
843    /// given an initial set of filters.
844    #[endpoint(
845        method = POST,
846        path = "/data-source/v1/data-sources/{dataSourceRid}/get-tag-values",
847        name = "getAvailableTagValues",
848        produces = conjure_http::server::StdResponseSerializer
849    )]
850    async fn get_available_tag_values(
851        &self,
852        #[auth]
853        auth_: conjure_object::BearerToken,
854        #[path(
855            name = "dataSourceRid",
856            decoder = conjure_http::server::conjure::FromPlainDecoder,
857            log_as = "dataSourceRid",
858            safe
859        )]
860        data_source_rid: super::super::super::super::objects::api::rids::DataSourceRid,
861        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
862        request: super::super::super::super::objects::datasource::api::GetAvailableTagValuesRequest,
863    ) -> Result<
864        super::super::super::super::objects::datasource::api::GetAvailableTagValuesResponse,
865        conjure_http::private::Error,
866    >;
867    /// Returns the set of all tag keys and their values for each specified channel given
868    /// initial sets of filters. Each response corresponds positionally to the input request.
869    #[endpoint(
870        method = POST,
871        path = "/data-source/v1/data-sources/batch-get-available-tags",
872        name = "batchGetAvailableTagsForChannel",
873        produces = conjure_http::server::StdResponseSerializer
874    )]
875    async fn batch_get_available_tags_for_channel(
876        &self,
877        #[auth]
878        auth_: conjure_object::BearerToken,
879        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
880        request: super::super::super::super::objects::datasource::api::BatchGetAvailableTagsForChannelRequest,
881    ) -> Result<
882        super::super::super::super::objects::datasource::api::BatchGetAvailableTagsForChannelResponse,
883        conjure_http::private::Error,
884    >;
885    /// Returns the number of distinct series matching each request's datasource, channel, range,
886    /// and tag filters. Each response corresponds positionally to the input request.
887    /// Returns empty seriesCount for non-Nominal datasources.
888    #[endpoint(
889        method = POST,
890        path = "/data-source/v1/data-sources/batch-get-series-count",
891        name = "batchGetSeriesCount",
892        produces = conjure_http::server::StdResponseSerializer
893    )]
894    async fn batch_get_series_count(
895        &self,
896        #[auth]
897        auth_: conjure_object::BearerToken,
898        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
899        request: super::super::super::super::objects::datasource::api::BatchGetSeriesCountRequest,
900    ) -> Result<
901        super::super::super::super::objects::datasource::api::BatchGetSeriesCountResponse,
902        conjure_http::private::Error,
903    >;
904    /// Returns (channel, full-tag-map) entries for a specific channel in a dataset.
905    /// If tags are provided, each entry must match all provided key/value pairs; extra tags may still be present.
906    /// Only numeric-data series are returned; video series are excluded.
907    #[endpoint(
908        method = POST,
909        path = "/data-source/v1/data-sources/get-matching-channels-with-tags",
910        name = "getMatchingChannelsWithTags",
911        produces = conjure_http::server::StdResponseSerializer
912    )]
913    async fn get_matching_channels_with_tags(
914        &self,
915        #[auth]
916        auth_: conjure_object::BearerToken,
917        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
918        request: super::super::super::super::objects::datasource::api::GetMatchingChannelsWithTagsRequest,
919    ) -> Result<
920        super::super::super::super::objects::datasource::api::GetMatchingChannelsWithTagsResponse,
921        conjure_http::private::Error,
922    >;
923}