Skip to content

REST API

Everything in the MCP reference is also available over REST. Same service, same governance, same admission — a different envelope.

Use MCP if your agent framework speaks it; use REST for a script, a webhook or a language with no SDK.

POST {base}/v1/{resource}
Authorization: Bearer $VECTADYNE_TOKEN
Content-Type: application/json

Request bodies match the MCP arguments object exactly. If you can build the MCP call you can build the REST one.

The complete set this server emits:

StatusMeaningRetry
200Success
207Batch partly acceptedno — a success with a mixed result
400validationno
401unauthenticatedno — refresh the credential
403forbiddenno
404not_foundno
409conflictno
410goneno
413payload_too_largeno — shrink the batch
429rate_limitedyes, after Retry-After
500internalyes, with backoff
503dependency_unavailableyes, with backoff

422 is never emitted. Anything not in this table is not retried, because an unknown status is an unknown cause.

{
"error": {
"code": "validation",
"message": "scope_key must be of the form level:id",
"field": "scope_key",
"retryable": false,
"request_id": "req_…",
"details": { "example": "repo:payments" }
}
}

retryable is the server’s judgement, not a guess from the code — honour it. field names what to fix. details.allowed carries the permitted values when the server can enumerate them.

Always log request_id. It is what makes a bug report actionable.

On MCP a fault arrives as a 200 with isError: true in the tool result — the server answered, and the answer was a refusal. On REST the same refusal is an HTTP status.

So a REST client keys on status, an MCP client keys on the tool result, and a client doing both needs to read both. Same faults, same codes, two envelopes.

429 carries Retry-After in whole seconds. Wait it rather than applying your own backoff.

The token endpoint is different and worth knowing about: it answers with the RFC 6749 OAuth error shape (temporarily_unavailable), not this envelope, and its correlation id is only in the X-Request-Id header. A client that parses one shape everywhere will misread the other.

Terminal window
curl -s "$VECTADYNE_MCP_URL" \
-H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"server/discover"}'

Unauthenticated, and the right first call: it proves reachability before a credential exists.