Dev Docs
  • Disciple.Tools Technical Documentation
  • Theme Core
    • API - Posts
      • List of Endpoints
      • Fields Format
      • Get Post
      • Create Post
      • Update Post
      • Post Comments
      • Post Activity
      • List Query
      • Global Search
      • Posts in Typeaheads
      • Post-Sharing
      • Get Following
      • Settings
    • API - Other
      • Users
      • Locations
      • Settings
    • Hooks
      • Record Page Hooks
      • API-Hooks
      • Public settings
      • Adding menu navigation links
    • Customization
      • Fields
      • Custom Post Types
      • Post Type Modules
      • Adding Fields and Tiles.
    • Authentication
      • JWT-Authentication-for-the-mobile-app
      • Site-to-Site-Link
      • Easy-Example
    • Permissions
    • Roles and Permissions
    • Database Tables
      • Activity Table
    • Disciple.Tools Translation
    • Revisions
      • v1.0.0-dev-changes
      • v1.0
  • Hosting
    • 404 Errors on new install
    • CRON
    • Hosting on WPEngine
    • Backups
    • Single Site or MultiSite
  • Disciple.Tools Development Setup
    • LocalWP
    • Mobile App Setup
    • Unit Tests
    • Cypress Tests
    • D.T on Docker Setup
    • Gulp - CSS and JS
  • Code Contribution
    • Theme Contribution Guidelines
    • How to Correctly Contribute to the Disciple Tools Repository
    • How to Translate Your Plugin
  • Style Guide
  • Disciple.Tools Code of Conduct
Powered by GitBook
On this page
  • Get Activity
  • Parameters
  • Returns
  • Get Singe Activity
  • Returns

Was this helpful?

Edit on Git
  1. Theme Core
  2. API - Posts

Post Activity

PreviousPost CommentsNextList Query

Last updated 3 years ago

Was this helpful?

Get Activity

Get

Parameters

  • number (int) optional. How many activities to return

  • offset (int) optional. How many activities to skip (for pagination)

Returns

[ 
   activity: (array) An array of activities. See below for format.
   total: (int) the number of activities in total
]

Activity list format:

[
  {
    "meta_key":"overall_status",
    "gravatar":"http:\/\/2.gravatar.com\/avatar\/id?s=16&d=mm&r=g",
    "name":"Me", //name of the user who did the activity
    "object_note":"Overall Status: Active",
    "hist_time":"1559128822", //when the activity happened
    "meta_id":"150", // the ID of the related post_meta field
    "histid":"179" // the ID of the activity
  },
  {
    ...activity2...
  }
]

Get Singe Activity

Returns

(array) The activity array.

Activity list format:

{
  "meta_key":"overall_status",
  "gravatar":"http:\/\/2.gravatar.com\/avatar\/id?s=16&d=mm&r=g",
  "name":"Me", //name of the user who did the activity
  "object_note":"Overall Status: Active",
  "hist_time":"1559128822", //when the activity happened
  "meta_id":"150", // the ID of the related post_meta field
  "histid":"179" // the ID of the activity
}

Get

https://example.com/wp-json/dt-posts/v2/{post_type}/{post_id}/activity
https://example.com/wp-json/dt-posts/v2/{post_type}/{post_id}/activity/{activity_id}