Skip to content

API Posts Endpoints

Michele Angioni edited this page Mar 8, 2016 · 1 revision

Retrieving a User Posts

Endpoint

GET /api/v1/posts

Data Receivable

'idUser' => 'required|integer|min:1',
'category' => 'alpha_space',
'private' => 'boolean',
'page' => 'integer|min:1',
'limit' => 'integer|min:1|max:20'

Authentication Header

Required

Data Returned

Posts Array

Create a New Post

Endpoint

POST /api/v1/posts

Data Receivable

'idUser' => 'required|integer|min:1',
'idCategory' => 'integer|min:1',
'text' => 'required|alpha_complete|min:1'

Authentication Header

Required

Delete a Post

Endpoint

DELETE /api/v1/posts/{id}

Authentication Header

Required

Retrieve a Post Comments

Endpoint

GET /api/v1/posts/{id}/comments

Authentication Header

Required

N.B. The /api prefix in the url can be customized by changing the api_prefix key to true in the ma_messageboard.php config file.