mirror of
https://github.com/bitwarden/help
synced 2026-01-06 02:23:22 +00:00
Misc 09 13 (#735)
* Azure OIDC fix * create send via cli, setting deletion date by OS examples * comment out sync script per mr. marshall * add adminSettings__deleteTrashDaysAgo to env variables list
This commit is contained in:
committed by
GitHub
parent
516f0f2771
commit
109c743278
@@ -64,23 +64,74 @@ A typical workflow might look something like:
|
||||
3. Use the `encode` command (see [details]({{site.baseurl}}/article/cli/#encode)) to encode the manipulated JSON.
|
||||
4. Use the `create` command to create a Send from the encoded JSON.
|
||||
|
||||
For example:
|
||||
For example, to create a text Send:
|
||||
|
||||
```
|
||||
bw send template send.text | jq '.name="My First Send" | .text.text="Secrets I want to share."' | bw encode | bw send create
|
||||
```
|
||||
|
||||
For example, to create a password-protected file Send:
|
||||
|
||||
```
|
||||
bw send template send.file | jq '.name="My File Send" | .type=1 | .file.fileName="paperwork.png" | .password="p@ssw0rd"' | bw encode | bw send create
|
||||
```
|
||||
|
||||
For example, to create a password-protected file Send with an explicit [deletion date]({{site.baseurl}}/article/send-lifespan/#deletion-date). This example is broken out by operating system due to the way `.deletionDate=` should be specified:
|
||||
|
||||
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link active" id="wintab" data-bs-toggle="tab" data-target="#windows" role="tab" aria-controls="windows" aria-selected="true"><i class="fa fa-windows"></i> Windows</a>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link" id="mactab" data-bs-toggle="tab" data-target="#macos" role="tab" aria-controls="macos" aria-selected="false"><i class="fa fa-apple"></i> macOS</a>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link" id="lintab" data-bs-toggle="tab" data-target="#linux" role="tab" aria-controls="linux" aria-selected="false"><i class="fa fa-linux"></i> Linux</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content" id="clientsContent">
|
||||
<div class="tab-pane show active" id="windows" role="tabpanel" aria-labelledby="wintab">
|
||||
{% capture winfo %}
|
||||
#### Windows
|
||||
|
||||
```
|
||||
$delDate = (Get-Date).AddDays(14) | date -UFormat "%Y-%m-%dT%H:%M:%SZ"
|
||||
|
||||
bw send template send.text | jq ".name=\`"My Send\`" | .text.text=\`"Secrets I want to share.\`" | .password=\`"password\`" | .deletionDate=\`"$delDate\`"" | bw encode | bw send create
|
||||
```
|
||||
|
||||
Notice in this example that the jq invocation must be wrapped in double quotes (`" "`) and use escapes (`\`) for each filter due to a nested `date` variable that configures a `.deletionDate` in the Send.
|
||||
|
||||
{% endcapture %}
|
||||
{{ winfo | markdownify }}
|
||||
</div>
|
||||
<div class="tab-pane" id="macos" role="tabpanel" aria-labelledby="mactab">
|
||||
{% capture minfo %}
|
||||
#### macOS
|
||||
|
||||
```
|
||||
bw send template send.text | jq ".name=\"My Send\" | .text.text=\"Secrets I want to share.\" | .password=\"mypassword\" | .deletionDate=\"$(date -uv+14d + "%Y-%m-%dT%H:%M:%SZ")\"" | bw encode | bw send create
|
||||
```
|
||||
|
||||
{% callout success %}
|
||||
Notice in the final example that the jq invocation must be wrapped in double quotes (`" "`) and use escapes (`\`) for each filter due to a nested `date` variable that configures a `.deletionDate` in the Send.
|
||||
{% endcallout %}
|
||||
Notice in this example that the jq invocation must be wrapped in double quotes (`" "`) and use escapes (`\`) for each filter due to a nested `date` variable that configures a `.deletionDate` in the Send.
|
||||
|
||||
{% endcapture %}
|
||||
{{ minfo | markdownify }}
|
||||
</div>
|
||||
<div class="tab-pane" id="linux" role="tabpanel" aria-labelledby="lintab">
|
||||
{% capture linfo %}
|
||||
#### Linux
|
||||
|
||||
```
|
||||
bw send template send.text | jq ".name=\"My Send\" | .text.text=\"Secrets I want to share.\" | .password=\"mypassword\" | .deletionDate=\"$(date "+%Y-%m-%dT%H:%M:%SZ" -d "+14 days")\"" | bw encode | bw send create
|
||||
```
|
||||
|
||||
Notice in this example that the jq invocation must be wrapped in double quotes (`" "`) and use escapes (`\`) for each filter due to a nested `date` variable that configures a `.deletionDate` in the Send.
|
||||
|
||||
{% endcapture %}
|
||||
{{ linfo | markdownify }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
**Options:**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user