# GET /php/extensions

First published 14 Oct 2026 (release 0.2.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the php group.

List the PHP extension catalog and each installed version's extension states

- Who may call it: administrator
- Token scope, any of: settings, read, all
- Answers: 200 OK

Returns the extension catalog for the server's distribution. For each extension, the response includes its purpose, the module names reported by php -m, any additional modules it provides, and whether it belongs to UrbeStack's default extension set.

Each extension has a state for every installed PHP version. The on and off states indicate whether a separately packaged extension is installed. The none state means the repositories carry no package for that PHP version. The core, common, and base states indicate extensions built into PHP, supplied by its common package, or supplied by its base packages, respectively. These extensions cannot be turned off.

Use version to limit the report to one installed PHP version. Returns 400 for an unknown PHP version.

## As a command

- [urbestack-php-ext-list](https://urbestack.com/docs/commands/urbestack-php-ext-list.md): Lists the PHP extension catalog for this server's distribution and shows each extension's state for every installed PHP version.

## Parameters

- `version` (query, string, matching ^[5-9]\.[0-9]$)

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X GET "$API/php/extensions?version=0.0.1" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "distro": "text",
  "extensions": [
    {}
  ],
  "repositories_read": true,
  "switchable": 1,
  "total": 1,
  "versions": [
    {}
  ]
}
```

## Errors

- 400: --q is a text of up to 64 characters
- 400: Invalid PHP version, expected e.g. 8.2
- 400: Unknown PHP version '
- 400: Unknown PHP version '<v>'
- 400: Unknown PHP version '<version>'
- 401: Authentication required
