61 lines
2.0 KiB
Markdown
61 lines
2.0 KiB
Markdown
# POST Configure Inserve
|
|
This API call updates the Inserve configuration.
|
|
More information about the Inserve source can be found [here](Portal%20Management/Settings/Sources/Inserve.md).
|
|
|
|
#### Location
|
|
```
|
|
/api/v1/portal-management/sources/inserve/
|
|
```
|
|
|
|
#### Permissions required
|
|
`admin-sources` RW
|
|
|
|
#### Body parameters
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------ | ------ | -------- | -------------------------------------------------------------------------------------------------------------- |
|
|
| source_url | string | yes | The url of the inserve instance. |
|
|
| source_auth_token | string | yes | The API token from inserve |
|
|
| source_custom_data | json | yes | The custom JSON source data. See the [Inserve](Portal%20Management/Settings/Sources/Inserve.md) documentation. |
|
|
|
|
### Example Body (json)
|
|
```json
|
|
{
|
|
"source_url": "https://company.inserve.nl",
|
|
"source_auth_token": "8TtCFdogSJmDhJC0Ii4ZVKkHplMQikNqVnY7uRuBi84IRYONfuYv7UKOxDV0PYXV",
|
|
"source_custom_data": "[]"
|
|
}
|
|
```
|
|
|
|
### Example Request
|
|
```php
|
|
$curl = curl_init();
|
|
|
|
curl_setopt_array($curl, [
|
|
CURLOPT_URL => $baseUrl . '/api/v1/portal-management/sources/inserve/',
|
|
CURLOPT_RETURNTRANSFER => true,
|
|
CURLOPT_POST => true,
|
|
CURLOPT_POSTFIELDS => $json_payload,
|
|
CURLOPT_HTTPHEADER => [
|
|
'Authorization: Bearer ' . $token,
|
|
'Content-Type: application/json',
|
|
],
|
|
]);
|
|
|
|
$response = curl_exec($curl);
|
|
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
|
|
|
if ($response === false) {
|
|
echo curl_error($curl);
|
|
}
|
|
|
|
curl_close($curl);
|
|
```
|
|
|
|
### Example Response
|
|
```json
|
|
"Information modified"
|
|
```
|
|
|
|
#### 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. |