Last modified by Dennis Segebarth on 2024/10/02 18:38

From version 1.2
edited by Susan Evans
on 2023/07/10 22:14
Change comment: (Autosaved)
To version 1.3
edited by Susan Evans
on 2023/07/10 22:16
Change comment: (Autosaved)

Summary

Details

Page properties
Content
... ... @@ -268,10 +268,119 @@
268 268   --help Show this message and exit.
269 269  {{/code}}
270 270  
271 +=== Examples ===
271 271  
273 +List attributes from a given Project by providing the Project Code at the prompt. In this example, “cli” is the corresponding Project Code:
272 272  
275 +{{code language="none"}}
276 +$ pilotcli file attribute-list
277 +ProjectCode: cli
273 273  
279 +Manifest1
280 +--------------------------------------------------------------------------
281 +| Attribute Name | Type | Value | Optional |
282 +--------------------------------------------------------------------------
283 +| attr1 | multiple_choice | a1,a2,a3,a4,a5 | False |
284 +--------------------------------------------------------------------------
285 +| attr2 | text | None | False |
286 +--------------------------------------------------------------------------
287 +| attr3 | multiple_choice | t1,t2,t3,t4,t5 | True |
288 +--------------------------------------------------------------------------
274 274  
290 +Manifest2
291 +--------------------------------------------------------------------------
292 +| Attribute Name | Type | Value | Optional |
293 +--------------------------------------------------------------------------
294 +| attr1 | multiple_choice | a1,a2,a3,a4 | True |
295 +--------------------------------------------------------------------------
296 +| attr2 | text | None | False |
297 +--------------------------------------------------------------------------
298 +| attr3 | multiple_choice | t1,t2,t3 | True |
299 +--------------------------------------------------------------------------
300 +All Attributes fetched successfully.
301 +{{/code}}
302 +
303 +List attributes from given a Project and provide the Project Code “cli” as an option in the same line {{code}}-p cli{{/code}}:
304 +
305 +{{code language="none"}}
306 +$ pilotcli file attribute-list -p cli
307 +
308 +Manifest1
309 +--------------------------------------------------------------------------
310 +| Attribute Name | Type | Value | Optional |
311 +--------------------------------------------------------------------------
312 +| attr1 | multiple_choice | a1,a2,a3,a4,a5 | False |
313 +--------------------------------------------------------------------------
314 +| attr2 | text | None | False |
315 +--------------------------------------------------------------------------
316 +| attr3 | multiple_choice | t1,t2,t3,t4,t5 | True |
317 +--------------------------------------------------------------------------
318 +
319 +Manifest2
320 +--------------------------------------------------------------------------
321 +| Attribute Name | Type | Value | Optional |
322 +--------------------------------------------------------------------------
323 +| attr1 | multiple_choice | a1,a2,a3,a4 | True |
324 +--------------------------------------------------------------------------
325 +| attr2 | text | None | False |
326 +--------------------------------------------------------------------------
327 +| attr3 | multiple_choice | t1,t2,t3 | True |
328 +--------------------------------------------------------------------------
329 +All Attributes fetched successfully.
330 +{{/code}}
331 +
332 +== Command: **attribute-export** ==
333 +
334 +* **Options**: -p ~-~-project-code, -n ~-~-attribute-name
335 +* **Usage**: Export an attribute template as JSON-file from a given Project
336 +* (((
337 +**Prerequisite**:
338 +
339 +* User login is required, otherwise an error is returned: "The current login session is invalid. Please login to continue."
340 +* Project must be accessible to the user, otherwise an error is returned: "Project Code not found in list. Please verify and try again."
341 +* Requires the Project code, which can be retrieved via pilotcli project list.
342 +* Requires the Attribute template name. If the attribute template name does not exist or is spelled incorrectly, an error is returned: "Attribute 'sample-template' not found in Project. Please verify and try again."
343 +* pilotcli must have the permission to write a file in the directory, otherwise an error is returned.
344 +)))
345 +
346 +{{code language="none"}}
347 +$ pilotcli file attribute-export --help
348 +Usage: pilotcli file attribute-export [OPTIONS]
349 +
350 + Export attribute template from a given Project.
351 +
352 +Options:
353 + -p, --project-code TEXT Project Code
354 + -n, --attribute-name TEXT Attribute Template Name
355 + --help Show this message and exit.
356 +{{/code}}
357 +
358 +=== Examples ===
359 +
360 +Export an attribute template from a given Project. The user is prompted to provide the Project Code (“cli”) and the Attribute Template Name (“Manifest1”):
361 +
362 +{{code language="none"}}
363 +$ pilotcli file attribute-export
364 +ProjectCode: cli
365 +AttributeName: Manifest1
366 +
367 +Manifest1
368 +--------------------------------------------------------------------------
369 +| Attribute Name | Type | Value | Optional |
370 +--------------------------------------------------------------------------
371 +| attr1 | multiple_choice | a1,a2,a3,a4,a5 | False |
372 +--------------------------------------------------------------------------
373 +| attr2 | text | None | False |
374 +--------------------------------------------------------------------------
375 +| attr3 | multiple_choice | t1,t2,t3,t4,t5 | True |
376 +--------------------------------------------------------------------------
377 +Template saved successfully: cli_Manifest1_template.json
378 +Attribute definition saved successfully: cli_Manifest1_definition.json
379 +{{/code}}
380 +
381 +Export an attribute template from a given Project using options to provide both the Project Code {{/code}}(-p cli){{/code}} and the Attribute Template Name (-n Manifest1), “cli” and “Manifest1” in this case, respectively:
382 +
383 +
275 275  ----
276 276  
277 277  -