# Post API Reference
Endpoint:
https://[client].hiweb.io/api/posts
Post resource object:
{
"type": "posts",
"id": "(string)",
"attributes": {
"visibility": "string",
"title": "string",
"handle": "string",
"description": "string",
"content": "string",
"view_count": (integer),
"created_at": "string|datetime",
"updated_at": "string|datetime"
},
"relationships": {
"image": {
"data": Object (Image Resource) | null
},
"user": {
"data": Object (User Resource)
},
"categories": {
"data": Array [Category Resources]
}
}
}
Related resources: Image, User, Comment, Category
- Note: Relationship "categories" will only present for getting a single post request.
# Writable fields
| Field name | Creating | Updating |
|---|---|---|
| visibility | string|in:public,private,with-link | string|in:public,private,with-link |
| title | required|string|min:1|max:255 | string|max:255 |
| handle | string|max:255 | string|max:255 |
| description | string|max:255 | string|max:255 |
| content | string|max:60000 | string|max:60000 |
# Writable relationships
| Relationship name | Relationship resource type | Type | Creating | Updating |
|---|---|---|---|---|
| image | images | To-one | yes | yes |
| user | users | To-one | yes | yes |
| categories | categories | To-many | yes | yes |
# Sortable
| Field name |
|---|
| view_count |
| created_at |
| updated_at |
# Filters
| Filter name | Detail |
|---|---|
| visibility | string|in:public,private,with-link |
| ids | string, multiple ids accepted (max 100), separate by a comma |
| category_id | Filter by category id |
| title | Filter by title |
| search | Full text search |
← Categories Addresses →