MENU

Blogs / FAQ

Endpoint

https://api.website.world/webapps/api/blog

Description

Use the /blog endpoint to view, create or update Blogs on your site. 

Get Parameters

Name Description Example Datatype
id

If ID is specified, then only a single element is returned if found. Otherwise, an array is returned, even if only one item matches.

id=123 int
keywords Site Search Keywords. These keywords associated to the blog. keywords="hello world" string
title Search the blog by it's title. title="Blog Title" string
tags

Comma separated list of linkable tags, for related content or content of relevance.

tag="Auckland" string
filename

SEO filename of blog, if prefixed with / then is published, otherwise, is dynamic/securable content.

filename="blog.html" string
orderBy Sort the orders based on date created, title, date updated.

orderby="created" 

orderby="title"

orderby="updated"

string
orderDirection

Sort results in descending order. Default is ascending order

orderDirection = reverse

For descending order

string

 

GET a Blog / Info Page

Get a specific blog by blog id (aka info id) 

GET /webapps/api/blog?id=99999

GET /webapps/api/blog/99999

 

SEARCH FOR Blogs

Returns an array of blog/info objects in data

Get all blogs on page 9999 

GET /webapps/api/blog?page=9999

Get blogs matching a LIKE pattern

GET /webapps/api/blog?filename=/section/flying%pigs

GET /webapps/api/blog?keywords=

GET /webapps/api/blog?title=

GET /webapps/api/blog?tags=

INSERT / UPDATE a blog / info page

If an ID is provided, then the blog is updated. If an ID is not provided, then the blog is inserted. 

POST /webapps/api/blog 

submit the JSON data as per following format.

Example JSON to create a new blog

{

    "info_title": "New Blog",

    "info_summary": "Hello World",

    "info_fulltext": "<p>Hello world</p>",

"page": 123123

Example JSON to update a blog

{

  "id": 123123,

    "info_title": "Updated Blog Title",

    "info_summary": "Hello World Updated",

Field Data Dictionary

The actual fields/attributes are as follows... 
 
info_id, info_order, info_date, info_expiry, info_groupid, info_re, info_email, info_timestamp, info_show, info_summary, info_title, info_img, info_url, info_object, info_archivedate, info_hideuntil, info_blogcnt, info_metatitle, info_filename, info_authorid, info_blog_comments_on, info_location, info_tags,  site_search_keywords, info_fulltext, site_search_keywords_updated, info_linktext, info_linkrel, info_leadmagnet_followup, info_leadmagnet_config, info_duplicationid, info_comment_count, info_comment_last, info_comment_likes, info_comment_rating  
 

Data Definitions

info_id  / id The blog ID, unique serial integer
info_title Title / heading of blog
info_summary  Short snippet about blog for index pages
info_fulltext   HTML content of blog
info_object   HTML / Widget Code of object, eg Vimeo/youtube video
info_location  Address (Physical) that can be rendered as an embedded map
info_date The official date, of relevance of the article
info_hideuntil Used to reveal blogs after a given date, or null if irrelevant
info_archivedate Used to hide blogs after a given date, or null if irrelevant
info_timestamp Last updated date
info_expiry Blogs can be set to expire at a date.
info_tags Comma separated list of linkable tags, for related content or content of relevance
info_filename SEO filename of blog, if prefixed with / then is published, otherwise, is dynamic/securable content
info_img  is a local or full URL reference to an image on the website filesystem. 
page  page ID where the info/blog will show. Can be found from GET info 
 

Example Return JSON

{

   "endPoint": "blog",

   "resultCount": 1,

   "data": {

       "info_title": "Blog",

       "info_timestamp": "2020-12-07 04:39:25.0",

       "info_show": "Y",

       "info_blog_comments_on": "f",

       "info_category2": 0,

       "info_category1": 0,

       "site_search_keywords_updated": "2021-03-29 09:42:37.26478",

       "site_search_keywords": "^hello ^blog ^awesome",

       "info_blogcnt": 0,

       "info_authorid": 0,

       "info_category3": 0,

       "info_re": 0,

       "info_summary": "Hello NZ",

       "info_groupid": 0,

       "info_id": 1234,

       "id": 12345,

       "page": 111,

       "info_order": 1,

       "info_date": "2020-12-07",

       "info_fulltext": "<p>Hello NZ!</p>",

       "cid": 1111

   },

   "success": true

}