Download the PHP package iroute/sdk without Composer

On this page you can find all versions of the php package iroute/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sdk

iRoute PHP SDK

iroute/sdk is the PHP client for the iRoute v1 HTTP and SSE API. It uses cURL, returns associative arrays, and supports execution, polling, cancellation, approvals, artifacts, gateway health, observability, and buffered event replay.

Routing, provider selection, validation, workflow retries, and fallback remain server-side.

Status and requirements

The public alpha is published on Packagist through this official PHP mirror. The source installation below remains available.

Start iRoute

Run the iRoute runtime from the main repository:

The default API URL is http://localhost:8080. See the PHP guide on iroute.dev for runtime and authentication options.

Install from Packagist

Install from source

Add the SDK checkout as a Composer path repository in the application's composer.json:

Then run:

To develop this SDK locally, install its own autoloader:

Create a client

In Development the identity options become headers. In JWT mode the server derives identity and scopes from token claims and will not allow headers to elevate them.

Submit an execution

The shorthand form is available when no additional request fields are needed:

Prefer the array form so the request includes a stable idempotency key.

Poll until terminal

WaitingForApproval is non-terminal.

Read event replay

The default cURL transport returns the response body after the server closes it, so the generator parses a buffered terminal replay rather than yielding live network chunks. Applications requiring long-lived incremental events should inject a streaming transport or consume the SSE endpoint through their HTTP stack. Persist the sequence for reconnects and ignore unknown fields.

Cancel an execution

Poll or replay events to confirm the durable terminal result.

Approve or deny an action

Read actionId from an approval.required event:

The deciding token needs approval:grant and the action's required scope.

Retrieve an artifact

Not found returns null, including for cross-tenant access.

Health and observability

Gateway health returns a decoded body for HTTP 200 and 503. Summary query keys are from, to, taskType, and policyVersion. Observability is tenant scoped, and reported cost has no currency in v1.

Errors and timeouts

cURL failures throw RuntimeException. Configure the transport deadline with timeoutSeconds. The SDK does not retry automatically; retrying a submission requires the same idempotency key.

Custom transport

The constructor's optional transport is a callable accepting IRouteRequest and returning IRouteResponse. Use it for tests, proxies, streaming, metrics, or application-specific TLS settings. SDK headers and problem-detail mapping remain unchanged.

Method reference

Method Result
execute(array|string, input?) Execution array
get(executionId) Array or null
cancel(executionId) false when not found
submitApproval(executionId, decision) Approval result array
streamEvents(executionId, afterSequence=0) Buffered event generator
getArtifact(artifactId) Array or null
getModelGatewayHealth() Health array
getObservabilitySummary(query=[]) Summary array
getExecutionTimeline(executionId) Timeline or null

Run the example and tests

From this repository:

Public wire shapes are defined by the OpenAPI document and JSON Schemas.


All versions of sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
ext-curl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package iroute/sdk contains the following files

Loading the files please wait ...