Skip to content

Salesforce dependency index

Every Salesforce endpoint, OAuth flow, header, response shape, error code and limit this library depends on. Review it against each Salesforce release; anything here that changes or is retired is a potential break. The source of truth is salesforce-dependencies.yaml, which tests/unit/test_salesforce_index.py checks against the code.

Last full review: not yet reviewed against a release. Checked is the date an entry was last compared with the official documentation.

API versions

Item Value
Default API version (DEFAULT_API_VERSION) 68.0
Oldest supported version (MIN_API_VERSION) 59.0
End-of-life policy Salesforce API retirement

REST endpoints

Paths are relative to /services/data/vXX.X/ unless they start with /services/; {} is a value filled in at runtime.

Path Methods Used by Docs Checked
query GET sf.query, sf.query_iter, sf.count, sf.query_one, sf.query_first (?q=); sf.explain (?explain=, Salesforce Beta) docs
queryAll GET sf.query(..., include_deleted=True) docs
query/{} GET sf.query_more, sf.query_iter (nextRecordsUrl, absolute path) docs
search GET sf.search (?q= SOSL) docs
parameterizedSearch POST sf.parameterized_search docs
graphql POST sf.graphql, sf.graphql_iter (body {query, variables}; errors[] on 200 OK) docs
ui-api/records/{} GET sf.ui.record() (fields, layoutTypes, modes) docs 2026-11-12
ui-api/object-info/{} GET sf.ui.object_info() (describe cache; revalidated with If-None-Match: If-Modified-Since is ignored, V62) docs
ui-api/object-info/{}/picklist-values/{} GET sf.ui.picklist_values() (describe cache) docs
ui-api/record-defaults/create/{} GET sf.ui.create_defaults() (recordTypeId) docs
ui-api/record-defaults/clone/{} GET sf.ui.clone_defaults() docs
ui-api/list-info/{} GET sf.ui.list_views() (V60) docs
ui-api/list-records/{}/{} GET sf.ui.list_records() (pageSize 1-2,000, pageToken) docs
limits GET sf.limits docs
sobjects GET sf.describe_global() (If-Modified-Since → 304) docs
sobjects/{} GET sobject.metadata() docs
sobjects/{}/ POST sobject.create() docs
sobjects/{}/describe GET sobject.describe() (If-Modified-Since → 304) docs
sobjects/{}/{} GET, PATCH, DELETE sobject.get/update/delete() by id docs
sobjects/{}/{}/{} GET, PATCH sobject.get_by_external_id/upsert() (300 on multiple matches) docs
sobjects/{}/updated/ GET sobject.updated(start, end) docs
sobjects/{}/deleted/ GET sobject.deleted(start, end) docs
sobjects/ContentVersion POST sf.files.upload() (multipart: entity_content JSON + VersionData file; 2 GB max) docs
sobjects/ContentVersion/{}/VersionData GET sf.files.download() (streamed), sf.files.download_bytes() docs
sobjects/Attachment/{}/Body GET sf.files.download_attachment() docs
sobjects/ContentDocumentLink POST sf.files.link(), sf.files.upload(share_type=/visibility=) docs
jobs/{} POST sf.bulk.ingest() (jobs/ingest), sf.bulk.query() and sf.bulk.start_query() (jobs/query, operation query or queryAll) docs 2026-11-10
jobs/ingest/{} GET, PATCH job.wait(), job.refresh(), sf.bulk.ingest_job() (job info); upload close and job.abort() (state UploadComplete / Aborted) docs
jobs/ingest/{}/batches PUT sf.bulk.ingest() upload (text/csv; charset=UTF-8, streamed, at most 100 MB raw per job) docs
jobs/ingest/{}/{} GET job.successful_results(), job.failed_results(), job.unprocessed_records() (CSV) docs
jobs/query/{} GET, PATCH sf.bulk.query() and job.wait() polling, sf.bulk.query_job() (job info); job.abort() (state Aborted) docs
jobs/query/{}/results GET sf.bulk.query(), job.rows() and job.pages() result pages (?locator=&maxRecords=, Sforce-Locator; same API version or 409) docs
jobs/query/{}/resultPages GET sf.bulk.query(parallel_downloads>1) (API 58.0+, up to five result URLs per response) docs 2026-11-10
composite/sobjects POST, PATCH, DELETE collections.create/update/delete() docs
composite/sobjects/{} POST collections.retrieve() docs
composite/sobjects/{}/{} PATCH collections.upsert() docs
tooling/query GET sf.tooling.query, sf.tooling.query_iter (?q=); the capture_log flow of execute_anonymous docs
tooling/query/{} GET sf.query_more (Tooling cursors), sf.tooling.query_iter (nextRecordsUrl, absolute path) docs
tooling/sobjects GET sf.tooling.describe_global (describe cache, own key) docs
tooling/sobjects/{} GET, POST, PATCH, DELETE sf.tooling.sobject(name) methods (the sf.sobject paths with a tooling/ prefix); TraceFlag and DebugLevel in execute_anonymous(capture_log=True) docs
tooling/executeAnonymous/ GET sf.tooling.execute_anonymous (?anonymousBody=; never resent, ADR 0001) docs
tooling/sobjects/ApexLog/{}/Body GET sf.tooling.execute_anonymous(capture_log=True) docs
tooling/runTestsAsynchronous/ POST sf.tooling.run_tests_async docs
tooling/completions GET sf.tooling.completions (?type=apex|visualforce) docs
composite POST composite.builder().send() docs
composite/graph POST composite.graph().send() docs
composite/batch POST composite.batch().send() docs
composite/tree/{} POST composite.tree() docs
analytics/reports GET sf.reports.recent (up to 200 recently viewed reports; all reports need SOQL on Report) docs 2026-11-12
analytics/reports/{} GET, POST sf.reports.run (?includeDetails=; POST with reportMetadata.reportFilters; read, resent) docs
analytics/reports/{}/describe GET sf.reports.describe docs
analytics/reports/{}/instances POST sf.reports.run_async (creates a report instance; never resent) docs
analytics/reports/{}/instances/{} GET sf.reports.instance (polled; status New, Running, Success or Error) docs
analytics/dashboards/{} GET, PUT sf.reports.dashboards.get (GET), sf.reports.dashboards.refresh (PUT; never resent) docs 2026-11-12
metadata/deployRequest POST sf.metadata.deploy() (multipart: json deployOptions + file zip; never resent) docs
metadata/deployRequest/{} GET, POST, PATCH sf.metadata.deploy_status() (GET ?includeDetails=true; polled with wait=True); sf.metadata.quick_deploy() (POST validatedDeployRequestId; starts a deployment; never resent); sf.metadata.cancel_deploy() (PATCH deployResult.status=Canceling; never resent) docs
/services/Soap/m/{} POST sf.metadata.retrieve() (retrieve + checkRetrieveStatus), list_metadata() (listMetadata), describe_metadata() (describeMetadata); SOAP Metadata API, SessionHeader = OAuth token docs
/services/oauth2/userinfo GET sf.auth.userinfo() docs

OAuth

Hosts: login = https://login.salesforce.com; test = https://test.salesforce.com; my_domain = https://.my.salesforce.com (required for client credentials).

Endpoint Methods Used by Docs Checked
/services/oauth2/authorize GET Web server flow start (code_challenge, S256, state, scope, prompt) docs
/services/oauth2/token POST Every grant type below (form-encoded)
/services/oauth2/revoke POST sf.auth.revoke() docs
/services/oauth2/introspect POST sf.auth.introspect(), expiry="introspect" (reads active, exp) docs
grant_type Used by Docs Checked
authorization_code WebServerFlow.exchange_code (+ PKCE) docs
refresh_token WebServerFlow refresh docs
client_credentials ClientCredentials docs
urn:ietf:params:oauth:grant-type:jwt-bearer JwtBearer (RS256; aud = login/test/My Domain) docs

Behaviour relied on:

  • Token success body: access_token and instance_url (required), id (identity URL; org and user ids parsed from /id//), issued_at (ms), signature, scope, optional refresh_token (a new one means rotation; saved before use).
  • No expires_in: expiry is learnt from a 401, refresh_ahead, or introspection exp.
  • Errors are {error, error_description}. invalid_grant → ReauthorizationRequired; the text "token request is already being processed" → bounded back-off (3 POSTs).
  • API calls answer an expired token with 401 and INVALID_SESSION_ID (or OAuth invalid_token): one refresh, one resend, then SessionExpired.

Headers

Header Direction Used for Docs Checked
Sforce-Call-Options request client_name= → client=; default_namespace= → defaultNamespace= (joined with '; ') docs
Sforce-Mru request update_mru= → updateMru=true/false (API 60.0+) on sobject create, get, get_by_external_id, update, upsert docs
Sforce-Query-Options request page_size= → batchSize=200..2000 docs
Sforce-Auto-Assign request assignment_rule_id= (TRUE / FALSE / rule id) docs
Sforce-Duplicate-Rule-Header request duplicate_rules=DuplicateRules(...) → allowSave, includeRecordDetails, runAsCurrentUser (allow_save= deprecated); sObject + Collections create/update/upsert docs 2026-11-13
If-Modified-Since request describe revalidation, get(if_modified_since=) → 304 docs
If-None-Match request describe cache revalidation with a stored ETag (UI API object-info and picklist-values, V62) → 304 docs
If-Unmodified-Since request update(if_unmodified_since=) → 412 docs
Content-Encoding request gzip for bodies over 64 KiB (Collections) docs
Sforce-Limit-Info response api-usage=N/M; api-bursts=N/M → sf.usage, budgets docs
Sforce-Locator response next Bulk query result page; the string null on the last page docs
Sforce-NumberOfRecords response ResultPage.size: the number of rows in a Bulk query result page docs
Sforce-Request-Id response error.request_id, sf.request events
Retry-After response 429 / REQUEST_LIMIT_EXCEEDED back-off (seconds or HTTP date)
Warning response 299 - "" (deprecated API version) → warnings.warn(text, SalesforceWarning) once per text per client family; sf_warning on sf.request docs 2026-11-13
Last-Modified response describe cache revalidation
ETag response describe cache revalidation (stored, sent back as If-None-Match)

Response shapes

Resource Relied on
Query / QueryAll / query more records, totalSize, done, nextRecordsUrl
Search searchRecords
sObject Collections writes list, one per input in order, id, success, errors[], created
sObject Collections retrieve list, one per id in order, null when not found
Upsert by external id id, created, 201 = created, 204/200 = updated, 300 = list of matching URLs
Limits {name: {Max, Remaining, ...}}
GraphQL data, errors[]: message, locations, path, extensions.ErrorType, connections: edges[].node, pageInfo {hasNextPage, endCursor}
UI API record: apiName, id, fields {Name: {value, displayValue}}, childRelationships, recordTypeId, eTag, lastModifiedDate, systemModstamp, list-info: lists[] {apiName, id, label, url}, pageSize 20, nextPageToken, list-records: records, count, pageSize, currentPageToken, nextPageToken (null on the last page), picklist-values: picklistFieldValues {field: {values[] {label, value, validFor}, defaultValue, controllerValues}}, errors: REST error body; unknown object 403 INSUFFICIENT_ACCESS
Report run / report instance attributes, allData, hasDetailRows, factMap {'<row>!<col>': {aggregates[], rows[].dataCells[]}}, groupingsDown/groupingsAcross.groupings[] {key, value, groupings}, reportMetadata {reportFormat, detailColumns, aggregates, groupingsDown, groupingsAcross}, attributes.status (instances), empty matrix cells sent with a zero count, currency detail cell {amount, currency}; currency aggregate a number
Dashboard results / refresh attributes, dashboardMetadata, componentData[] {componentId, reportResult (null before the first refresh), status {refreshStatus, componentDataStatus}}, refresh: 201 {statusUrl}; 409 CONFLICT while running, 403 FORBIDDEN within a minute
REST error body list of {message, errorCode or statusCode, fields}, extras such as duplicateResult
OAuth error body error, error_description

Error codes

errorCode Error class
MALFORMED_QUERY MalformedQuery
INVALID_QUERY_LOCATOR MalformedQuery
INVALID_QUERY_FILTER_OPERATOR MalformedQuery
MALFORMED_SEARCH MalformedQuery
INVALID_SEARCH MalformedQuery
INVALID_FIELD InvalidField
INVALID_FIELD_FOR_INSERT_UPDATE InvalidField
INVALID_FIELD_WHEN_USING_TEMPLATE InvalidField
INVALID_TYPE InvalidType
NOT_FOUND NotFound
ENTITY_IS_DELETED NotFound
INSUFFICIENT_ACCESS Forbidden
INSUFFICIENT_ACCESS_OR_READONLY Forbidden
INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY Forbidden
API_DISABLED_FOR_ORG Forbidden
API_CURRENTLY_DISABLED Forbidden
FUNCTIONALITY_NOT_ENABLED Forbidden
FIELD_CUSTOM_VALIDATION_EXCEPTION ValidationRuleFailed
REQUIRED_FIELD_MISSING RequiredFieldMissing
DUPLICATES_DETECTED DuplicateDetected
INVALID_CROSS_REFERENCE_KEY InvalidReference
FIELD_INTEGRITY_EXCEPTION InvalidReference
STRING_TOO_LONG StringTooLong
INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST InvalidPicklistValue
UNABLE_TO_LOCK_ROW RowLocked
CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY RecordSaveBlocked
CANNOT_EXECUTE_FLOW_TRIGGER FlowFailed
APEX_FAILED ApexActionFailed
STORAGE_LIMIT_EXCEEDED StorageLimitExceeded
REQUEST_LIMIT_EXCEEDED RequestLimitExceeded
INVALID_SESSION_ID SessionExpired
SERVER_UNAVAILABLE ServerError
APEX_ERROR ApexError
UNSUPPORTED_API_VERSION UnsupportedApiVersion

Also relied on: ALL_OR_NONE_OPERATION_ROLLED_BACK (skipped when picking the primary error of an all_or_none batch); PROCESSING_HALTED (Composite subrequest rolled back or skipped because another one failed; skipped by CompositeResult.raise_for_errors()); BATCH_PROCESSING_HALTED (Batch subrequest skipped after an earlier failure with haltOnError; skipped by CompositeResult.raise_for_errors()). HTTP statuses: 300, 304, 401, 403, 404, 409, 410, 412, 414, 420, 428, 429, 431, 500, 502, 503, 504.

Limits and sizes

Name Value
collection_write_chunk 200
collection_read_chunk 2000
query_batch_size [200, 2000]
record_id_lengths [15, 18]
gzip_threshold_bytes 65536
composite_subrequests 25
graph_subrequests 500
batch_subrequests 25
tree_records 200