b2evolution b2evolution

  • Sign in
  • Sign up
  • About
  • Downloads
  • Hosting
  • Docs
  • Support
  • Sign in
  • Sign up
  • Manuals Home
  • Latest Updates
 
  1. b2evolution CMS User Manual
  2. Advanced Topics
  3. Using the APIs
  4. REST API or RESTful API
  5. Retrieve a Post (REST)

Retrieve a Post (REST)

GET <baseurl>/api/v1/collections/<collname>/posts/<id>
GET <baseurl>/api/v1/collections/<collname>/posts/<url-slug>

This is the API equivalent of disp = single.

Parameters

Possible request params

Name

Type

Description

Default

details

string

Determines what post properties should be in the Response (see table below).
To get all possible post properties in response use a value *.
To get custom properties list them separated by comma like this id,datestart,urltitle,type,title,content,excerpt,teaser,URL,attachments.

*

Response

Post properties in the Response

Name

Type

Description

id

integer

Post ID

datestart

datetime

Date of start publishing

urltitle

string

Slug

type

string

Post type name

title

string

Title of the post

content

string

Pre-rendered content

excerpt

string

Excerpt

URL

string

Permanent URL

attachments

array

Array of item attachments:

Name

Type

Description

link_ID

integer

Link ID

file_ID

integer

File ID

type

string

File type: dir, image, audio, other

position

string

Link position: teaser, teaserperm, teaserlink, aftermore, inline, fallback, cover

name

string

File name

url

string

File URL

title

string

File long title

alt

string

File alternative text

desc

string

File caption/description

Errors

Possible Error Codes

Error code

HTTP response

Message

access_requires_login

403

You need to log in before you can access this section.

access_denied

403

You are not a member of this section, therefore you are not allowed to access it.

wrong_route

404

Collection name is not defined

unknown_collection

404

No collection found in DB by requested url name

wrong_route

404

Collection controller is not defined

post_invalid_id

404

Invalid post ID

Created by yurabakhtin • Last edit by yurabakhtin on 2018-10-11 14:48 • •

No feedback yet

On this page

  • Parameters
  • Response
  • Errors

Search the Manual

Content Hierarchy

  • b2evolution CMS User Manual
  • User's Guide
  • Installation / Upgrade
  • Front-office Reference
  • Back-office Reference
  • Developer Reference
  • Operations Reference
  • Advanced Topics
    • Using Desktop Blogging Tools
    • Using Blogging Apps
    • Blogging by email
    • Using the APIs
      • REST API or RESTful API
        • List Collections (REST)
        • List Posts (REST)
        • List Items (REST)
        • Retrieve a Post (REST)
        • Retrieve any item (REST)
        • Search (REST)
        • List Users (REST)
        • Retrieve a User (REST)
        • Create a User (REST)
        • Update a User (REST)
        • Delete a User (REST)
        • Cookie Authentication (REST)
        • Basic HTTP Authentication (REST)
      • B2 API
      • API Error Codes
      • Blogger API
      • MetaWeblog API
      • MovableType API
    • Contributing
    • Translations (i18n/l10n)
    • Monetizing
    • How to...
    • Podcasting
  • Glossary
  • Archives
Social CMS software

This online manual is powered by b2evolution CMS – A complete engine for your website.

About b2evolution

  • What is it?
  • Features
  • Getting Started
  • Screenshots
  • Online demo
  • Testimonials
  • Design philosophy
  • Free & open source
  • Terms of service

Downloads

  • Latest releases
  • Skins
  • Plugins
  • Language packs

About us

  • About us
  • Contact

Webhosting Guide

  • Web hosting blog
  • Best web hosting
  • Cheap web hosting
  • Green web hosting
  • Hosting with SSH
  • VPS hosting
  • Dedicated servers
  • Reseller hosting
  • Int'l: UK / France

Docs & Support

  • Online manual
  • Forums
  • Hire a pro !

Other

  • Adsense
  • Press room
  • Privacy policy

Stay in touch

  • GitHub
  • Twitter
  • Facebook
  • LinkedIn
  • News blog
  • RSS feed
  • Atom feed

Founded & Maintained by François Planque