You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add E2E shell tests with SLAS auto-tenant creation and job body support (#27)
* e2e shell script testing
* fix issues with ods timing and general error logging in json mode
* handle ods create output
* better structured logging in ods create
* support raw request for job run for system jobs
* fix e2e test; valid site archive fixture
* updating docs and skills for new job run capabilities
* slas should create tenant if doesn't exist
* fixing site import for site catalog; e2e tests updated; new workflow
* linting; restore deletion
* more lint
Copy file name to clipboardExpand all lines: docs/cli/jobs.md
+16-1Lines changed: 16 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,9 +27,12 @@ In addition to [global flags](./index#global-flags):
27
27
|`--wait`, `-w`| Wait for job to complete |`false`|
28
28
|`--timeout`, `-t`| Timeout in seconds when waiting | No timeout |
29
29
|`--param`, `-P`| Job parameter in format "name=value" (repeatable) ||
30
+
|`--body`, `-B`| Raw JSON request body (for system jobs with non-standard schemas) ||
30
31
|`--no-wait-running`| Do not wait for running job to finish before starting |`false`|
31
32
|`--show-log`| Show job log on failure |`true`|
32
33
34
+
Note: `--param` and `--body` are mutually exclusive.
35
+
33
36
### Examples
34
37
35
38
```bash
@@ -42,13 +45,25 @@ b2c job run my-custom-job --wait
42
45
# Execute with timeout
43
46
b2c job run my-custom-job --wait --timeout 600
44
47
45
-
# Execute with parameters
48
+
# Execute with parameters (standard jobs)
46
49
b2c job run my-custom-job -P "SiteScope={\"all_storefront_sites\":true}" -P OtherParam=value
47
50
48
51
# Output as JSON
49
52
b2c job run my-custom-job --wait --json
50
53
```
51
54
55
+
### System Jobs with Custom Request Bodies
56
+
57
+
Some system jobs (like search indexing) use non-standard request schemas that don't follow the `parameters` array format. Use `--body` to provide a raw JSON request body:
58
+
59
+
```bash
60
+
# Run search index job for specific sites
61
+
b2c job run sfcc-search-index-product-full-update --wait --body '{"site_scope":["RefArch","SiteGenesis"]}'
62
+
63
+
# Run search index job for a single site
64
+
b2c job run sfcc-search-index-product-full-update --wait --body '{"site_scope":["RefArch"]}'
65
+
```
66
+
52
67
### Authentication
53
68
54
69
This command requires OAuth authentication with OCAPI permissions for the `/jobs` resource.
- If `--secret` is not provided for a private client, one will be generated
151
152
- The generated secret is only shown once during creation
152
153
- Use `--default-scopes` for common shopper API access scopes
154
+
- By default, the tenant is automatically created if it doesn't exist. Use `--no-create-tenant` to disable this behavior if you prefer to manage tenants separately
0 commit comments