API description
Authorization - how to get & use API Keys Learn how to authorize your requests by using API Keys
Parameters
Additional parameters to send (beyond Authorization):
Parameter | Description | Required |
---|---|---|
languageCode | The preferred language of the news (2-letter ISO). | Yes |
size | The number of news to retrieve. The maximum is 12. | No, default is 1 |
maxLeadText | How many characters the lead text of each news should have. Choose a number from 300 - 800 | No, default is 300 |
For general use how to use the API from an editor’s perspective, please visit the relevant article on ahead’s help site.
Response
A typical response looks as follows:
[ { "title": "The title of the news", "leadText": "The lead text of the news.", "leadImageUrl": "https://url.of/lead-image?c=x98r", "published": "2024-03-20T14:12:18Z", "authorDetails": { "name": "Arthur Author", "jobTitle": "Writing Content", "department": "Human Resources", "officeLocation": "PostParc", "city": "Bern", "companyName": "MountainGear" }, "channels": ["HR-Infos"], "url": "https://app.aheadintranet.com/news/4a308770-5210-4455-8f52-13616b7c2c91" }]
Property | Description | Can be null |
---|---|---|
title | The title of the news. Max 100 characters. | No |
leadText | The first n characters of the content of the news, depending on the provided maxLeadText. | Yes |
leadImageUrl | The URL of the first image of the news. This is either an external URL or a URL to an image stored in ahead storage. In the latter case, the URL is valid for only 30 minutes. | Yes |
published | The date of when the news was published for the first time. | No |
channels | The name of the channels the news is published in. | No, but can be empty |
url | The URL of the news. | No |
authorDetails | ||
.name | The name of the author of the news, as shown in ahead. | No |
.jobTitle | The author’s value of the Entra ID property ‘jobTitle’. | Yes |
.department | The author’s value of the Entra ID property ‘department’. | Yes |
.officeLocation | The author’s value of the Entra ID property ‘officeLocation’. | Yes |
.city | The author’s value of the Entra ID property ‘city’. | Yes |
.companyName | The author’s value of the Entra ID property ‘companyName’. | Yes |