List system sources using GET.
For every API request you make, you'll need to present the API access key in the HTTP Header as X-API-Key to be authenticated.
$request_url = 'https://api.frontcore.com/v2/privacy/datasources';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $request_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'X-API-Key: {your-api-key}',
'Accept: application/json',
));
$result = curl_exec($ch);
curl_close($ch);
If the method is successful it responds with an JSON structure, as it is shown below.
[
{
"id": 1,
"title": "Changes made to My page"
},
{
"id": 2,
"title": "E-mail"
},
{
"id": 3,
"title": "Incoming request"
},
{
"id": 4,
"title": "Chat"
},
{
"id": 5,
"title": "Registration form"
},
{
"id": 6,
"title": "Booking module"
},
{
"id": 7,
"title": "Import"
},
{
"id": 8,
"title": "Other integration"
},
{
"id": 9,
"title": "Unknown"
}
]
Unsuccessful response sample:
{
"error": "Wrong API Key"
}