Any REST or SOAP system, without code
How to connect a system SourceLace has no ready-made connector for, when it has a REST API (with or without an OpenAPI document) or a SOAP web service (with a WSDL). An admin describes the API on Manage sources; nobody writes or runs any code. For systems with no web API at all, build your own connector instead.
Status: Preview. New, offered for pilots and provided as is. Neither kind has been used with a customer's live system yet.
At a glance
| Connects through | Sign-in | Network | Status | First test question | |
|---|---|---|---|---|---|
| Any REST API | The API's own REST endpoints, from its OpenAPI document or endpoints an admin lists | Personal sign-in with oauth; shared account otherwise |
Allow SourceLace's IP addresses, if the API limits them | Preview | Test connection on Manage sources, then "Which operations does rest:billing offer?" |
| Any SOAP web service | The service's SOAP 1.1 or 1.2 endpoint, from its WSDL | Personal sign-in with oauth; shared account otherwise |
Allow SourceLace's IP addresses, if the service limits them | Preview | Test connection, then "Which operations does soap:customers offer?" |
Add each source with the usual steps. The network answers are explained in What your network needs. If the first test question fails, the error message tells you what to fix: look it up under When something goes wrong below.
How it works
- REST (
rest): every operation in the API's description becomes an object. People (and their AI) find operations with search, see each one's parameters, and read with a query that names an operation and its parameters, in therest_jsonlanguage:{"operation": "listInvoices", "params": {"status": "open"}}. SourceLace checks every query against the description (the operation exists and is a read, required parameters are there, nothing unknown, values have the right type and allowed values) before anything is sent, and pages through the results itself. - SOAP (
soap): every operation the admin marks as a read becomes an object, queried the same way in thesoap_jsonlanguage:{"operation": "GetCustomers", "params": {"Country": "DE"}}. SourceLace builds the SOAP 1.1 or 1.2 message, reads the answer, and turns SOAP faults into messages that say what to fix. - Only reads, unless you allow more. For REST, only GET operations are reads. Every other operation (POST, PUT, PATCH, DELETE) is off until an admin switches it on by name. A switched-on operation never runs as a query: it runs only as a change, which the person sees first (the exact request, and the record's current values when the API has a GET on the same path) and confirms. SOAP sources are read-only.
- Answers are data. What the system sends back only ever becomes rows; nothing in it is followed as an instruction.
How people sign in
Choice (auth) |
Who the system sees | When to use it |
|---|---|---|
oauth |
Each person, with their own account (OAuth 2.0 authorization code flow with PKCE) | Recommended whenever the system offers OAuth: its own permissions then apply to each person. |
api_key, bearer, basic |
One shared account for everyone who uses the source | Only when the system offers nothing per person. |
none |
Nobody (a public API) | Public data only. |
Shared access: with api_key, bearer, basic or none, everyone who may use the source acts as the same account, so the system cannot tell people apart and cannot apply its own permissions per person. SourceLace says so wherever the source is listed. Give such a key the least access it needs (read-only if possible), and limit who can use the source with access by group.
Secrets (the OAuth client secret, the API key, token or password) are stored encrypted with your organization's key, shown only as "(saved)", never sent anywhere but the system itself, and never written to logs or answers.
Add a REST source (SourceLace admin)
- If the system offers OAuth, have its admin register an OAuth app (client) for SourceLace, with exactly this redirect URL,
https://sourcelace.onrender.com/connect/callback, and only the read scopes people need. Otherwise, create an API key or a service account with the least access needed. - On Manage sources → Add a source, choose Any REST API, no code (
rest), give it a name (such asrest:billing) and a label. - Paste or load the API's OpenAPI 3 or Swagger 2 document (JSON or YAML), or give its address in
spec_url: SourceLace fetches it once when you save and keeps it. To refresh it later, empty the document box and save again. Without an OpenAPI document, list a few endpoints by hand (below). - Choose how people sign in, and fill in its options.
- Save, then press Test connection: SourceLace checks the description, that the address may be called, and (for shared access) reads a few records.
- To allow changes, turn on Allow changes and name the operations, such as
createInvoice, updateInvoice.
| Option | Example | What it is |
|---|---|---|
spec |
(an OpenAPI document) | The API's description, JSON or YAML. Up to 3 MB. Other files it refers to are not fetched. |
spec_url |
https://api.corvanta.com/openapi.json |
Where to fetch spec once, when spec is empty. |
endpoints |
(JSON, below) | Endpoints written by hand; they add to (or replace, by name) the document's operations. |
base_url |
https://api.corvanta.com/v1 |
The API's address, when the document has none, or to use another (such as a sandbox). |
auth |
oauth |
oauth, api_key, bearer, basic or none. |
client_id, client_secret |
The OAuth client (the secret only for a confidential client). | |
authorize_url, token_url, scopes |
https://auth.corvanta.com/oauth/authorize |
OAuth addresses and scopes. Empty: taken from the OpenAPI document's OAuth flow. |
secret |
The API key, token or password for shared access. | |
key_name, key_in |
X-API-Key, header |
For api_key: the header or query parameter that carries it. |
username |
svc-sourcelace |
For basic. |
test_operation |
listInvoices |
The read Test connection uses (default: the first GET without required parameters). |
Endpoints by hand look like this (only name and path are required; method defaults to GET):
{"base_url": "https://api.corvanta.com/v1",
"endpoints": [
{"name": "invoices", "method": "GET", "path": "/invoices", "description": "Invoices, newest first",
"params": [{"name": "status", "in": "query", "enum": ["open", "paid"]}],
"rows": "data",
"paging": {"style": "cursor", "param": "starting_after", "next": "meta.next_cursor"}},
{"name": "invoice", "path": "/invoices/{id}"},
{"name": "createInvoice", "method": "POST", "path": "/invoices", "body": ["amount", "customer"]}]}
params: each withname,in(query,pathorheader), and optionallyrequired,type(string,integer,number,boolean,array),enumanddescription. Every{name}in the path is a required path parameter.rows: where the records are in the answer, as a dotted path (data,result.items); empty for an answer that is itself the list. Left out, SourceLace looks for a list such asdata,itemsorresults.paging:styleispage(withparam, such aspage),offset(withparam, such asoffset, andsize_param),cursor(withparamandnext, the dotted path to the next cursor in the answer),link(theLink: <…>; rel="next"header) ornone.size_paramandsizeset how many rows a page asks for. For OpenAPI documents SourceLace works this out from the parameter names; an operation can also say it withx-sourcelace-pagingandx-sourcelace-rows.body: for changes, the JSON body's field names.
Changes
A change names its operation as the object: POST operations are creates, PUT and PATCH updates, DELETE deletes. Its fields are the operation's parameters (by name) and its JSON body fields; the record id fills the path's last parameter (or several, as a JSON object such as {"customerId": "C-1", "id": "7"}). Each change shows the exact request before the person confirms it.
Add a SOAP source (SourceLace admin)
- Create a service account with read-only access, or an OAuth client if the service supports it.
- On Manage sources → Add a source, choose Any SOAP web service, no code (
soap), with a name such assoap:customers. - Paste or load the WSDL, or give its address in
wsdl_url: SourceLace fetches it once when you save and keeps it (empty the box and save again to refresh it). - List the operations that only read in
read_operations, such asGetCustomers, GetOrders. Nothing else can run. - Choose how people sign in (the same choices and options as REST), save, and press Test connection.
| Option | Example | What it is |
|---|---|---|
wsdl |
(a WSDL document) | The service's WSDL 1.1. Up to 3 MB. Imported files are not fetched: their types show as unknown, and parameters are passed by name. |
wsdl_url |
https://soap.corvanta.com/customers?wsdl |
Where to fetch wsdl once, when it is empty. |
read_operations |
GetCustomers, GetOrders |
The only operations that may run. |
endpoint |
https://soap.corvanta.com/customers |
The service's address, if not the WSDL's. |
soap_version |
1.2 |
SOAP 1.1 or 1.2; empty uses the WSDL's (1.1 first). |
Supported: document/literal (including the common "wrapped" style) and rpc/literal. SOAP encoding (use="encoded") is not.
Safety
These sources reach addresses your admin types in, so SourceLace guards every request:
- only
https://(a self-hosted server's operator may allowhttp://withSOURCELACE_ALLOW_HTTP_API_SOURCES); - in SourceLace's cloud, only addresses on the public internet: private, loopback, link-local and other reserved addresses are refused, every address a name resolves to is checked, and the request goes to the address that was checked. Cloud metadata addresses are always refused, on any server;
- redirects are never followed, and next-page links must stay on the API's own address;
- answers are limited to 10 MB, and each query to the organization's query time (
queries.timeout_seconds) and row cap; - each source sends at most
queries.api_requests_per_minuterequests a minute (120 by default; see Limits); - nothing of SourceLace's own (cookies, tokens, keys) is ever sent: only the source's own credential;
- XML (the WSDL and every SOAP answer) is read with DTDs and entities refused, so XML attacks such as external entities and "billion laughs" do not work.
When something goes wrong
| What you see | What to do |
|---|---|
| "Give the source an API description: paste or upload an OpenAPI document (option spec), or list a few endpoints by hand (option endpoints)." | Add the OpenAPI document, spec_url, or endpoints. |
| "Give the source its WSDL: paste or upload it (option wsdl), or set wsdl_url." | Add the WSDL, or wsdl_url. |
| "Fetching the API description from spec_url answered HTTP ..." (or "Fetching the WSDL from wsdl_url ...") | Check the address, or paste the document instead. |
| "... is neither valid JSON nor valid YAML ..." or "This is not a WSDL 1.1 document ..." | Use an OpenAPI 3 or Swagger 2 document, or a WSDL 1.1. |
| "Set the option read_operations: the operations that only read data ..." | List the SOAP operations that only read, separated by commas. |
| "Set the option auth: oauth (each person signs in with their own account, recommended), api_key, bearer or basic ..., or none." | Choose how people sign in. |
| "With auth ..., set the option secret ..." or "With auth basic, set the option username ..." | Fill in the shared key, token or password (and the user name for basic). |
| "With auth oauth, set the options authorize_url and token_url ..." | Copy both addresses from the system's OAuth documentation, or use an OpenAPI document that lists them. |
| "... must start with https://. ..." | Use the https:// address. |
| "... names a cloud metadata or internal host, which SourceLace never calls." | Use the API's public address. |
| "...: ... leads to a private or reserved network address, so SourceLace did not call it." | SourceLace's cloud only calls addresses on the internet. Use a public address, or a self-hosted SourceLace inside your network. |
| "The address of ... could not be found. Check its spelling." | Fix the host name in base_url, endpoint, or the document. |
| "... sign-in to ... failed (...). Connect the source again." | The system's own reason is in brackets. Check that the OAuth client's redirect URL is exactly https://sourcelace.onrender.com/connect/callback, and the client ID and secret. |
| "... has no operation .... Use search_schema to list them." | Use an operation name that search_schema shows. |
| "... is a POST, which changes data, so query cannot run it. ..." | Changes go through propose_change, and only for operations an admin switched on. |
| "... is not switched on as a change for .... An admin can switch it on." | A SourceLace admin turns on Allow changes and names the operation. |
| "... needs .... Use describe_object to see its parameters." or "... has no parameter ...." | Fix the query's parameters. |
| "... has had ... requests in the last minute, the most SourceLace sends it. ..." | Wait the time shown, or ask for more rows per request. |
| "... did not answer within ... seconds. ..." or "... sent an answer larger than 10 MB. ..." | Ask for fewer rows or fields. |
| "... answered with ... instead of JSON, so SourceLace could not read it. ..." | Check base_url and that the operation returns JSON. |
| "... uses SOAP encoding (use=encoded), which SourceLace does not support." | That operation cannot be used. |
| "SOAP sources are read-only for now: turn changes off for this source." | Turn Allow changes off. |