1.4 KiB
1.4 KiB
PUT Toggle module
This PUT request enables or disables an module.
Location
/api/v1/portal-management/modules/
Permissions required
admin-modules RW
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| module_uuid | uuid | yes | Unique id of the module. |
| module_enabled | boolean | yes | Enable or disable the module. |
Example Body (json)
{
"module_uuid": "247aa89e-2ffa-4cba-8672-3fef451255b7",
"module_enabled": true
}
Example Request
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/modules/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $json_payload,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token,
'Content-Type: application/json',
'X-HTTP-Method-Override: PUT'
],
]);
$response = curl_exec($curl);
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($response === false) {
echo curl_error($curl);
}
curl_close($curl);
Example Response
"Module enabled successfully."
Known errors or issues.
None are known at the time If you do encounter issues and get an http code in return, check the response codes on this page.