Retrieve knowledge base articles
Overview
The get-articles Ortto endpoint of the kb entity is used to retrieve articles within Ortto’s customer data platform (CDP).
NOTE: You can also retrieve one article by referring to the 1/kb/get-one-article endpoint in retrieve one knowledge base article.
This page provides descriptions of the endpoint’s:
- The response payload.
HTTP method and request resource
Get articles endpoint
POST https://api.ap3api.com/v1/kb/get-articlesNOTE: Ortto customers who have their instance region set to Australia or Europe will need to use specific service endpoints relative to the region:
Australia: https://api.au.ap3api.com/ Europe: https://api.eu.ap3api.com/For example: https://api.eu.ap3api.com/v1/<entity/endpoint>
All other Ortto users will use the default service endpoint (https://api.ap3api.com/).
Path and query parameters
This endpoint take no additional path and/or query parameters.
Headers
This endpoint requires a custom API key and content type (
application/jsonfor the request body) in the header of the request:
X-Api-Key: CUSTOM-PRIVATE-API-KEYContent-Type: application/jsonRequest body
The request body consists of a JSON object whose valid elements are listed in the table below.
Example get articles request body from Ortto's CDP
json
{ "status": "", "q": "" }NOTE:
The default limit for articles is 50. If there are more articles to view, thenext-offsetvalue indicates the starting point for retrieving the next set of articles, and to use this value in theoffsetfield on the next API call.Example get articles request body with an offset from Ortto's CDP
json
{ "status": "", "q": "", "offset": 50 }Valid request body elements
The following table lists all valid, optional request body elements that are available at this endpoint.
Element
Type
Description
status
stringThe status of an article can be specified as "on", "off", or left blank
""to include all statuses.
q
stringA search term used to retrieve articles that contain the specified term in their title or description.
limit
integerThe
limitvalue determines the number of activities to be returned by Ortto from the request.This value also represents the "page" length of articles (for pagination purposes). This element can be used in conjunction with
offsetto retrieve subsequent pages of article records.The default value is 50 but also accepts between 1 and 50.
offset
integerThe
offsetfield specifies how far through the list of articles to get this batch from, enabling pagination through the results. For example, assuming the default limit of 50, get the first 50 matching articles by using an offset of 0, and then get the next 50 articles by using an offset of 50. Keep adding 50 to the offset each time to iterate through the list.Response payload
The following JSON object is an example of an articles call that Ortto retrieves from your Ortto account’s CDP after a request to this endpoint.
json
{ "articles":[ { "id":"671f0d10685bbcdf25e4f896", "title":"My first article" }, { "id":"6695e4ccf24fff085e9df112", "title":"How to get multiple articles" }, { "id":"6695c9d1f24fff085e9df103", "title":"How to create an article" }, { "id":"6695c29948b1e5f3462ffaa5", "title":"Table Demo" }, { "id":"6548518986f49929d2ae016a", "title":"Image Demo" }, { "id":"650cf26b8bdeb4e9fbb12567", "title":"Title", "description":"Testing" } ], "total":6, "offset":0, "next_offset":6, "has_more":false }Response payload elements
The following table lists all elements (arrays, objects, or fields) in the response from a request to this endpoint.
Element
Type
Description
articles
arrayof objectsThe
articlesarray consists of an array of objects, where each object contains data for the knowledge base articles in your CDP.
id
stringA string identifying the article ID by their unique ID number.
title
stringThe title of the article.
description
stringThe description included with the article.
total
integerThe total number of articles in the account.
offset
integerThe
offsetelement represents the count of articles in your Ortto account’s CDP for pagination purposes, and is the point from which the next page of articles (defined by the limit member value) is retrieved. The offset value determines how many of the first articles will be skipped in the response.
next_offset
integerThe
next_offsetvalue indicates the starting point for retrieving the next page of articles. In this example,next_offset: 6means the next request would start after skipping the first 6 articles.
has_more
booleanThis endpoint returns the
limitof articles at a time. If there are more articles in the list beyond what was returned, this istrue.