Metadata
Metadata as code: retrieve source files, deploy (or check-only) as an async job, deploy history
Component types, source paths and limits of the source format
Authorization
AuthorizationRequiredBearer <token>Session token from the SalesOS web app.
In: header
X-API-Key<token>API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.
In: header
Retrieve metadata as source files (all types, chosen types or chosen components)
Authorization
AuthorizationRequiredBearer <token>Session token from the SalesOS web app.
In: header
X-API-Key<token>API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.
In: header
Request Body
application/jsonRequiredtypesarray<string>Types to retrieve (default: all)
componentsarray<object>Only these components Items: at most 600.
projectNamestringProject name written into salesos.project.json
100Queue a deploy (or checkOnly validation) of source files; poll GET /metadata/deploys/:id
Authorization
AuthorizationRequiredBearer <token>Session token from the SalesOS web app.
In: header
X-API-Key<token>API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.
In: header
Request Body
application/jsonRequiredprojectobjectParsed salesos.project.json
filesRequiredobjectComponent files relative to the project sourceDir: { "objects/invoice.object.json": "" }
checkOnlybooleanValidate only; nothing is written
falseactivatebooleanNew custom actions, hooks and functions start active (functions only when every declared secret is set)
falsedestructivearray<object>Components to delete from the target (destructive changes) Items: at most 200.
labelstringShown in deploy history
200runTestsstringTests to run before anything is written: NONE, SPECIFIED (the package's tests) or ALL (the package's plus the tests earlier deploys left in the org). A failing test fails the deploy.
"SPECIFIED"Value in: "NONE" | "SPECIFIED" | "ALL"Header Parameters
Idempotency-KeystringUnique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.
255Deploy history, newest first (server-paged)
Authorization
AuthorizationRequiredBearer <token>Session token from the SalesOS web app.
In: header
X-API-Key<token>API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.
In: header
Query Parameters
pagestring1limitstring20statusstring"QUEUED" | "RUNNING" | "SUCCEEDED" | "FAILED" | "CANCELED"One deploy: status, progress and the result per component
Authorization
AuthorizationRequiredBearer <token>Session token from the SalesOS web app.
In: header
X-API-Key<token>API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.
In: header
Path Parameters
idRequiredstringRe-run a deploy's package as check-only against the org as it is now
Authorization
AuthorizationRequiredBearer <token>Session token from the SalesOS web app.
In: header
X-API-Key<token>API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.
In: header
Path Parameters
idRequiredstringHeader Parameters
Idempotency-KeystringUnique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.
255The org policy for deploy tests (component types that need a covering test)
Authorization
AuthorizationRequiredBearer <token>Session token from the SalesOS web app.
In: header
X-API-Key<token>API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.
In: header
Require a covering test for every function or flow a deploy creates or changes
Authorization
AuthorizationRequiredBearer <token>Session token from the SalesOS web app.
In: header
X-API-Key<token>API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.
In: header
Request Body
application/jsonRequiredrequireTestsForRequiredarray<string>Component types a deploy may only create or change when a test in the run covers each one
Cancel a queued deploy
Authorization
AuthorizationRequiredBearer <token>Session token from the SalesOS web app.
In: header
X-API-Key<token>API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.
In: header
Path Parameters
idRequiredstringHeader Parameters
Idempotency-KeystringUnique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.
255