Get an engagement news article
curl --request GET \
--url https://api.gleap.io/v3/engagement/news/{newsId} \
--header 'Authorization: Bearer <token>' \
--header 'project: <project>'import requests
url = "https://api.gleap.io/v3/engagement/news/{newsId}"
headers = {
"project": "<project>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {project: '<project>', Authorization: 'Bearer <token>'}
};
fetch('https://api.gleap.io/v3/engagement/news/{newsId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gleap.io/v3/engagement/news/{newsId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"project: <project>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gleap.io/v3/engagement/news/{newsId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("project", "<project>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.gleap.io/v3/engagement/news/{newsId}")
.header("project", "<project>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gleap.io/v3/engagement/news/{newsId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["project"] = '<project>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"startSendingAfter": "2023-11-07T05:31:56Z",
"stopSendingAfter": "2023-11-07T05:31:56Z",
"pageRules": [
{
"pageFilterType": "is",
"pageFilter": "<string>"
}
],
"pageFilterType": "is",
"frequencyDays": 123,
"frequency": "<string>",
"frequencyType": "<string>",
"sent": true,
"sound": true,
"newTrigger": true,
"format": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"status": "<string>",
"targetAudience": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"hidden": true,
"tags": [
"<string>"
],
"name": "<string>",
"type": "<string>",
"emailTemplate": {
"isValid": {},
"createFromHexString": {},
"createFromTime": {},
"generate": {},
"cacheHexString": "<unknown>"
},
"sourceOutbound": {
"isValid": {},
"createFromHexString": {},
"createFromTime": {},
"generate": {},
"cacheHexString": "<unknown>"
},
"trigger": "<unknown>",
"pageFilterDelay": 123,
"pageFilter": "<string>",
"eventTriggerDelay": 123,
"eventTrigger": "<string>",
"actionType": "<string>",
"sentAt": "2023-11-07T05:31:56Z",
"stats": "<unknown>",
"subject": "<unknown>",
"coverImageUrl": "<string>",
"slug": "<string>",
"subType": "<string>",
"sender": {
"isValid": {},
"createFromHexString": {},
"createFromTime": {},
"generate": {},
"cacheHexString": "<unknown>"
},
"searchContent": "<string>",
"project": {
"isValid": {},
"createFromHexString": {},
"createFromTime": {},
"generate": {},
"cacheHexString": "<unknown>"
},
"data": "<unknown>",
"conditions": "<unknown>",
"config": "<unknown>",
"message": "<unknown>",
"aiSummaryOutdated": true,
"aiSummary": "<string>",
"organisation": {
"isValid": {},
"createFromHexString": {},
"createFromTime": {},
"generate": {},
"cacheHexString": "<unknown>"
},
"createdBy": {
"isValid": {},
"createFromHexString": {},
"createFromTime": {},
"generate": {},
"cacheHexString": "<unknown>"
}
}Engagement News
Get an engagement news article
Get a news article by id.
GET
/
engagement
/
news
/
{newsId}
Get an engagement news article
curl --request GET \
--url https://api.gleap.io/v3/engagement/news/{newsId} \
--header 'Authorization: Bearer <token>' \
--header 'project: <project>'import requests
url = "https://api.gleap.io/v3/engagement/news/{newsId}"
headers = {
"project": "<project>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {project: '<project>', Authorization: 'Bearer <token>'}
};
fetch('https://api.gleap.io/v3/engagement/news/{newsId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gleap.io/v3/engagement/news/{newsId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"project: <project>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gleap.io/v3/engagement/news/{newsId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("project", "<project>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.gleap.io/v3/engagement/news/{newsId}")
.header("project", "<project>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gleap.io/v3/engagement/news/{newsId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["project"] = '<project>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"startSendingAfter": "2023-11-07T05:31:56Z",
"stopSendingAfter": "2023-11-07T05:31:56Z",
"pageRules": [
{
"pageFilterType": "is",
"pageFilter": "<string>"
}
],
"pageFilterType": "is",
"frequencyDays": 123,
"frequency": "<string>",
"frequencyType": "<string>",
"sent": true,
"sound": true,
"newTrigger": true,
"format": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"status": "<string>",
"targetAudience": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"hidden": true,
"tags": [
"<string>"
],
"name": "<string>",
"type": "<string>",
"emailTemplate": {
"isValid": {},
"createFromHexString": {},
"createFromTime": {},
"generate": {},
"cacheHexString": "<unknown>"
},
"sourceOutbound": {
"isValid": {},
"createFromHexString": {},
"createFromTime": {},
"generate": {},
"cacheHexString": "<unknown>"
},
"trigger": "<unknown>",
"pageFilterDelay": 123,
"pageFilter": "<string>",
"eventTriggerDelay": 123,
"eventTrigger": "<string>",
"actionType": "<string>",
"sentAt": "2023-11-07T05:31:56Z",
"stats": "<unknown>",
"subject": "<unknown>",
"coverImageUrl": "<string>",
"slug": "<string>",
"subType": "<string>",
"sender": {
"isValid": {},
"createFromHexString": {},
"createFromTime": {},
"generate": {},
"cacheHexString": "<unknown>"
},
"searchContent": "<string>",
"project": {
"isValid": {},
"createFromHexString": {},
"createFromTime": {},
"generate": {},
"cacheHexString": "<unknown>"
},
"data": "<unknown>",
"conditions": "<unknown>",
"config": "<unknown>",
"message": "<unknown>",
"aiSummaryOutdated": true,
"aiSummary": "<string>",
"organisation": {
"isValid": {},
"createFromHexString": {},
"createFromTime": {},
"generate": {},
"cacheHexString": "<unknown>"
},
"createdBy": {
"isValid": {},
"createFromHexString": {},
"createFromTime": {},
"generate": {},
"cacheHexString": "<unknown>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Path Parameters
Response
200 - application/json
Ok
Generic types for Document:
- T - the type of _id
- TQueryHelpers - Object with any helpers that should be mixed into the Query type
- DocType - the type of the actual Document created
Show child attributes
Show child attributes
Available options:
is, contains, isnot, notcontains, startswith, endswith, empty, notempty Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes