Validate commands
POST
https://api.vidmoat.com/v1/projects/{id}/validateDry-run a command batch against the current document and get back per-command results and layout lint, without saving anything. Needs only a read scope.
Path parameters#
idstringrequiredThe project id.
Body#
commandsarray of objectsrequiredOne to 200 commands, applied in order. Each is an object with a stringopand that op's parameters, exactly as listed byGET /v1/schema/commands.
Response#
Returns 200.
Response fields#
projectIdstringThe project.validbooleanEvery command would succeed.resultsarrayOne entry per command:{ op, ok, error?, data? }. A failed command is reported here, not as an HTTP error.blockedarray of stringsPlan-gated features that would be dropped.lintarrayLayout warnings:{ severity: "warn" | "note", time, message }.suggestedPreviewTimesarray of numbersTimestamps worth looking at with the preview endpoint before you render.appliedbooleanAlwaysfalse.
Errors#
Besides the errors any request can get (authentication, rate limits):
| Status | Code | When |
|---|---|---|
| 404 | not_found | No such project, or it is not yours. The two are indistinguishable on purpose. |
| 400 | invalid_request | The command list is malformed. |