PHPackages                             keboola/job-queue-api-php-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. keboola/job-queue-api-php-client

ActiveLibrary[Queues &amp; Workers](/categories/queues)

keboola/job-queue-api-php-client
================================

Client for Job queue API

10.7.0(3y ago)017.1k↓26.5%MITPHPPHP ^7.4|^8.0CI failing

Since Mar 9Pushed 3mo ago6 watchersCompare

[ Source](https://github.com/keboola/job-queue-api-php-client)[ Packagist](https://packagist.org/packages/keboola/job-queue-api-php-client)[ RSS](/packages/keboola-job-queue-api-php-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (55)Used By (0)

Job Queue API PHP Client [![Build Status](https://camo.githubusercontent.com/838fd589874600208cdab580f5f5b84e92a8cc0a798ed78e26c873683b3f602f/68747470733a2f2f6465762e617a7572652e636f6d2f6b65626f6f6c612d6465762f6a6f622d71756575652d6170692d7068702d636c69656e742f5f617069732f6275696c642f7374617475732f6b65626f6f6c612e6a6f622d71756575652d6170692d7068702d636c69656e743f6272616e63684e616d653d6d61696e)](https://dev.azure.com/keboola-dev/job-queue-api-php-client/_build/latest?definitionId=66&branchName=main)
======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#job-queue-api-php-client-)

PHP client for the Job Queue API ([API docs](https://app.swaggerhub.com/apis-docs/keboola/job-queue-api/1.0.0)).

Usage
-----

[](#usage)

```
composer require keboola/job-queue-api-php-client
```

```
use Keboola\JobQueueClient\Client;
use Keboola\JobQueueClient\JobData;use Psr\Log\NullLogger;

$client = new Client(
    new NullLogger(),
    'http://queue.conenection.keboola.com/',
    'xxx-xxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
);
$result = $client->createJob(new JobData(
    'keboola.ex-db-snowflake',
    '123',
    [],
    'run'
));
var_dump($result['id']);
```

Development
-----------

[](#development)

- Create a service principal to download the required images and login:

    ```
        SERVICE_PRINCIPAL_NAME=[USERNAME]-job-queue-public-api-pull
        ACR_REGISTRY_ID=$(az acr show --name keboolapes --query id --output tsv --subscription c5182964-8dca-42c8-a77a-fa2a3c6946ea)
        SP_PASSWORD=$(az ad sp create-for-rbac --name http://$SERVICE_PRINCIPAL_NAME --scopes $ACR_REGISTRY_ID --role acrpull --query password --output tsv)
        SP_APP_ID=$(az ad sp show --id http://$SERVICE_PRINCIPAL_NAME --query appId --output tsv)
    ```
- Login and check that you can pull the image:

    ```
        docker login keboolapes.azurecr.io --username $SP_APP_ID --password $SP_PASSWORD
        docker pull keboolapes.azurecr.io/job-queue-internal-api:latest
        docker pull keboolapes.azurecr.io/job-queue-api:latest
    ```
- Add the credentials to the k8s cluster:

    ```
        kubectl create secret docker-registry regcred --docker-server="https://keboolapes.azurecr.io" --docker-username="$SP_APP_ID" --docker-password="$SP_PASSWORD" --namespace dev-job-queue-api-php-client
        kubectl patch serviceaccount default -p "{\"imagePullSecrets\":[{\"name\":\"regcred\"}]}" --namespace dev-job-queue-api-php-client
    ```
- Set the following environment variables in `set-env.sh` file (use `set-env.template.sh` as sample):

    - `test_storage_api_url` - Keboola Connection URL.
    - `test_storage_api_token` - Token to a test project.
- Set one of Azure or AWS resources (or both, but only one is needed).

### AWS Setup

[](#aws-setup)

- Create a user (`JobQueueApiPhpClient`) for local development using the `provisioning/aws.json` CF template.
    - Create AWS key for the created user.
    - Set the following environment variables in `set-env.sh` file (use `set-env.template.sh` as sample):
        - `test_aws_access_key_id` - The created security credentials for the `JobQueueApiPhpClient` user.
        - `test_aws_secret_access_key` - The created security credentials for the `JobQueueApiPhpClient` user.
        - `test_kms_region` - `Region` output of the above stack.
        - `test_kms_key_id` - `KmsKey` output of the above stack.

### Azure Setup

[](#azure-setup)

- Create a resource group:

    ```
    az account set --subscription "Keboola DEV PS Team CI"
    az group create --name testing-job-queue-api-php-client --location "East US"
    ```
- Create a service principal:

    ```
    az ad sp create-for-rbac --name testing-job-queue-api-php-client
    ```
- Use the response to set values `test_azure_client_id`, `test_azure_client_secret` and `test_azure_tenant_id` in the `set-env.sh` file:

    ```
    {
      "appId": "268a6f05-xxxxxxxxxxxxxxxxxxxxxxxxxxx", //-> test_azure_client_id
      "displayName": "testing-job-queue-internal-api-php-client",
      "name": "http://testing-job-queue-internal-api-php-client",
      "password": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", //-> test_azure_client_secret
      "tenant": "9b85ee6f-xxxxxxxxxxxxxxxxxxxxxxxxxxx" //-> test_azure_tenant_id
    }
    ```
- Get ID of the service principal:

    ```
    SERVICE_PRINCIPAL_ID=$(az ad sp list --display-name testing-job-queue-api-php-client --query "[0].objectId" --output tsv)
    ```
- Deploy the key vault, provide tenant ID, service principal ID and group ID from the previous commands:

    ```
    ./set-env.sh # set $test_azure_tenant_id env
    az deployment group create --resource-group testing-job-queue-api-php-client --template-file provisioning/azure.json --parameters vault_name=test-job-queue-client tenant_id=$test_azure_tenant_id service_principal_object_id=$SERVICE_PRINCIPAL_ID
    ```
- Show Key Vault URL

    ```
    az keyvault show --name test-job-queue-client --query "properties.vaultUri" --output tsv
    ```

returns e.g. `https://test-job-queue-client.vault.azure.net/`, use this to set values in `set-env.sh` file: - `test_azure_key_vault_url` -

Generate environment configuration
----------------------------------

[](#generate-environment-configuration)

```
export db_password="cm9vdA==" #root
export db_password_urlencoded="cm9vdA=="
export test_azure_client_secret_base64=$(printf "%s" "$test_azure_client_secret"| base64 --wrap=0)
export test_aws_secret_access_key_base64=$(printf "%s" "$test_aws_secret_access_key"| base64 --wrap=0)

./set-env.sh
envsubst  provisioning/environments.yaml
kubectl apply -f ./provisioning/environments.yaml
kubectl apply -f ./provisioning/public-api.yaml
queue_public_api_ip=`kubectl get svc --output jsonpath --template "{.items[?(@.metadata.name==\"dev-job-queue-api-service\")].status.loadBalancer.ingress[].ip}" --namespace=dev-job-queue-api-php-client`

echo "queue_public_api_url: http://$(queue_public_api_ip):94"
```

Store the result `queue_public_api_ip` in `set-env.sh`.

Run tests
---------

[](#run-tests)

- With the above setup, you can run tests:

    ```
    docker compose build
    source ./set-env.sh && docker compose run tests
    ```
- To run tests with local code use:

    ```
    docker compose run tests-local composer install
    source ./set-env.sh && docker compose run tests-local
    ```

License
-------

[](#license)

MIT licensed, see [LICENSE](./LICENSE) file.

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance55

Moderate activity, may be stable

Popularity26

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~61 days

Total

26

Last Release

357d ago

Major Versions

1.0.0 → 2.0.02022-03-21

2.0.0 → 10.7.02022-06-08

2.4.0 → 3.0.02023-11-21

3.2.0 → 4.0.02024-09-25

4.0.0 → 5.0.02024-12-03

PHP version history (6 changes)0.0.1PHP ^7.4

0.2.0PHP ^7.3

1.0.0PHP ^7.4|^8.0

3.0.0PHP ^8.1

4.0.0PHP ^8.2

5.2.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/101dbf2551a0709ddab522f97669f13a2c4cc2d0a1e8d009f3af6ba80accb1a9?d=identicon)[Keboola](/maintainers/Keboola)

---

Top Contributors

[![odinuv](https://avatars.githubusercontent.com/u/4319320?v=4)](https://github.com/odinuv "odinuv (64 commits)")[![MiroCillik](https://avatars.githubusercontent.com/u/1488015?v=4)](https://github.com/MiroCillik "MiroCillik (36 commits)")[![pepamartinec](https://avatars.githubusercontent.com/u/271753?v=4)](https://github.com/pepamartinec "pepamartinec (32 commits)")[![ErikZigo](https://avatars.githubusercontent.com/u/1726727?v=4)](https://github.com/ErikZigo "ErikZigo (6 commits)")[![natocTo](https://avatars.githubusercontent.com/u/12331181?v=4)](https://github.com/natocTo "natocTo (2 commits)")[![ujovlado](https://avatars.githubusercontent.com/u/419849?v=4)](https://github.com/ujovlado "ujovlado (1 commits)")[![zajca](https://avatars.githubusercontent.com/u/180148?v=4)](https://github.com/zajca "zajca (1 commits)")

---

Tags

clientqueuejobkeboola

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/keboola-job-queue-api-php-client/health.svg)

```
[![Health](https://phpackages.com/badges/keboola-job-queue-api-php-client/health.svg)](https://phpackages.com/packages/keboola-job-queue-api-php-client)
```

###  Alternatives

[phlib/beanstalk

Library for handling beanstalk connections.

1014.9k2](/packages/phlib-beanstalk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
