Testing APIs
Connections
Set a system up once — base URL, sign-in, headers — and every request that starts with its variable uses it. Browse SAP SuccessFactors and other OData services.
A connection is a system set up once: its base URL, its sign-in and any headers it needs. Each connection has a variable, like {{successFactors}}. Any request whose address starts with it is sent to that system with that sign-in — you never type the sign-in into a request again, and changing it on the connection changes it for every request.
GET {{successFactors}}/User?$top=10
GET {{successFactors}}/EmpJob?$filter=userId eq 'admin'
Open Connections in the sidebar (or Connections in the command palette).
Add a connection
Add connection asks what to connect:
| Type | For |
|---|---|
| SAP SuccessFactors | Its OData API. The base URL is your data center's API server with /odata/v2 (from SAP's list of API servers, or your admin). For Basic sign-in the user name is user@companyID; for OAuth pick OAuth 2.0 → SAML 2.0 bearer. |
| Salesforce | Your org's address (My Domain), like https://yourcompany.my.salesforce.com, and OAuth 2.0 — see Salesforce below for the app to create in Salesforce. |
| NetSuite | Your account ID (the address and the sign-in realm follow) and token-based sign-in (OAuth 1.0) or OAuth 2.0 — see NetSuite below. |
| OData service | SAP Gateway, Microsoft Dynamics, any OData v2 or v4 API. The base URL is the service root — the part before /$metadata. |
| REST API | Any HTTP API: the part every address starts with, like https://api.example.com/v1. |
| Practice company | A pretend OData company built into the app (Departments, Employees, Products), to try it all without a system of your own. |
| Practice Salesforce org | A pretend Salesforce org built into the app (Accounts, Contacts, Users), signed in with OAuth client credentials. |
| Practice NetSuite account | A pretend NetSuite account built into the app (customers, employees, items), signed in with OAuth client credentials. |
Then:
- Name and Variable — the variable follows the name (SuccessFactors →
{{successFactors}}) until you change it. Two connections can't share one. - Sign-in — any type a request can use: Bearer, Basic, API key, OAuth 2.0 (client credentials, password, authorization code, JWT bearer, SAML bearer), OAuth 1.0, Digest, NTLM, AWS Signature, JWT.
{{names}}in it come from the active environment, so one connection can serve test and production. - Headers — sent with every request through it.
Test connection checks it: for OData it reads $metadata and says what it found — Connected — OData 2.0, 960 objects, 420 ms; for a REST API it checks the server answers and takes the sign-in. If it fails it says why, with what to try. Secrets are kept encrypted with your other secrets, in this project.
Use it in requests
Start the address with the variable and leave Auth on From folder or connection — the default for new requests. The Auth tab then says Uses the Basic of the connection SuccessFactors. A request that picks its own auth type keeps it; a folder's auth, when the request is inside one that sets some, comes before the connection's.
It works everywhere a request runs: Send, collection runs, performance tests, the command line and the AI agent tools.
Browse an OData system, a Salesforce org or a NetSuite account
Click a connection — its name or the arrow — to open its objects under it (they start closed when the app starts, and stay as you left them while it's open), with the system's own names (Hire date for hireDate), and a search for long lists. ⋯ → Read objects again after the system changes. A Salesforce org's objects and a NetSuite account's record types come first; each one's fields are read when you open it. Pick an object:
- Records — the first 50, with the total. Condition adds a filter (a field, is, contains, starts with, more than… and a value; every condition must hold). All fields shows everything the service sends; pick fields there (search, Pick these for every match, Clear to go back to all) to ask for only those — that's
$select. Sort orders them. Rows sets how many come at a time (10 to 1,000, or All, page by page, which follows the service's own next-page links); Load more gets the next ones. Total count asks for the number of matching records too —$inlinecount=allpagesin OData v2,$count=truein v4; turn it off for very large objects if it's slow. Values are written the way the service expects — type a date as2024-01-31. Filter as text shows the$filterthe conditions make, to edit by hand — foror, brackets or functions. Copy URL copies the address that was asked, readable. - Related data: under Related in the column picker, open a link (Department → Departments) and tick its fields. They come as columns of their own — Department / Department name — and the app adds the
$expand(in OData v2Department/Namegoes in$select; in v4 it'sDepartment($select=Name)). A link to many records shows how many came. One level of links for now. - Click a record to see all of it on the right, what links brought included, as a tree — and copy it as JSON.
- Fields — each field's label, type, length, and whether it's the key, required, or can't be filtered or sorted on. Under Links, open one to see the linked object's fields, or Open it.
- Query — the query as text, to change and run, with the raw answer and Copy URL. Fill Records from this turns it back into conditions and columns.
Paste URL (next to Open as request) takes an address of this service — from Postman, a browser or a colleague — and fills the builder: the object, fields, related fields, conditions (or the filter as text, if it's more than conditions can show), sort and rows.
Open as request opens the query as {{variable}}/… in a new tab — signed in through the connection, ready to check, save or load-test. Save as request keeps it straight away, in the folder you pick, for collection runs, performance tests and CI.
Export (under the records) saves them as CSV or Excel, with the columns shown (a NetSuite lookup's name gets a column of its own). Choose the records loaded, or all matching: the app reads the rest page by page — Reading 1,200 of 5,000…, with Stop — up to 50,000 records; narrow a bigger set with conditions. Excel keeps numbers as numbers and shows each field's label; CSV uses the field names, which suit another tool.
Salesforce
Salesforce signs apps in with OAuth 2.0. Since Spring '26, new orgs create an External Client App for that (Connected Apps can no longer be created).
In Salesforce — Setup → External Client App Manager → New External Client App:
- Turn on OAuth. Callback URL:
http://127.0.0.1:53682/callback— the app's sign-in comes back to this computer. (Change the port in the connection's Redirect URL if it's taken, and here too.) - OAuth scopes: Manage user data via APIs (api) and Perform requests at any time (refresh_token, offline_access).
- Keep Require Proof Key for Code Exchange (PKCE) on.
- Save, then copy the app's Consumer Key and Consumer Secret (in its OAuth settings).
In APITestCenter — Add connection → Salesforce: type your org's address; the Authorization URL and Token URL fill in from it. Paste the consumer key as Client ID and the secret as Client secret, and leave Scope empty — Salesforce uses the scopes set in the app (client credentials doesn't accept one at all). Then Sign in in the browser: Salesforce asks you to log in and allow the app, and the app keeps the token — and a refresh token, so you stay signed in — encrypted on this computer. Test connection then lists the org's objects.
Server to server (no browser): in the External Client App, enable the Client Credentials Flow and choose the user it runs as; in the connection, pick Grant type → Client credentials.
What's different from OData:
- Queries are SOQL: the Query tab shows the SOQL the builder writes (
SELECT Name, Owner.Name FROM Account WHERE Industry = 'Banking' LIMIT 50), and Paste URL takes SOQL or an address with?q=. - Related fields are a record's parents — Owner, Account — written
Owner.Name. - Total count is a
SELECT COUNT()of its own; All, page by page follows Salesforce's next-page links. - Requests go to
{{salesforce}}/services/data/v62.0/query?q=…— the newest API version your org offers.
NetSuite
NetSuite's REST web services sign in two ways; both are set on the connection once.
Token-based (TBA) — OAuth 1.0, signed with HMAC-SHA256:
- In NetSuite, Setup → Company → Enable Features → SuiteCloud: turn on Token-Based Authentication and REST Web Services.
- Setup → Integration → Manage Integrations → New: tick Token-Based Authentication. Save, and copy the consumer key and secret (shown once).
- Setup → Users/Roles → Access Tokens → New: the integration, a user and a role that may use REST web services. Save, and copy the token ID and secret (shown once).
- In APITestCenter — Add connection → NetSuite: type the account ID (
1234567, or1234567_SB1for a sandbox; Setup → Company → Company Information). The base URL (https://1234567-sb1.suitetalk.api.netsuite.com) and the realm fill in. Paste the four keys into the Sign-in tab.
OAuth 2.0 — pick it on the Sign-in tab instead: the token URL is <base URL>/services/rest/auth/oauth2/v1/token; browser sign-in (authorization code) or a certificate (client credentials) as the integration record allows.
Test connection lists the account's record types (from the REST metadata catalog). Open one and its fields are read from a one-row SuiteQL sample, with labels from the catalog where the names match.
What's different:
- Queries are SuiteQL: the Query tab shows the SuiteQL the builder writes (
SELECT * FROM customer WHERE companyname LIKE 'North%'), and Paste URL takes SuiteQL. Check boxes are'T'and'F'; dates are writtenTO_DATE('2024-01-31', 'YYYY-MM-DD'). - SuiteQL is sent as POST
…/services/rest/query/v1/suiteql?limit=50&offset=0with{ "q": "…" }and the headerPrefer: transient— Open as request makes exactly that, signed in through the connection. - Names for IDs (on by default, next to Total count): a lookup field — a customer's sales rep, a transaction's entity, a status — holds the internal ID of another record. The builder asks NetSuite for that record's name too, with
BUILTIN.DF(salesrep) AS salesrep_name, and the table shows both:Asha Rao · 500. A condition on a lookup compares its name (BUILTIN.DF(salesrep) LIKE 'Asha%') or its ID — pick in the condition. Each name is a lookup on NetSuite's side, so turn it off for big, raw queries. Lookups are found in the record type's schema (the Fields tab marks them); a custom field the schema doesn't describe as one shows its ID only — writeBUILTIN.DF(field)in the Query tab for those. - At most 1,000 rows a page, and 100,000 in all for one query; All, page by page asks for 1,000 at a time.