Any endpoint of this controller requires an administrator logged in on rest API. Check authentication chapter from WordPress rest API handbook for more information.
Schema # The schema defines all the fields that exist for a log object.
id
integer
Unique identifier for the object.
Context: view
, edit
, embed
meta
object
Meta fields.
Context: view
, edit
title
string
The title for the object.
Context: view
, edit
, embed
type
string
Type of log for the object.
Context: view
, edit
, embed
trigger_type
string
Trigger of log for the object.
Context: view
, edit
, embed
access
string
Access of log for the object.
Context: view
, edit
, embed
user_id
integer
The ID for the user of the object.
Context: view
, edit
, embed
date
string
The date the object was created, in the site's timezone.
Context: view
, edit
, embed
Example Request # curl -X OPTIONS -i http://website.com/wp-json/wp/v2/gamipress-logs
List Logs # Arguments # context
Scope under which the request is made; determines fields present in response.
Default: view
One of: view
, embed
, edit
page
Current page of the collection.
Default: 1
per_page
Maximum number of items to be returned in result set.
Default: 10
search
Limit results to those matching a string.
offset
Offset the result set by a specific number of items.
order
Order sort attribute ascending or descending.
Default: desc
One of: asc
, desc
orderby
Sort collection by object attribute.
Default: log_id
One of: log_id
, title
, type
, trigger_type
, access
, user_id
, date
, include
, relevance
type
Limit result set to logs with a specific type.
One of: event_trigger
, achievement_earn
, achievement_award
, points_earn
, points_deduct
, points_expend
, points_award
, points_revoke
, rank_earn
, rank_award
trigger_type
Limit result set to logs with a specific trigger.
access
Limit result set to logs with a specific access.
One of: public
, private
user_id
Limit result set to logs assigned to specific users.
exclude
Ensure result set excludes specific IDs.
include
Limit result set to specific IDs.
after
Limit response to logs after a given ISO8601 compliant date.
before
Limit response to logs before a given ISO8601 compliant date.
Definition # GET /wp/v2/gamipress-logs
Example Request # curl -X GET http://website.com/wp-json/wp/v2/gamipress-logs -d "search=test&order=desc"
Create a Log # Arguments # meta
Meta fields.
title
The title for the object.
type
Type of log for the object.
trigger_type
Trigger of log for the object.
access
Access of log for the object.
user_id
The ID for the user of the object.
date
The date the object was created, in the site's timezone.
Definition # POST /wp/v2/gamipress-logs
Example Request # curl -X POST http://website.com/wp-json/wp/v2/gamipress-logs -d "title=test&user_id=1"
Retrieve a Log # Arguments # id
Unique identifier for the object. context
Scope under which the request is made; determines fields present in response.
Default: view
One of: view
, embed
, edit
Definition # GET /wp/v2/gamipress-logs/<id>
Example Request # curl -X GET http://demo.wp-api.org/wp-json/wp/v2/gamipress-logs/<id>
Update a Log # Arguments # id
Unique identifier for the object.
meta
Meta fields.
title
The title for the object.
type
Type of log for the object.
trigger_type
Trigger of log for the object.
access
Access of log for the object.
user_id
The ID for the user of the object.
date
The date the object was created, in the site's timezone.
Definition # POST /wp/v2/gamipress-logs/<id>
Example Request # curl -X POST http://website.com/wp-json/wp/v2/gamipress-logs/<id> -d "title=test&user_id=1"
Delete a Log # Arguments # id
Unique identifier for the object.
Definition # DELETE /wp/v2/gamipress-logs/<id>
Example Request # curl -X DELETE http://demo.wp-api.org/wp-json/wp/v2/gamipress-logs/<id>
Doc navigation User Earnings Controller →