# Update plugin installation status

`PATCH /api/plugins/{pluginId}/installations/{installationId}`

Activate or deactivate a plugin installation by updating its status

Authentication (security requirement alternatives):

```json
[
  {
    "api_key": []
  },
  {
    "Bearer": []
  }
]
```

- api_key
- Bearer

Parameters:

- `pluginId` (path, string, uuid, required) - UUID of the plugin
  Type: string, uuid

- `installationId` (path, string, uuid, required) - UUID of the plugin installation
  Type: string, uuid

Request body: application/json (required)

Type: object

- `status` (required)
  Type: string
  
  New status for the installation
  
  enum: ["active","inactive"]

Responses:

- 200: Plugin installation status updated successfully.

- 401: Unauthorized access.

- 403: User does not have permission to modify this plugin installation.

- 404: Plugin installation not found.

## Examples

### cURL

```bash
curl -X PATCH 'http://localhost:3000/api/plugins/550e8400-e29b-41d4-a716-446655440000/installations/550e8400-e29b-41d4-a716-446655440000' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "status": "active"
}'
```

### JavaScript

```javascript
const body = `{
  "status": "active"
}`;

const response = await fetch('http://localhost:3000/api/plugins/550e8400-e29b-41d4-a716-446655440000/installations/550e8400-e29b-41d4-a716-446655440000', {
  method: 'PATCH',
  headers: {
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "status": "active"
}'''

response = requests.patch(
    'http://localhost:3000/api/plugins/550e8400-e29b-41d4-a716-446655440000/installations/550e8400-e29b-41d4-a716-446655440000',
    data=body.encode('utf-8'),
    headers={
        'Content-Type': 'application/json',
    },
)
print(response.text)
```
