Skip to content

Commit c945a00

Browse files
authored
Merge branch 'main' into DEVX-2749-part4
2 parents ea118e3 + 6e436f5 commit c945a00

11 files changed

+703
-136
lines changed

docs/api-testing/integrations/apitesting-saucectl-integration.md

+52-136
Original file line numberDiff line numberDiff line change
@@ -95,142 +95,6 @@ git clone [email protected]:saucelabs/saucectl-apitest-example.git
9595

9696
## `saucectl` Commands
9797

98-
### Vault
99-
100-
Commands for interacting with API Testing project vaults.
101-
102-
#### Get Vault
103-
104-
It prints the vault content as json to the standard output stream (stdout). Use `--project` to specify the project by its name or run without `--project` to choose from a list of projects.
105-
106-
```bash
107-
saucectl apit vault get [--project "project_name"] [flags]
108-
```
109-
110-
Check the list of [Global Flags](#global-flags) you can use.
111-
112-
---
113-
114-
#### Get Variable
115-
116-
Get a variable value from a project's vault. Use `--project` to specify the project by its name or run without `--project` to choose from a list of projects.
117-
118-
```bash
119-
saucectl apit vault get-variable "variable_name" [--project "project_name"] [flags]
120-
```
121-
122-
Check the list of [Global Flags](#global-flags) you can use.
123-
124-
---
125-
126-
#### Set Variable
127-
128-
Set/update a variable in a project's vault. If a `variable_name` is already in the vault, it is updated with the new one; otherwise, it adds a new variable. Use `--project` to specify the project by its name or run without `--project` to choose from a list of projects.
129-
130-
```bash
131-
saucectl apit vault set-variable "variable_name" "variable_value" [--project "project_name" ][flags]
132-
```
133-
134-
Check the list of [Global Flags](#global-flags) you can use.
135-
136-
---
137-
138-
#### Get Snippet
139-
140-
Get a snippet from a project's vault. Use `--project` to specify the project by its name or run without `--project` to choose from a list of projects.
141-
142-
```bash
143-
saucectl apit vault get-snippet "snippet_name" [--project "project_name"] [flags]
144-
```
145-
146-
Check the list of [Global Flags](#global-flags) you can use.
147-
148-
---
149-
150-
#### Set Snippet
151-
152-
Set/update a snippet in a project's vault. If a `snippet_name` is already in the vault, it is updated with the new one; otherwise, it adds a new snippet. You can set a snippet's value by providing a path to a file defining the snippet or using "-" to read from the standard input stream (stdin). Use `--project` to specify the project by its name or run without `--project` to choose from a list of projects.
153-
154-
```bash
155-
saucectl apit vault set-snippet "variable_name" FILE_NAME [--project "project_name"] [flags] # from a file
156-
```
157-
158-
or
159-
160-
```bash
161-
cat "file_name" | saucectl apit vault set-snippet "variable_name" - [--project "project_name"] [flags] #from stdin
162-
```
163-
164-
Check the list of [Global Flags](#global-flags) you can use.
165-
166-
---
167-
168-
#### List Files
169-
170-
<p><span className="sauceGreen">From version 0.147.0</span></p>
171-
172-
Get a list of files from a project's vault drive. Use `--project` to specify the project by its name or run without `--project` to choose from a list of projects.
173-
174-
```bash
175-
saucectl apit vault list-files [--project "project_name"] [flags]
176-
```
177-
178-
Check the list of [Global Flags](#global-flags) you can use.
179-
180-
---
181-
182-
#### Upload File
183-
184-
<p><span className="sauceGreen">From version 0.147.0</span></p>
185-
186-
Upload a file in a project's vault drive. Use `--project` to specify the project by its name or run without `--project` to choose from a list of projects.
187-
188-
```bash
189-
saucectl apit vault upload-file "filename" [--project "project_name"] [flags]
190-
```
191-
192-
Check the list of [Global Flags](#global-flags) you can use.
193-
194-
---
195-
196-
#### Download File
197-
198-
<p><span className="sauceGreen">From version 0.147.0</span></p>
199-
200-
Download a file from a project's vault drive. Use `--project` to specify the project by its name or run without `--project` to choose from a list of projects.
201-
202-
```bash
203-
saucectl apit vault download-file "filename" [--project "project_name"] [flags]
204-
```
205-
206-
Check the list of [Global Flags](#global-flags) you can use.
207-
208-
---
209-
210-
#### Delete File
211-
212-
<p><span className="sauceGreen">From version 0.147.0</span></p>
213-
214-
Delete a file in a project's vault drive. Use `--project` to specify the project by its name or run without `--project` to choose from a list of projects.
215-
216-
```bash
217-
saucectl apit vault delete-file "filename" [--project "project_name"] [flags]
218-
```
219-
220-
Check the list of [Global Flags](#global-flags) you can use.
221-
222-
---
223-
224-
#### Global Flags
225-
226-
| Key | Shorthand | Description |
227-
| ------------------------- | --------- | ------------------------------------------------------------------------------- |
228-
| `--help` | -h | Help for the related command. |
229-
| `--region` | -r | The Sauce Labs region. Options: us-west-1, eu-central-1. (default "us-west-1"). |
230-
| `--disable-usage-metrics` | | Disable usage metrics collection. |
231-
| `--no-color ` | | Disable colorized output. |
232-
| `--verbose ` | | Turn on verbose logging. |
233-
23498
### Run
23599

236100
Use the `run` command to execute the tests. The console displays the executing tests, distinguishing which mode is running. The results are available immediately following test completion in your [Sauce Labs account](https://app.saucelabs.com/api-testing/).
@@ -240,3 +104,55 @@ saucectl run
240104
```
241105

242106
You can refer to the [Command Reference](/dev/cli/saucectl/run/) for the complete list of options for the `run` command and [saucectl YAML Configuration](/api-testing/integrations/yaml) for more configuration options.
107+
108+
109+
### Vault
110+
111+
Supported `saucectl vault` commands:
112+
113+
<table id="table-cli">
114+
<thead>
115+
<tr>
116+
<th>Operation</th>
117+
<th>Description</th>
118+
</tr>
119+
</thead>
120+
<tbody>
121+
<tr>
122+
<td><a href="/dev/cli/saucectl/apit/vault/get">Get Vault</a></td>
123+
<td>Print vault's content in JSON format to the stdout.</td>
124+
</tr>
125+
<tr>
126+
<td><a href="/dev/cli/saucectl/apit/vault/get-variable">Get a Variable</a></td>
127+
<td>Get a variable value from a project's vault.</td>
128+
</tr>
129+
<tr>
130+
<td><a href="/dev/cli/saucectl/apit/vault/set-variable">Set a Variable</a></td>
131+
<td>Set/update a variable in a project's vault.</td>
132+
</tr>
133+
<tr>
134+
<td><a href="/dev/cli/saucectl/apit/vault/get-snippet">Get a Snippet</a></td>
135+
<td>Get a snippet from a project's vault.</td>
136+
</tr>
137+
<tr>
138+
<td><a href="/dev/cli/saucectl/apit/vault/set-snippet">Set a Snippet</a></td>
139+
<td>Set/update a snippet in a project's vault.</td>
140+
</tr>
141+
<tr>
142+
<td><a href="/dev/cli/saucectl/apit/vault/list-files">List Files</a></td>
143+
<td>List files stored in the project's vault drive.</td>
144+
</tr>
145+
<tr>
146+
<td><a href="/dev/cli/saucectl/apit/vault/upload-file">Upload a File</a></td>
147+
<td>Upload a file to a project's vault drive.</td>
148+
</tr>
149+
<tr>
150+
<td><a href="/dev/cli/saucectl/apit/vault/download-file">Download a File</a></td>
151+
<td>Download a file from a project's vault drive.</td>
152+
</tr>
153+
<tr>
154+
<td><a href="/dev/cli/saucectl/apit/vault/delete-file">Delete a File</a></td>
155+
<td>Remove a file from a project's vault drive.</td>
156+
</tr>
157+
</tbody>
158+
</table>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
id: delete-file
3+
title: saucectl apit vault delete-file
4+
sidebar_label: delete-file
5+
---
6+
7+
Removes a file from a project's vault drive.
8+
9+
## Usage
10+
11+
```bash
12+
saucectl apit vault delete-file "filename" [flags]
13+
```
14+
15+
## Available Options
16+
17+
<table id="table-cli">
18+
<thead>
19+
<tr>
20+
<th width="30%">Flag</th>
21+
<th width="10%">Shorthand</th>
22+
<th>Description</th>
23+
</tr>
24+
</thead>
25+
<tbody>
26+
<tr>
27+
<td><span className="t-cli"><a href="#--project">--project</a></span></td>
28+
<td><span className="t-cli">None</span></td>
29+
<td>Select a vault by project name.</td>
30+
</tr>
31+
<tr>
32+
<td><span className="t-cli"><a href="#--region">--region</a></span></td>
33+
<td><span className="t-cli">-r</span></td>
34+
<td>The Sauce Labs region. Options are <code>us-west-1</code> (default) and <code>eu-central-1</code>.</td>
35+
</tr>
36+
</tbody>
37+
</table>
38+
39+
## Options Details
40+
41+
### <span className="cli">--project</span>
42+
43+
<div className="cli-desc">
44+
<p><small>| OPTIONAL | STRING |</small></p>
45+
46+
Specifies the project by its name using `--project`, or omits `--project` to select from a list of available projects.
47+
48+
```bash
49+
saucectl apit vault delete-file "filename" --project "project_name"
50+
```
51+
52+
</div>
53+
54+
### <span className="cli">--region</span>
55+
56+
<div className="cli-desc">
57+
<p><small>| OPTIONAL | STRING |</small></p>
58+
59+
The Sauce Labs region. Options are `us-west-1` (default) and `eu-central-1`.
60+
61+
**Shorthand:** `-r <region>`
62+
63+
```bash
64+
saucectl apit vault delete-file "filename" --region us-west-1
65+
```
66+
67+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
id: download-file
3+
title: saucectl apit vault download-file
4+
sidebar_label: download-file
5+
---
6+
7+
Downloads a file from a project's vault drive.
8+
9+
## Usage
10+
11+
```bash
12+
saucectl apit vault download-file "filename" [flags]
13+
```
14+
15+
## Available Options
16+
17+
<table id="table-cli">
18+
<thead>
19+
<tr>
20+
<th width="30%">Flag</th>
21+
<th width="10%">Shorthand</th>
22+
<th>Description</th>
23+
</tr>
24+
</thead>
25+
<tbody>
26+
<tr>
27+
<td><span className="t-cli"><a href="#--project">--project</a></span></td>
28+
<td><span className="t-cli">None</span></td>
29+
<td>Select a vault by project name.</td>
30+
</tr>
31+
<tr>
32+
<td><span className="t-cli"><a href="#--region">--region</a></span></td>
33+
<td><span className="t-cli">-r</span></td>
34+
<td>The Sauce Labs region. Options are <code>us-west-1</code> (default) and <code>eu-central-1</code>.</td>
35+
</tr>
36+
</tbody>
37+
</table>
38+
39+
## Options Details
40+
41+
### <span className="cli">--project</span>
42+
43+
<div className="cli-desc">
44+
<p><small>| OPTIONAL | STRING |</small></p>
45+
46+
Specifies the project by its name using `--project`, or omits `--project` to select from a list of available projects.
47+
48+
```bash
49+
saucectl apit vault download-file "filename" --project "project_name"
50+
```
51+
52+
</div>
53+
54+
### <span className="cli">--region</span>
55+
56+
<div className="cli-desc">
57+
<p><small>| OPTIONAL | STRING |</small></p>
58+
59+
The Sauce Labs region. Options are `us-west-1` (default) and `eu-central-1`.
60+
61+
**Shorthand:** `-r <region>`
62+
63+
```bash
64+
saucectl apit vault download-file "filename" --region us-west-1
65+
```
66+
67+
</div>

0 commit comments

Comments
 (0)