-
Notifications
You must be signed in to change notification settings - Fork 62
Post Types
cairocoder01 edited this page Jul 30, 2019
·
23 revisions
This page covers endpoints available for all post types like
- contacts
- groups
- custom post types. Click here for more information.
CRUD
- Create post: POST /wp-json/dt-posts/v2/{post-type}
- Get post: GET /wp-json/dt-posts/{post-type}/v2/post-type/{post_id}
- Update post: POST /wp-json/dt-posts/v2/{post-type}/{post_id}
List
- List posts: GET /wp-json/dt-posts/v2/{post-type}
- List posts for typeaheads: GET /wp-json/dt-posts/v2/{post-type}/compact
Comments
- Get comments: GET /wp-json/dt-posts/v2/{post-type}/{post_id}/comments
- Create comment: POST /wp-json/dt-posts/v2/{post-type}/{post_id}/comments
- Update comment: POST /wp-json/dt-posts/v2/{post-type}/{post_id}/comments/{comment_id}
- Delete comment: DELETE /wp-json/dt-posts/v2/{post-type}/{post_id}/comments/{comment_id}
Activity
- Get activity: GET /wp-json/dt-posts/v2/{post-type}/{post_id}/activity
- Get one activity: GET /wp-json/dt-posts/v2/{post-type}/{post_id}/activity/{activity_id}
Shares
- Get shares: GET /wp-json/dt-posts/v2/{post-type}/{post_id}/shares
- Add shares: POST /wp-json/dt-posts/v2/{post-type}/{post_id}/shares
- Remove shares: DELETE /wp-json/dt-posts/v2/{post-type}/{post_id}/shares
Following
- Get users following: GET /wp-json/dt-posts/v2/{post-type}/{post_id}/following
Settings
- Get settings: GET /wp-json/dt-posts/v2/{post-type}/settings
- Multi_select values: GET /wp-json/dt-posts/v2/{post-type}/multi-select-values