Skip to content

reference

Run local Salesforce API routes ​

glade server starts local Salesforce-style HTTP routes backed by the same runtime used by the CLI. Use it for local integration tests, tools, and development loops that need REST-style org behavior without a live Salesforce org.

Checked HTTP endpoint versions are 60.0, 65.0, 66.0, 67.0, and 68.0; the default is 65.0. These are independent of the v0.3.0 support window: Apex 62.0-68.0, LWC and Visualforce 59.0-68.0. Execute Anonymous accepts source API 65.0, 66.0, 67.0, and 68.0.

Start the server ​

Use an ephemeral in-memory org:

bash
glade server --addr 127.0.0.1:8080

Load project metadata and persist data to SQLite:

bash
glade server --project . --db .glade/refinement-local.sqlite --addr 127.0.0.1:8080

Use strict or permissive limit behavior for supported execute paths:

bash
glade server --project . --limit-mode strict

Seed local data ​

Prepare a disposable local database before starting the server. db reset clears existing rows at the specified path; inspect or export valuable data before choosing that reset step:

bash
glade db reset --db .glade/refinement-local.sqlite --json
glade db seed --wizard --db .glade/refinement-local.sqlite --project . data/file-rows.json
glade db seed --db .glade/refinement-local.sqlite --project . --progress data/file-rows.json
glade db inspect --db .glade/refinement-local.sqlite --json

Local identity ​

The default local Organization ID is 00D000000000mH2. The seeded current user is 005000000000001, with time zone America/Los_Angeles; Automated Process uses a separate non-counter ID and UTC. These are local fixtures, not hosted org identities. Imported/configured identities are preserved where provided. Set org.domainUrl in glade.yml for the canonical org origin returned by URL.getOrgDomainUrl(). It is independent of the server bind address and incoming request origin. See configuration.

REST routes ​

The server exposes a Salesforce-style baseline for local work: API discovery, object describe and CRUD-style record operations, SOQL query execution, limits and record counts, source-backed Tooling metadata reads, virtual schema metadata queries, Composite sObject inserts, Composite Batch and Tree local requests, Composite Graph local requests over supported local subrequests, Bulk API v2 simple scalar query job create/status/whole-result CSV routes, layout/default-value metadata, metadata job status, and execute-anonymous routes where supported by the runtime.

Check what Glade runs locally before relying on live auth, Bulk API locator paging, Streaming, Pub/Sub, GraphQL, live metadata deploy/retrieve, or Tooling APIs outside the checked local source/schema metadata baseline.

AreaEndpointStatus
API discovery/services/data/supported
Describe/services/data/vXX.X/sobjects/<Object>/describesupported baseline
Query/services/data/vXX.X/query?q=...supported baseline
SObject CRUD/services/data/vXX.X/sobjects/<Object>/<Id>supported baseline
Record counts/services/data/vXX.X/limits/recordCount?sObjects=Account,Contactsupported baseline
Execute AnonymousTooling executeAnonymous routesupported where runtime supports code
SOAP Apex executeAnonymous/services/Soap/s/vXX.X/<OrgId>supported for sf apex run
Partner SOAP describe/upsert/services/Soap/u/vXX.Xsupported baseline for local data import tools
Tooling source metadataTooling ApexClass, ApexTrigger, ApexPage, ApexComponent, StaticResource, CustomObject, CustomField, Layout, CompactLayout, RecordType, and ValidationRule query/read pathssupported local baseline
Tooling schema metadataTooling EntityDefinition, EntityParticle, FieldDefinition, and RelationshipDomain query pathssupported local baseline
Composite sObject insert/services/data/vXX.X/composite/sobjectssupported baseline
Composite Batch/services/data/vXX.X/composite/batchsupported local subrequests
Composite Tree/services/data/vXX.X/composite/tree/<Object>supported local tree requests
Composite Graph/services/data/vXX.X/composite/graphsupported local subrequests
Bulk API v1 ingest/services/async/vXX.X/job...supported insert/upsert CSV baseline
Bulk API v2 query/services/data/vXX.X/jobs/query and /resultssupported simple scalar local query whole-result CSV
Layout and default metadatalocal layout/default-value REST routessupported local metadata baseline
Metadata job statuslocal metadata job status routessupported local status baseline
Glade reset endpoints/services/data/vXX.X/glade/reset and scoped reset routessupported local-only baseline

Example request:

bash
curl -s http://127.0.0.1:8080/services/data/
curl -s http://127.0.0.1:8080/services/data/v60.0/sobjects/Account/describe
curl -s 'http://127.0.0.1:8080/services/data/v60.0/query?q=SELECT+Id,Name+FROM+Account'
curl -s 'http://127.0.0.1:8080/services/data/v60.0/limits/recordCount?sObjects=Account'

Example query response:

json
{
  "totalSize": 1,
  "done": true,
  "records": [
    {
      "attributes": {
        "type": "Account"
      },
      "Name": "Twin Lakes"
    }
  ]
}

Local server only

The local API server does not implement full OAuth or production Salesforce authentication. Do not expose it to untrusted networks unless an authenticating reverse proxy stands in front of it.

Try it

Use the playground when you want the same local org ideas with a browser UI: Use the Local Playground.

Glade is an independent project and is not affiliated with, sponsored by, or endorsed by Salesforce. Salesforce and Apex are trademarks of Salesforce, Inc. · Contributors · Security · Releases · Apache-2.0