@salesforce/afv-skills 1.24.0 → 1.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/commerce-b2b-open-code-components-replace/SKILL.md +244 -0
- package/skills/commerce-b2b-open-code-components-replace/assets/ootb-to-open-code-mapping.json +66 -0
- package/skills/dx-org-manage/SKILL.md +192 -0
- package/skills/dx-org-manage/examples/README.md +45 -0
- package/skills/dx-org-manage/examples/scratch-orgs/error_no_devhub.json +9 -0
- package/skills/dx-org-manage/examples/scratch-orgs/error_timeout.json +13 -0
- package/skills/dx-org-manage/examples/scratch-orgs/success_definition_file.json +28 -0
- package/skills/dx-org-manage/examples/scratch-orgs/success_edition.json +26 -0
- package/skills/dx-org-manage/examples/scratch-orgs/success_snapshot.json +27 -0
- package/skills/dx-org-manage/examples/snapshots/error_output.json +9 -0
- package/skills/dx-org-manage/examples/snapshots/success_output.json +15 -0
- package/skills/dx-org-manage/references/cli_flags.md +67 -0
- package/skills/dx-org-manage/references/creating-scratch-org.md +164 -0
- package/skills/dx-org-manage/references/creating-snapshot.md +103 -0
- package/skills/dx-org-manage/references/definition_file_options.md +224 -0
- package/skills/dx-org-manage/references/edition_types.md +78 -0
- package/skills/dx-org-manage/references/opening-org.md +160 -0
- package/skills/dx-org-manage/references/snapshot_usage.md +74 -0
- package/skills/dx-org-permission-set-assign/SKILL.md +98 -0
- package/skills/dx-org-permission-set-assign/examples/error_output.json +19 -0
- package/skills/dx-org-permission-set-assign/examples/success_output.json +16 -0
- package/skills/dx-org-permission-set-assign/references/cli_flags.md +68 -0
- package/skills/experience-cms-brand-apply/SKILL.md +1 -1
- package/skills/experience-ui-bundle-app-coordinate/SKILL.md +31 -19
- package/skills/experience-ui-bundle-file-upload-generate/SKILL.md +1 -1
- package/skills/experience-ui-bundle-frontend-generate/implementation/header-footer.md +1 -1
- package/skills/experience-ui-bundle-salesforce-data-access/SKILL.md +336 -581
- package/skills/experience-ui-bundle-salesforce-data-access/references/caching.md +172 -0
- package/skills/experience-ui-bundle-salesforce-data-access/references/graphiti-cli.md +373 -0
- package/skills/experience-ui-bundle-salesforce-data-access/references/graphql-hand-authoring.md +376 -0
- package/skills/experience-ui-bundle-salesforce-data-access/references/migration.md +119 -0
- package/skills/experience-ui-bundle-salesforce-data-access/references/rest-and-integration.md +152 -0
- package/skills/experience-ui-bundle-salesforce-data-access/references/sdk-api.md +217 -0
- package/skills/experience-ui-bundle-salesforce-data-access/scripts/graphql-search.sh +36 -9
- package/skills/platform-agentsetup-categories-fetch/SKILL.md +109 -0
- package/skills/platform-agentsetup-categories-fetch/references/api-response-schema.md +121 -0
- package/skills/platform-custom-object-generate/SKILL.md +62 -7
- package/skills/platform-custom-object-generate/references/description-enrichment.md +125 -0
- package/skills/platform-metadata-retrieve/SKILL.md +121 -0
- package/skills/platform-metadata-retrieve/examples/error_output.json +10 -0
- package/skills/platform-metadata-retrieve/examples/success_output.json +27 -0
- package/skills/platform-metadata-retrieve/references/cli_flags.md +138 -0
- package/skills/platform-metadata-retrieve/references/retrieval_modes.md +181 -0
- package/skills/platform-sharing-rules-generate/SKILL.md +165 -0
- package/skills/platform-sharing-rules-generate/references/rule-types.md +199 -0
- package/skills/platform-tracing-agentforce-configure/SKILL.md +118 -0
- package/skills/platform-tracing-agentforce-configure/assets/AgentforcePlatformTracing-template.xml +4 -0
- package/skills/platform-tracing-configure/SKILL.md +118 -0
- package/skills/platform-tracing-configure/assets/EventSettings-template.xml +4 -0
- package/skills/platform-trust-archive-manage/SKILL.md +25 -11
- package/skills/platform-trust-archive-manage/examples/monitor-failed-jobs.md +2 -2
- package/skills/platform-trust-archive-manage/references/archive-activity-entity.md +1 -1
- package/skills/platform-trust-archive-manage/references/connect-api-operations.md +51 -12
|
@@ -20,33 +20,31 @@ Operate Salesforce Archive (also called Trusted Services Archive) through its Co
|
|
|
20
20
|
|
|
21
21
|
Gather or infer before acting:
|
|
22
22
|
|
|
23
|
-
- **Operation intent**: search
|
|
23
|
+
- **Operation intent**: search (this is also how you view archived records), unarchive, analyze, mask, RTBF, storage check, or job-status/log lookup.
|
|
24
24
|
- **Target sObject** (`sobjectName`): required for search and unarchive.
|
|
25
25
|
- **Filters**: search and unarchive require `sobjectName` + at least one filter.
|
|
26
26
|
- **For log downloads**: the `requestId` (an `ArchiveActivity` Id, `8qv…` prefix) of a completed, log-producing job, and `reportType` = that activity's `Type`.
|
|
27
27
|
|
|
28
28
|
Preconditions (confirm or surface to the user if a call returns a not-permitted error):
|
|
29
|
-
- The **org** must have Salesforce Archive enabled
|
|
29
|
+
- The **org** must have Salesforce Archive enabled. Every operation is gated on this first.
|
|
30
30
|
- Each operation requires a **specific user permission** on top of the org gate — see the Permissions table below. There is no single "archive admin" role; access is per-capability.
|
|
31
31
|
|
|
32
32
|
---
|
|
33
33
|
|
|
34
34
|
## Permissions
|
|
35
35
|
|
|
36
|
-
Every operation first requires the org to have Salesforce Archive enabled
|
|
36
|
+
Every operation first requires the org to have Salesforce Archive enabled. On top of that org gate, each capability is gated by a distinct **user permission**. A call the user isn't permitted for fails with a "not permitted" error — match the error to the missing permission below.
|
|
37
37
|
|
|
38
38
|
| Operation | User permission required |
|
|
39
39
|
|-----------|--------------------------|
|
|
40
|
-
| `search-archived-records`, `get-search-archived-records-next-page` | `ViewSearchPage` (Archive Search) —
|
|
41
|
-
| `search-archived-records-with-sharing-rules`
|
|
40
|
+
| `search-archived-records`, `get-search-archived-records-next-page` | `ViewSearchPage` (Archive Search) — **not** `ViewArchivedRecords` |
|
|
41
|
+
| `search-archived-records-with-sharing-rules` | `ViewArchivedRecords` |
|
|
42
42
|
| `unarchive-records` | `UnarchiveSdk` |
|
|
43
43
|
| `forget-archived-records` (RTBF) + `get-rtbf-status` | `Rtbf` |
|
|
44
44
|
| `mask-archived-records` + `get-masking-status` | `Rtbf` (masking shares the same `Rtbf` permission — **not** a separate entitlement) |
|
|
45
45
|
| `run-analyzer`, `get-analyzer-report`, `get-archive-storage-used` | `ArchiveAnalyzer` |
|
|
46
46
|
| `get-execution-details-stream-url`, `get-failed-records-stream-url` | `ViewActivitiesPage` (Archive Activities) |
|
|
47
47
|
|
|
48
|
-
> Source of truth: the Connect API resource classes in `trusted-services-archive-connect-impl` → `TrustedServicesArchiveSdkImpl` guards → `TrustedServicesArchive.accessChecks.xml`. Note `search-archived-records` routes through `performArchiverGlobalSearch` (gated by `canRunArchiveSearch` = `ViewSearchPage`); the separate Apex-SDK `searchArchivedRecords()` method is gated by `ViewArchivedRecords`, but the **Connect API** search endpoint does not use it.
|
|
49
|
-
|
|
50
48
|
---
|
|
51
49
|
|
|
52
50
|
## Workflow
|
|
@@ -57,7 +55,24 @@ All steps are sequential within a task. Read the referenced file the first time
|
|
|
57
55
|
|
|
58
56
|
2. **For job status / monitoring, read the data model** — when the task involves archive jobs, failures, progress, counts, or logs, load `references/archive-activity-entity.md` for the `ArchiveActivity` field reference and how it links to the Connect API. Query `ArchiveActivity` via SOQL or Connect — **not** Flow. For a worked end-to-end example (find failed/in-progress jobs, then pull their execution-detail and failed-records logs), load `examples/monitor-failed-jobs.md`.
|
|
59
57
|
|
|
60
|
-
3. **Construct and send the call** —
|
|
58
|
+
3. **Construct and send the call** — every operation is a `{method, path, body}` REST call. Send it with whatever Connect/REST API tool your environment provides (an MCP server that invokes Connect/REST APIs, the `sf` CLI, or any REST client). Two path rules are critical (full per-operation contracts are in `references/connect-api-operations.md`):
|
|
59
|
+
|
|
60
|
+
- **The operation names in this skill are NOT URL paths.** `search-archived-records`, `unarchive-records`, etc. are labels; never put them in the path. Use the short literal paths below (each relative to base `/platform/data-resilience/archive`). Sending the operation name as a path segment (e.g. `/…/archive/search-archived-records`) returns **404**.
|
|
61
|
+
- **The path stops at `/platform/data-resilience/archive/…` — there is NO `/connect` segment**, even though this is a Connect API. A **404 / `NOT_FOUND` here means the path is wrong, NOT that Archive is disabled** — fix the path before concluding the add-on is missing.
|
|
62
|
+
|
|
63
|
+
| Operation | Method + Path | Notes |
|
|
64
|
+
|-----------|---------------|-------|
|
|
65
|
+
| search-archived-records | `POST /search` | requires `sobjectName` + ≥1 filter |
|
|
66
|
+
| search next page | `GET /search/next/{scrollId}` | stop when `scroll_id == "-1"` |
|
|
67
|
+
| search with sharing rules | `POST /search/with-sharing-rules` | uses `filtersJson` object map |
|
|
68
|
+
| unarchive-records | `POST /unarchive` | `sobjectName` + filters |
|
|
69
|
+
| run-analyzer / report | `POST /analyzer/run` · `GET /analyzer/report` | |
|
|
70
|
+
| forget / RTBF + status | `POST /rtbf` · `GET /rtbf/{requestId}` | |
|
|
71
|
+
| mask + status | `POST /mask` · `GET /mask/{requestId}` | |
|
|
72
|
+
| storage used | `GET /storage/archive-used` | |
|
|
73
|
+
| execution-detail / failed-records log | `GET /log/execution-details-stream-url` · `GET /log/failed-records-stream-url` | query params `requestId`, `reportType` |
|
|
74
|
+
|
|
75
|
+
With the `sf` CLI, prefix the path with `/services/data/v67.0`; some MCP/REST tools take the bare path and add the version themselves (tool-dependent — see the reference). Then follow the contract: for searches, supply `sobjectName` + ≥1 filter; for date filtering use the plural `dateRanges` array of `{field, from, to}` with full ISO-8601 datetimes.
|
|
61
76
|
|
|
62
77
|
4. **Branch on the right signal** — some operations return HTTP 201 with a body-level success flag (`body.statusCode`, `body.isSuccess`). Read `references/connect-api-operations.md` for which signal to trust per operation; never assume the HTTP status alone means success.
|
|
63
78
|
|
|
@@ -80,12 +95,11 @@ All steps are sequential within a task. Read the referenced file the first time
|
|
|
80
95
|
|
|
81
96
|
| Constraint | Rationale |
|
|
82
97
|
|-----------|-----------|
|
|
83
|
-
| Search & unarchive require `sobjectName` + at least one filter |
|
|
98
|
+
| Search & unarchive require `sobjectName` + at least one filter | An unfiltered request is rejected with "Search must be based on at least 1 field" — a full-object operation is never allowed. |
|
|
84
99
|
| Date filters must be full ISO-8601 datetimes (`2020-01-01T00:00:00Z`) | A date-only value (`2020-01-01`) returns `400 JSON_PARSER_ERROR` because the field is typed `xsd:dateTime`. |
|
|
85
100
|
| Search uses `dateRanges` (plural array); unarchive uses `dateRange` (singular) | They are genuinely different fields on the two endpoints; using the wrong shape silently drops the filter or 400s. |
|
|
86
101
|
| Stop pagination when `scroll_id == "-1"` | Calling `get-search-archived-records-next-page` with `"-1"` returns 500. |
|
|
87
102
|
| Log downloads need a real `ArchiveActivity` Id as `requestId` + that activity's `Type` as `reportType` | The backend resolves the log by the activity record; a mismatched `reportType` returns no log. |
|
|
88
|
-
| Never use the deprecated lookups | `global-search-by-id`, `get-global-search-results`, and `view-archived-records` are deprecated with no successor and currently 500. Use `search-archived-records` (+ next-page) instead. |
|
|
89
103
|
| Excluded objects are not retrievable | `Feed`, `History`, `Relation`, `Share` are not searchable; Files/Attachments are not retrievable via this API — do not promise them. |
|
|
90
104
|
| Query `ArchiveActivity` via SOQL/Connect, never Flow | `ArchiveActivity` has `isProcessEnabled=false`, so a Flow "Get Records" element on it fails with "You can't get ArchiveActivity records in a flow." |
|
|
91
105
|
|
|
@@ -97,7 +111,7 @@ All steps are sequential within a task. Read the referenced file the first time
|
|
|
97
111
|
|-------|------------|
|
|
98
112
|
| Treating HTTP 201 as success | Several operations return 201 with a body-level outcome. Branch on `body.statusCode` (search) or `body.isSuccess` (`with-sharing-rules`), not the HTTP code. |
|
|
99
113
|
| `run-analyzer.isRunning` used as a signal | It is **always** `null`; the endpoint only populates `message`. Poll `get-analyzer-report` to confirm completion instead. |
|
|
100
|
-
| `search-archived-records-with-sharing-rules`
|
|
114
|
+
| `search-archived-records-with-sharing-rules` filters as an array | `filtersJson` must be a JSON-encoded **object map** `{"Field":"Value"}`, not an array of `{field,value}`; the array form returns `isSuccess:false "No valid filters provided"`. |
|
|
101
115
|
| Log `url` treated as present because status is 201 | `get-*-stream-url` returns `{url}`; `url: null` means no log was resolved. Always check `url != null`. |
|
|
102
116
|
| Misreading `get-archive-storage-used` | `usedStorage[]`/`availableStorage[]` are parallel positional arrays: index 0=org DATA, 1=org FILE, 2=archive RECORDS, 3=archive FILE. `availableStorage[2]`/`[3]` are **always 0** (archive tier is unmetered) — that means "not tracked", not "full". |
|
|
103
117
|
| Expecting `ArchiveActivity` in a Flow | It is not Flow-enabled (`isProcessEnabled=false`). Use SOQL/Connect/Reports. |
|
|
@@ -23,13 +23,13 @@ Read each row's `ProgressPercentage`, `SucceededCount`/`FailedCount`, `RootEntit
|
|
|
23
23
|
Take the job's `Id` (`8qv…`) as `requestId` and its `Type` as `reportType`. `{activity.Type}` below is a placeholder for that job's own `Type` field value (e.g. `Archive`, `Purge`, `Unarchive`, `Analyzer`) — substitute the actual value per job; a hardcoded/mismatched `reportType` returns no log.
|
|
24
24
|
|
|
25
25
|
**Execution-detail log:**
|
|
26
|
-
```
|
|
26
|
+
```text
|
|
27
27
|
GET /platform/data-resilience/archive/log/execution-details-stream-url
|
|
28
28
|
?requestId={activity.Id}&reportType={activity.Type}
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
**Failed-records log:**
|
|
32
|
-
```
|
|
32
|
+
```text
|
|
33
33
|
GET /platform/data-resilience/archive/log/failed-records-stream-url
|
|
34
34
|
?requestId={activity.Id}&reportType={activity.Type}
|
|
35
35
|
```
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
| Key prefix | `8qv` (record Ids start `8qv…`) |
|
|
11
11
|
| Owning product | Salesforce Archive (Trusted Services Archive) |
|
|
12
12
|
| Kind | **Standard platform entity** (not a custom object) |
|
|
13
|
-
| License gate | Requires the Trusted Services Archive add-on
|
|
13
|
+
| License gate | Requires the Trusted Services Archive add-on — absent on orgs without the add-on |
|
|
14
14
|
| Name field | Auto-number, mask `ARCV-{0000000000}` |
|
|
15
15
|
| Flow-enabled? | **No** — `isProcessEnabled=false`. A Flow "Get Records" element on it fails: "You can't get ArchiveActivity records in a flow." Query via SOQL / Connect / Reports. |
|
|
16
16
|
|
|
@@ -1,13 +1,54 @@
|
|
|
1
1
|
# Salesforce Archive Connect API — Operations Reference
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Read the operation you need before constructing the call — several contracts are non-obvious.
|
|
4
|
+
|
|
5
|
+
## How to call these operations
|
|
6
|
+
|
|
7
|
+
Every operation is a REST call defined by three things:
|
|
8
|
+
|
|
9
|
+
- **method** — `GET` or `POST` (see the `Method + Path` column below)
|
|
10
|
+
- **path** — the resource path, e.g. `/platform/data-resilience/archive/search`
|
|
11
|
+
- **body** — a JSON object (POST only); GET operations carry their inputs as query-string params and send no body
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
{method} /platform/data-resilience/archive/{operation-path}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The `/platform/...` path *is* the complete resource path — there is **no `/connect` segment** and you do not append the operation name (details below). Use API version `67.0`.
|
|
18
|
+
|
|
19
|
+
**Send it with whatever Connect/REST API tool your environment provides** — an MCP server that invokes Connect/REST APIs, the `sf` CLI, or any REST client. Map the three primitives above to that tool's parameters.
|
|
20
|
+
|
|
21
|
+
**Whether the path needs the `/services/data/v67.0` prefix depends on the tool, not on MCP-vs-CLI** — some tools want the full versioned URL, others take the bare `/platform/...` path and add the version/host themselves. Check the tool's own docs; if a bare path returns `NOT_FOUND`, try the full versioned form (and vice-versa).
|
|
22
|
+
|
|
23
|
+
**If using the `sf` CLI** — supply the **full versioned URL** and pass the body inline. The `--body` flag takes the JSON itself, **not** a filename (a bare filename is sent verbatim → `JSON_PARSER_ERROR`):
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
sf api request rest "/services/data/v67.0/platform/data-resilience/archive/search" \
|
|
27
|
+
--method POST \
|
|
28
|
+
--body '{"sobjectName":"Account","filters":[{"field":"Name","value":"salesforce.com"}],"fields":["Id","Name","Phone"]}' \
|
|
29
|
+
--target-org <org-alias>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**If using an MCP server / other REST client** — map method, path, and body to its parameters (names vary per tool; check its docs). For example, the body for the same search is:
|
|
33
|
+
|
|
34
|
+
```text
|
|
35
|
+
{"sobjectName":"Account","filters":[{"field":"Name","value":"salesforce.com"}],"fields":["Id","Name","Phone"]}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
(For GET operations, append the inputs as query-string params on the path and send no body.)
|
|
39
|
+
|
|
40
|
+
> Two path rules that otherwise surface as a misleading error, **regardless of how you send the call**:
|
|
41
|
+
> - **Use the literal path from the `Method + Path` column below — never build one from the operation name.** The operation identifiers in this doc (`search-archived-records`, `unarchive-records`, …) are *names*, not URL segments. The real path is short and rarely matches the name: `searchArchivedRecords` → `POST /search` (NOT `/search-archived-records`), `unarchiveRecords` → `POST /unarchive`, `getArchiveStorageUsed` → `GET /storage/archive-used`. Synthesizing the path from the operation name (e.g. kebab-casing it and appending it) produces a route that returns **404** even though the operation exists. Always copy the path string verbatim from the table.
|
|
42
|
+
> - **The path stops at `/platform/data-resilience/archive/...`** — there is no `/connect` segment, even though this is a Connect API. Inserting one returns `NOT_FOUND` for the whole namespace, which can read as "Archive is disabled" — it isn't; it's the path.
|
|
4
43
|
|
|
5
44
|
## Operations Summary
|
|
6
45
|
|
|
7
|
-
|
|
46
|
+
The first column is the **operation name** used to refer to each op in this skill — it is **not** part of the path. The method and path to send are in the **Method + Path** column; each path shown (e.g. `POST /search`) is shorthand for `POST /platform/data-resilience/archive/search`.
|
|
47
|
+
|
|
48
|
+
| Operation (name only — NOT a path segment) | Purpose | Method + Path (send THIS) | Verify with |
|
|
8
49
|
|-----------|---------|---------------|-------------|
|
|
9
50
|
| `search-archived-records` | read | `POST /search` | — |
|
|
10
|
-
| `search-archived-records-with-sharing-rules` | read
|
|
51
|
+
| `search-archived-records-with-sharing-rules` | read | `POST /search/with-sharing-rules` | — |
|
|
11
52
|
| `get-search-archived-records-next-page` | read | `GET /search/next/{scrollId}` | — |
|
|
12
53
|
| `run-analyzer` | write | `POST /analyzer/run` | `get-analyzer-report` |
|
|
13
54
|
| `get-analyzer-report` | read | `GET /analyzer/report` | — |
|
|
@@ -20,8 +61,6 @@ All operations are under the base path `/platform/data-resilience/archive/`. Con
|
|
|
20
61
|
| `get-failed-records-stream-url` | read | `GET /log/failed-records-stream-url` | — |
|
|
21
62
|
| `get-archive-storage-used` | read | `GET /storage/archive-used` | — |
|
|
22
63
|
|
|
23
|
-
**Deprecated — do not use** (no successor; currently 500): `global-search-by-id`, `get-global-search-results`, `view-archived-records`. Use `search-archived-records` (+ `get-search-archived-records-next-page`) for all archived-record lookups.
|
|
24
|
-
|
|
25
64
|
### Verify-after-write dependencies
|
|
26
65
|
|
|
27
66
|
```mermaid
|
|
@@ -44,12 +83,12 @@ Search archived records by object, filters, date ranges, and sort.
|
|
|
44
83
|
- `sobjectName` *(string)* — API name of the sObject to search.
|
|
45
84
|
- `filters` *(array)* — Filter conditions, each `{field, value}` where **both are required strings**. `value` is a single string — **not** an array, **not** nullable (null/omitted → `400 "This field may not be null"`). There is **no `operator` field**. **At least 1, up to 6 filters, combined with AND only** (OR is not supported). Example: `[{"field":"Subject","value":"Foo"}]`.
|
|
46
85
|
- `dateRanges` *(array)* — Primary date filter: array of `{field, from, to}`. `from`/`to` must be full ISO-8601 datetime (`"2020-01-01T00:00:00Z"`); date-only → `400 JSON_PARSER_ERROR` (xsd:dateTime). Use the special field `archive_date` to filter by archive date instead of `CreatedDate`/`ModifiedDate`.
|
|
47
|
-
- `dateRange` *(object)* — Optional **singular** convenience range `{field, from, to}`;
|
|
86
|
+
- `dateRange` *(object)* — Optional **singular** convenience range `{field, from, to}`; treated as a one-element `dateRanges`. Same singular shape that `unarchive-records` uses.
|
|
48
87
|
- `fields` *(array)* — Field API names to return.
|
|
49
88
|
- `pageSize` *(integer)* — Records per page; default 25, max 1000.
|
|
50
89
|
- `sortDirection` *(string)* — `asc`/`desc`, case-insensitive, default `asc`; an invalid value → 400.
|
|
51
90
|
|
|
52
|
-
**Output**: HTTP **201**, `body = { records[], total_result_count, scroll_id }`, `body.statusCode = 200`, `errorMessage` null on success. **Branch on `body.statusCode`, not the HTTP code** — once past
|
|
91
|
+
**Output**: HTTP **201**, `body = { records[], total_result_count, scroll_id }`, `body.statusCode = 200`, `errorMessage` null on success. **Branch on `body.statusCode`, not the HTTP code** — once past request validation the response is always 200/201 even on logical failure, with the error in `errorMessage` + `statusCode`.
|
|
53
92
|
|
|
54
93
|
**Excluded objects**: `Feed`, `History`, `Relation`, `Share` are not searchable; Files/Attachments are not retrievable.
|
|
55
94
|
|
|
@@ -66,7 +105,7 @@ Read records inline from each response. If `body.scroll_id != "-1"`, call `get-s
|
|
|
66
105
|
|
|
67
106
|
## search-archived-records-with-sharing-rules (`POST /search/with-sharing-rules`)
|
|
68
107
|
|
|
69
|
-
Archive search
|
|
108
|
+
Archive search that enforces the user's sharing rules. (There is no `/search/related` endpoint — this is the operation that takes the JSON filter map.) Gated by the **`ViewArchivedRecords`** user permission (unlike plain `search-archived-records`, which uses `ViewSearchPage`).
|
|
70
109
|
|
|
71
110
|
**Required**: `objectName`, `filtersJson`.
|
|
72
111
|
|
|
@@ -83,7 +122,7 @@ Archive search **optimized for Agentforce agents**. (There is no `/search/relate
|
|
|
83
122
|
|
|
84
123
|
## run-analyzer (`POST /analyzer/run`) + get-analyzer-report (`GET /analyzer/report`)
|
|
85
124
|
|
|
86
|
-
`run-analyzer` triggers the analyzer; HTTP 201, output `message` *(string, human-readable status)*. **`isRunning` is ALWAYS `null`** —
|
|
125
|
+
`run-analyzer` triggers the analyzer; HTTP 201, output `message` *(string, human-readable status)*. **`isRunning` is ALWAYS `null`** — only `message` is populated; never branch on `isRunning`. Poll `get-analyzer-report` to confirm completion. Non-destructive / idempotent.
|
|
87
126
|
|
|
88
127
|
`get-analyzer-report` returns `body` with: `topRecords[]` (`{objectName, objectLabel, objectIcon, size, count, usagePercent}` per archivable sObject), `topFiles[]` (parallel shape for files), `fileGeneralStorage`/`dataGeneralStorage` (`{storageUsed, storageRemaining, usagePercent}`), and `createdDateReport` (`"DD/MM/YYYY HH:MM:SS"`).
|
|
89
128
|
|
|
@@ -96,7 +135,7 @@ Restore archived records back into live storage by criteria.
|
|
|
96
135
|
**Inputs**:
|
|
97
136
|
- `sobjectName` *(string)* — sObject whose records to unarchive.
|
|
98
137
|
- `filters` *(array)* — criteria identifying which archived records to restore.
|
|
99
|
-
- `dateRange` *(object)* — optional **SINGULAR** range `{field, from, to}` (
|
|
138
|
+
- `dateRange` *(object)* — optional **SINGULAR** range `{field, from, to}` (unlike `/search`, which uses the plural `dateRanges`); full ISO-8601 datetimes. Omit to unarchive by filters alone.
|
|
100
139
|
|
|
101
140
|
**Caps**: ≤1000 matched records (else not processed); ≤50 unarchive requests/hour/org. Restores the **whole archived hierarchy** of each match. Requires the **`UnarchiveSdk`** user permission (on top of org-level Archive enablement).
|
|
102
141
|
|
|
@@ -122,7 +161,7 @@ Submits a PII-masking (anonymization) request — irreversibly replaces detected
|
|
|
122
161
|
|
|
123
162
|
**Behavior**: permanent; one-time per record (re-requests on an already-masked record are ignored); shares the 10,000/day RTBF rate limit; **PII fields are auto-detected** (you cannot choose them); records under legal hold / retention lock are excluded; cascades to child records. Available **only via this API** (not in the Archive UI).
|
|
124
163
|
|
|
125
|
-
**Permission**: gated by the **`Rtbf`** user permission — the SAME permission as RTBF
|
|
164
|
+
**Permission**: gated by the **`Rtbf`** user permission — the SAME permission as RTBF, not a separate masking entitlement.
|
|
126
165
|
|
|
127
166
|
**Output**: HTTP 201, `body.request_id` *(UUID)*. Poll `get-masking-status` (path param `requestId`); status reaches **HANDLED** when complete. **Rollback**: none — anonymization is permanent.
|
|
128
167
|
|
|
@@ -154,4 +193,4 @@ Returns `body.usedStorage[4]` (doubles — per-tier bytes consumed) and `body.av
|
|
|
154
193
|
| 2 | Archive-tier **RECORDS** storage |
|
|
155
194
|
| 3 | Archive-tier **FILE** storage |
|
|
156
195
|
|
|
157
|
-
**`availableStorage[2]` and `[3]` (the archive tier) are ALWAYS 0**:
|
|
196
|
+
**`availableStorage[2]` and `[3]` (the archive tier) are ALWAYS 0**: archive storage is unmetered, so a `0` there means "not tracked", NOT "no space left". Only `availableStorage[0]`/`[1]` (live org data/file remaining) are real. All values rounded to 2 decimals.
|