Automation

Resolve a run target

Resolve ns/name@tag, an exact version or a version range to a runnable exact version.

Resolve ns/name@tag, an exact version or a version range to a runnable exact version. Omitting @ selects latest; archived targets are rejected and no match returns NO_MATCHING_VERSION.

GET /automation/v1/resolve

Authentication

Authorization: Bearer $PRAXIS_API_KEY

Request fields

ParameterTypeDescription
query: targetstringrequired; ns/name@tag, ns/name@version or ns/name@range; omitting @ selects latest.

Examples

Set these environment variables to your own resources:

: "${TARGET:?Set TARGET}"
curl --fail-with-body -X GET "https://api.deepraxis.ai/automation/v1/resolve" \
  -H "Authorization: Bearer $PRAXIS_API_KEY" \
  --get \
  --data-urlencode "target=${TARGET}"
import { createAutomationClient } from '@deepraxis/sdk/automation';

function env(name: string): string {
  const value = process.env[name];
  if (!value) throw new Error(`Set ${name}`);
  return value;
}
const automation = createAutomationClient({
  apiKey: env('PRAXIS_API_KEY'),
  baseUrl: 'https://api.deepraxis.ai',
  maxRetries: 0,
  timeoutMs: 90_000,
});
const result = await automation.resolve.retrieve({
  "query": {
    "target": env("TARGET")
  }
});
console.log(result);

Response

HTTP 200

Success

application/json

FieldTypeDescription
kind"script" / "workflow"required; Orchestration kind. script is a TypeScript script that executes once; workflow is a YAML workflow made of steps that can wait for events, timers or child runs and can be suspended.
namespacestringrequired; Namespace of the resolved script or workflow.
namestringrequired; Name of the resolved script or workflow.
versionstringrequired; Exact version number the target resolved to.
version_idstringrequired; Id of that version (scv_ or wfv_ prefix).
deprecatednull / stringrequired; Deprecation message when the resolved version is deprecated; null otherwise.

Measured response

HTTP 200

{
  "kind": "script",
  "namespace": "docs-samples",
  "name": "sample-scripts-1791867412840-b05e8a",
  "version": "1.0.0",
  "version_id": "scv_00mv67lza679fc5498438040079f0c5684208c4915",
  "deprecated": null
}

Errors

HTTPCodes and description
400INVALID_PARAMS: Invalid request parameters, path, cursor, or body format.
404TARGET_NOT_FOUND: The target does not exist or has an incompatible type.
409TARGET_ARCHIVED: The target is archived and cannot be used for this operation; action execution error detail includes ns/name.
422NO_MATCHING_VERSION: No published version matches the requested tag, version, or range.
defaultRFC 9457 automation problem. 429 includes Retry-After.

Authentication and common errors · Retain the X-Request-Id response header for troubleshooting.

Export

On this page