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