Please enable JavaScript to view this site.

The manual for the JobRouter developer

Navigation: SDK

Calling a Custom Application

Scroll Prev Top Next More

Each custom application you create is accessible via a specific URL within your JobRouter® installation. The SDK automatically maps incoming requests to the correct application based on the URL structure.

Basic URL Format

The general format to access a custom application is:

http(s)://[jobrouter-url]/custom-applications/<app-folder>/<endpoint>

Components:

[jobrouter-url]: The base URL of your JobRouter® installation.

custom-applications: A fixed segment that tells the system to load a custom application.

<app-folder>: The name of your application folder inside custom_applications/.

<endpoint>: A sub-route handled by your application logic.

Entry Point

By default, requests to an application (e.g. /custom-applications/example-app/index.php) will execute the closure defined in example-app/index.php.

This means you can already return content or perform logic based on a direct visit to the base path.

Example:

http(s)://example.com/custom-applications/example-app/index.php

→ This calls the closure in:

custom_applications/example-app/index.php

Handling Custom Endpoints

If your application needs to handle multiple paths or API-like routes (e.g. /stats.php, /export/index.php, etc.), you can create the required folders and files in the main custom application directory like this:

custom_applications/example-app/stats.php

custom_applications/example-app/export/index.php

Important: URL Path vs. Directory Name

The segment /custom-applications/ in the URL is fixed and defined by the JobRouter® routing system. It must not be changed, and it has no direct connection to the name of the directory on disk.

The (default) location for custom applications is a folder named custom_applications (with an underscore), but the URL will always use the dash version: custom-applications.

If you change the default folder to something else, e.g. applications, the URL will still be custom-applications.

Do not try to rename the directory to match the URL (custom-applications), there must not be a folder with that name within the JobRouter root directory!

Failing to follow this naming convention can lead to errors such as "No route found for..." or other unexpected routing exceptions.