Skip to main content

nominal_api/conjure/endpoints/scout/sandbox/api/
sandbox_workspace_service.rs

1use conjure_http::endpoint;
2/// Service for managing demo workbooks in sandbox workspaces.
3/// All endpoints validate that the provided workspace has the human-readable ID "sandbox".
4#[conjure_http::conjure_endpoints(
5    name = "SandboxWorkspaceService",
6    use_legacy_error_serialization
7)]
8pub trait SandboxWorkspaceService {
9    /// Returns the list of demo workbook RIDs for the given sandbox workspace.
10    #[endpoint(
11        method = GET,
12        path = "/scout/v1/sandbox-workspace/{workspaceRid}/demo-workbooks",
13        name = "getDemoWorkbooks",
14        produces = conjure_http::server::StdResponseSerializer
15    )]
16    fn get_demo_workbooks(
17        &self,
18        #[auth]
19        auth_: conjure_object::BearerToken,
20        #[path(
21            name = "workspaceRid",
22            decoder = conjure_http::server::conjure::FromPlainDecoder,
23            log_as = "workspaceRid",
24            safe
25        )]
26        workspace_rid: super::super::super::super::super::objects::api::rids::WorkspaceRid,
27    ) -> Result<
28        super::super::super::super::super::objects::scout::sandbox::api::GetDemoWorkbooksResponse,
29        conjure_http::private::Error,
30    >;
31    /// Sets the list of demo workbook RIDs for the given sandbox workspace, replacing any existing entries.
32    #[endpoint(
33        method = PUT,
34        path = "/scout/v1/sandbox-workspace/{workspaceRid}/demo-workbooks",
35        name = "setDemoWorkbooks"
36    )]
37    fn set_demo_workbooks(
38        &self,
39        #[auth]
40        auth_: conjure_object::BearerToken,
41        #[path(
42            name = "workspaceRid",
43            decoder = conjure_http::server::conjure::FromPlainDecoder,
44            log_as = "workspaceRid",
45            safe
46        )]
47        workspace_rid: super::super::super::super::super::objects::api::rids::WorkspaceRid,
48        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
49        request: super::super::super::super::super::objects::scout::sandbox::api::SetDemoWorkbooksRequest,
50    ) -> Result<(), conjure_http::private::Error>;
51    /// Appends workbooks to the existing demo workbook list. If archiveOnLabelConflict is true,
52    /// existing workbooks with an exact label-set match are archived along with all related
53    /// resources instead of raising an error. The cascade performs a full graph traversal:
54    /// starting from the workbook's data scope (asset RIDs or run RIDs), it alternates between
55    /// discovering runs linked to assets and assets linked to runs until convergence. All
56    /// discovered assets, runs, datasets (from both asset and run data scopes), and events
57    /// (from snapshot refs and from all discovered assets) are then archived. This ensures no
58    /// orphaned resources remain when demo workbooks are replaced. Partial (subset/superset)
59    /// label conflicts always raise an error.
60    #[endpoint(
61        method = POST,
62        path = "/scout/v1/sandbox-workspace/{workspaceRid}/demo-workbooks",
63        name = "addDemoWorkbooks"
64    )]
65    fn add_demo_workbooks(
66        &self,
67        #[auth]
68        auth_: conjure_object::BearerToken,
69        #[path(
70            name = "workspaceRid",
71            decoder = conjure_http::server::conjure::FromPlainDecoder,
72            log_as = "workspaceRid",
73            safe
74        )]
75        workspace_rid: super::super::super::super::super::objects::api::rids::WorkspaceRid,
76        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
77        request: super::super::super::super::super::objects::scout::sandbox::api::AddDemoWorkbooksRequest,
78    ) -> Result<(), conjure_http::private::Error>;
79}
80/// Service for managing demo workbooks in sandbox workspaces.
81/// All endpoints validate that the provided workspace has the human-readable ID "sandbox".
82#[conjure_http::conjure_endpoints(
83    name = "SandboxWorkspaceService",
84    use_legacy_error_serialization
85)]
86pub trait AsyncSandboxWorkspaceService {
87    /// Returns the list of demo workbook RIDs for the given sandbox workspace.
88    #[endpoint(
89        method = GET,
90        path = "/scout/v1/sandbox-workspace/{workspaceRid}/demo-workbooks",
91        name = "getDemoWorkbooks",
92        produces = conjure_http::server::StdResponseSerializer
93    )]
94    async fn get_demo_workbooks(
95        &self,
96        #[auth]
97        auth_: conjure_object::BearerToken,
98        #[path(
99            name = "workspaceRid",
100            decoder = conjure_http::server::conjure::FromPlainDecoder,
101            log_as = "workspaceRid",
102            safe
103        )]
104        workspace_rid: super::super::super::super::super::objects::api::rids::WorkspaceRid,
105    ) -> Result<
106        super::super::super::super::super::objects::scout::sandbox::api::GetDemoWorkbooksResponse,
107        conjure_http::private::Error,
108    >;
109    /// Sets the list of demo workbook RIDs for the given sandbox workspace, replacing any existing entries.
110    #[endpoint(
111        method = PUT,
112        path = "/scout/v1/sandbox-workspace/{workspaceRid}/demo-workbooks",
113        name = "setDemoWorkbooks"
114    )]
115    async fn set_demo_workbooks(
116        &self,
117        #[auth]
118        auth_: conjure_object::BearerToken,
119        #[path(
120            name = "workspaceRid",
121            decoder = conjure_http::server::conjure::FromPlainDecoder,
122            log_as = "workspaceRid",
123            safe
124        )]
125        workspace_rid: super::super::super::super::super::objects::api::rids::WorkspaceRid,
126        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
127        request: super::super::super::super::super::objects::scout::sandbox::api::SetDemoWorkbooksRequest,
128    ) -> Result<(), conjure_http::private::Error>;
129    /// Appends workbooks to the existing demo workbook list. If archiveOnLabelConflict is true,
130    /// existing workbooks with an exact label-set match are archived along with all related
131    /// resources instead of raising an error. The cascade performs a full graph traversal:
132    /// starting from the workbook's data scope (asset RIDs or run RIDs), it alternates between
133    /// discovering runs linked to assets and assets linked to runs until convergence. All
134    /// discovered assets, runs, datasets (from both asset and run data scopes), and events
135    /// (from snapshot refs and from all discovered assets) are then archived. This ensures no
136    /// orphaned resources remain when demo workbooks are replaced. Partial (subset/superset)
137    /// label conflicts always raise an error.
138    #[endpoint(
139        method = POST,
140        path = "/scout/v1/sandbox-workspace/{workspaceRid}/demo-workbooks",
141        name = "addDemoWorkbooks"
142    )]
143    async fn add_demo_workbooks(
144        &self,
145        #[auth]
146        auth_: conjure_object::BearerToken,
147        #[path(
148            name = "workspaceRid",
149            decoder = conjure_http::server::conjure::FromPlainDecoder,
150            log_as = "workspaceRid",
151            safe
152        )]
153        workspace_rid: super::super::super::super::super::objects::api::rids::WorkspaceRid,
154        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
155        request: super::super::super::super::super::objects::scout::sandbox::api::AddDemoWorkbooksRequest,
156    ) -> Result<(), conjure_http::private::Error>;
157}
158/// Service for managing demo workbooks in sandbox workspaces.
159/// All endpoints validate that the provided workspace has the human-readable ID "sandbox".
160#[conjure_http::conjure_endpoints(
161    name = "SandboxWorkspaceService",
162    use_legacy_error_serialization,
163    local
164)]
165pub trait LocalAsyncSandboxWorkspaceService {
166    /// Returns the list of demo workbook RIDs for the given sandbox workspace.
167    #[endpoint(
168        method = GET,
169        path = "/scout/v1/sandbox-workspace/{workspaceRid}/demo-workbooks",
170        name = "getDemoWorkbooks",
171        produces = conjure_http::server::StdResponseSerializer
172    )]
173    async fn get_demo_workbooks(
174        &self,
175        #[auth]
176        auth_: conjure_object::BearerToken,
177        #[path(
178            name = "workspaceRid",
179            decoder = conjure_http::server::conjure::FromPlainDecoder,
180            log_as = "workspaceRid",
181            safe
182        )]
183        workspace_rid: super::super::super::super::super::objects::api::rids::WorkspaceRid,
184    ) -> Result<
185        super::super::super::super::super::objects::scout::sandbox::api::GetDemoWorkbooksResponse,
186        conjure_http::private::Error,
187    >;
188    /// Sets the list of demo workbook RIDs for the given sandbox workspace, replacing any existing entries.
189    #[endpoint(
190        method = PUT,
191        path = "/scout/v1/sandbox-workspace/{workspaceRid}/demo-workbooks",
192        name = "setDemoWorkbooks"
193    )]
194    async fn set_demo_workbooks(
195        &self,
196        #[auth]
197        auth_: conjure_object::BearerToken,
198        #[path(
199            name = "workspaceRid",
200            decoder = conjure_http::server::conjure::FromPlainDecoder,
201            log_as = "workspaceRid",
202            safe
203        )]
204        workspace_rid: super::super::super::super::super::objects::api::rids::WorkspaceRid,
205        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
206        request: super::super::super::super::super::objects::scout::sandbox::api::SetDemoWorkbooksRequest,
207    ) -> Result<(), conjure_http::private::Error>;
208    /// Appends workbooks to the existing demo workbook list. If archiveOnLabelConflict is true,
209    /// existing workbooks with an exact label-set match are archived along with all related
210    /// resources instead of raising an error. The cascade performs a full graph traversal:
211    /// starting from the workbook's data scope (asset RIDs or run RIDs), it alternates between
212    /// discovering runs linked to assets and assets linked to runs until convergence. All
213    /// discovered assets, runs, datasets (from both asset and run data scopes), and events
214    /// (from snapshot refs and from all discovered assets) are then archived. This ensures no
215    /// orphaned resources remain when demo workbooks are replaced. Partial (subset/superset)
216    /// label conflicts always raise an error.
217    #[endpoint(
218        method = POST,
219        path = "/scout/v1/sandbox-workspace/{workspaceRid}/demo-workbooks",
220        name = "addDemoWorkbooks"
221    )]
222    async fn add_demo_workbooks(
223        &self,
224        #[auth]
225        auth_: conjure_object::BearerToken,
226        #[path(
227            name = "workspaceRid",
228            decoder = conjure_http::server::conjure::FromPlainDecoder,
229            log_as = "workspaceRid",
230            safe
231        )]
232        workspace_rid: super::super::super::super::super::objects::api::rids::WorkspaceRid,
233        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
234        request: super::super::super::super::super::objects::scout::sandbox::api::AddDemoWorkbooksRequest,
235    ) -> Result<(), conjure_http::private::Error>;
236}