Request and response structure
This document is intended to provide examples on how to make a call to our API and the structure of the response that is returned.
Request structure - Example API call
curl --location --request GET 'https://staging.dev.graphitehq.com/api/il/related-links/<Project_shortuuid>?url=https://www.example.com/blog/my-blog-post \
--header 'Authorization: Bearer <API_KEY>'
Notes:
- The API Key must be provided with a bearer token in the request headers
- The URL to query must be provided in a query param with key URL
- The project short UUID is shown on the API configuration page
- All of the related links for the given page are returned grouped by modules
Response structure
{
"6NYkGsxX9UhhACJnqKZXip": {
"from": "/section1",
"to": "/section2",
"links": [
{
"url": "https://www.example.com/section1/Example-Page-123456",
"title": "This Is My Title",
"description": "The description of my page appears here.",
"image_url": "https://www.example.com/images/Example-Page-123456"
},
{
"url": "https://www.example.com/section2/Example-Related-Page2-123456",
"title": "This Is My Other Title",
"description": "The description of my other page appears here.",
"image_url": "https://www.example.com/images/Example-Related-Page2-123456"
}
]
}
}
Note: If there are multiple modules on the originating page type, we will return all modules of the originating page type in the API response.
Updated 3 months ago