Skip to content

Commit 905040a

Browse files
committed
docs(cli): add search-jobs command to CLI references navigation
1 parent 1435931 commit 905040a

File tree

7 files changed

+244
-0
lines changed

7 files changed

+244
-0
lines changed

docs/cli/references/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Most commands require that the user first [authenticate](quickstart#connect-to-s
1818
* [`repos`](references/repos)
1919
* [`scout`](references/scout)
2020
* [`search`](references/search)
21+
* [`search-jobs`](references/search-jobs)
2122
* [`serve-git`](references/serve-git)
2223
* [`snapshot`](references/snapshot)
2324
* [`teams`](references/teams)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# `src search-jobs`
2+
3+
## Usage
4+
5+
```
6+
'src search-jobs' is a tool that manages search jobs on a Sourcegraph instance.
7+
8+
Usage:
9+
10+
src search-jobs command [command options]
11+
12+
The commands are:
13+
14+
cancel cancels a search job by ID
15+
create creates a search job
16+
delete deletes a search job by ID
17+
get gets a search job by ID
18+
list lists search jobs
19+
```
20+
21+
## Sub-Commands
22+
23+
* [`cancel`](search-jobs/cancel)
24+
* [`create`](search-jobs/create)
25+
* [`delete`](search-jobs/delete)
26+
* [`get`](search-jobs/get)
27+
* [`list`](search-jobs/list)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# `src search-jobs cancel`
2+
3+
## Flags
4+
5+
| Name | Description | Default Value |
6+
|------|-------------|---------------|
7+
| `-dump-requests` | Log GraphQL requests and responses to stdout | `false` |
8+
| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | `false` |
9+
| `-id` | ID of the search job to cancel | |
10+
| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | `false` |
11+
| `-trace` | Log the trace ID for requests. [See docs](/admin/observability/tracing) | `false` |
12+
| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph | `true` |
13+
14+
## Usage
15+
16+
```
17+
Usage of 'src search-jobs cancel':
18+
-dump-requests
19+
Log GraphQL requests and responses to stdout
20+
-get-curl
21+
Print the curl command for executing this query and exit (WARNING: includes printing your access token!)
22+
-id string
23+
ID of the search job to cancel
24+
-insecure-skip-verify
25+
Skip validation of TLS certificates against trusted chains
26+
-trace
27+
Log the trace ID for requests. See https://sourcegraph.com/docs/admin/observability/tracing
28+
-user-agent-telemetry
29+
Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default true)
30+
31+
Examples:
32+
33+
Cancel a search job:
34+
35+
$ src search-jobs cancel -id=123
36+
```
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# `src search-jobs create`
2+
3+
## Flags
4+
5+
| Name | Description | Default Value |
6+
|------|-------------|---------------|
7+
| `-dump-requests` | Log GraphQL requests and responses to stdout | `false` |
8+
| `-f` | Format for the output using Go text/template syntax | `\{\{\.ID\}\}: \{\{\.Creator.Username\}\} \{\{\.State\}\} (\{\{\.Query\}\})` |
9+
| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | `false` |
10+
| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | `false` |
11+
| `-query` | Search query (required) | |
12+
| `-trace` | Log the trace ID for requests. [See docs](/admin/observability/tracing) | `false` |
13+
| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph | `true` |
14+
## Usage
15+
16+
```
17+
Usage of 'src search-jobs create':
18+
-dump-requests
19+
Log GraphQL requests and responses to stdout
20+
-f string
21+
Format for the output, using the syntax of Go package text/template. (e.g. "{{.ID}}: {{.Creator.Username}} ({{.Query}})" or "{{.|json}}") (default "{{.ID}}: {{.Creator.Username}} {{.State}} ({{.Query}})")
22+
-get-curl
23+
Print the curl command for executing this query and exit (WARNING: includes printing your access token!)
24+
-insecure-skip-verify
25+
Skip validation of TLS certificates against trusted chains
26+
-query string
27+
Search query
28+
-trace
29+
Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing
30+
-user-agent-telemetry
31+
Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default true)
32+
33+
Examples:
34+
35+
Create a search job:
36+
37+
$ src search-jobs create -query "repo:^github\.com/sourcegraph/sourcegraph$ sort:indexed-desc"
38+
```
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# `src search-jobs delete`
2+
3+
## Flags
4+
5+
| Name | Description | Default Value |
6+
|------|-------------|---------------|
7+
| `-dump-requests` | Log GraphQL requests and responses to stdout | `false` |
8+
| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | `false` |
9+
| `-id` | ID of the search job to delete | |
10+
| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | `false` |
11+
| `-trace` | Log the trace ID for requests. [See docs](https://docs.sourcegraph.com/admin/observability/tracing) | `false` |
12+
| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph | `true` |
13+
14+
## Usage
15+
16+
17+
18+
```
19+
Usage of 'src search-jobs delete':
20+
-dump-requests
21+
Log GraphQL requests and responses to stdout
22+
-get-curl
23+
Print the curl command for executing this query and exit (WARNING: includes printing your access token!)
24+
-id string
25+
ID of the search job to delete
26+
-insecure-skip-verify
27+
Skip validation of TLS certificates against trusted chains
28+
-trace
29+
Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing
30+
-user-agent-telemetry
31+
Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default true)
32+
33+
Examples:
34+
35+
Delete a search job by ID:
36+
37+
$ src search-jobs delete U2VhcmNoSm9iOjY5
38+
39+
```
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# `src search-jobs get`
2+
3+
## Flags
4+
5+
| Name | Description | Default Value |
6+
|------|-------------|---------------|
7+
| `-dump-requests` | Log GraphQL requests and responses to stdout | `false` |
8+
| `-f` | Format for the output using Go text/template syntax | `\{\{\.ID\}\}: \{\{\.Creator.Username\}\} \{\{\.State\}\} (\{\{\.Query\}\})` |
9+
| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | `false` |
10+
| `-id` | ID of the search job | |
11+
| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | `false` |
12+
| `-trace` | Log the trace ID for requests. [See docs](/admin/observability/tracing) | `false` |
13+
| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph | `true` |
14+
15+
## Usage
16+
17+
18+
19+
20+
## Usage
21+
22+
```
23+
Usage of 'src search-jobs get':
24+
-dump-requests
25+
Log GraphQL requests and responses to stdout
26+
-f string
27+
Format for the output, using the syntax of Go package text/template. (e.g. "{{.ID}}: {{.Creator.Username}} ({{.Query}})" or "{{.|json}}") (default "{{.ID}}: {{.Creator.Username}} {{.State}} ({{.Query}})")
28+
-get-curl
29+
Print the curl command for executing this query and exit (WARNING: includes printing your access token!)
30+
-id string
31+
ID of the search job
32+
-insecure-skip-verify
33+
Skip validation of TLS certificates against trusted chains
34+
-trace
35+
Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing
36+
-user-agent-telemetry
37+
Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default true)
38+
39+
Examples:
40+
41+
Get a search job by ID:
42+
43+
$ src search-jobs get U2VhcmNoSm9iOjY5
44+
45+
```
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# `src search-jobs list`
2+
3+
## Flags
4+
5+
| Name | Description | Default Value |
6+
|------|-------------|---------------|
7+
| `-asc` | Sort search jobs in ascending order | `false` |
8+
| `-dump-requests` | Log GraphQL requests and responses to stdout | `false` |
9+
| `-f` | Format for the output using Go text/template syntax | `\{\{\.ID\}\}: \{\{\.Creator.Username\}\} \{\{\.State\}\} (\{\{\.Query\}\})` |
10+
| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | `false` |
11+
| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | `false` |
12+
| `-limit` | Limit the number of search jobs returned | `10` |
13+
| `-order-by` | Sort search jobs by a field | `CREATED_AT` |
14+
| `-trace` | Log the trace ID for requests. [See docs](/admin/observability/tracing) | `false` |
15+
| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph | `true` |
16+
17+
## Usage
18+
19+
```
20+
Usage of 'src search-jobs list':
21+
-asc
22+
Sort search jobs in ascending order
23+
-dump-requests
24+
Log GraphQL requests and responses to stdout
25+
-f string
26+
Format for the output, using the syntax of Go package text/template. (e.g. "{{.ID}}: {{.Creator.Username}} ({{.Query}})" or "{{.|json}}") (default "{{.ID}}: {{.Creator.Username}} {{.State}}")
27+
-get-curl
28+
Print the curl command for executing this query and exit (WARNING: includes printing your access token!)
29+
-insecure-skip-verify
30+
Skip validation of TLS certificates against trusted chains
31+
-limit int
32+
Limit the number of search jobs returned (default 10)
33+
-order-by string
34+
Sort search jobs by a field (default "CREATED_AT")
35+
-trace
36+
Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing
37+
-user-agent-telemetry
38+
Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default true)
39+
40+
Examples:
41+
42+
List all search jobs:
43+
44+
$ src search-jobs list
45+
46+
List all search jobs in ascending order:
47+
48+
$ src search-jobs list --asc
49+
50+
Limit the number of search jobs returned:
51+
52+
$ src search-jobs list --limit 5
53+
54+
Order search jobs by a field (must be one of: QUERY, CREATED_AT, STATE):
55+
56+
$ src search-jobs list --order-by QUERY
57+
58+
```

0 commit comments

Comments
 (0)