Resource functions
- add_alternative_file
- copy_resource
- create_resource
- delete_alternative_file
- delete_comment
- delete_resource
- get_alternative_files
- get_edit_access
- get_related_resources
- get_resource_access
- get_resource_all_image_sizes
- get_resource_comments
- get_resource_data
- get_resource_field_data
- get_resource_log
- get_resource_path
- get_resource_types
- put_resource_data
- relate_all_resources
- replace_resource_file
- resource_file_readonly
- resource_log_last_rows
- upload_file
- upload_file_by_url
- upload_multipart
- update_related_resource
- update_resource_type
- get_resource_collections
- validate_upload_url
Collection functions
- get_user_collections
- add_resource_to_collection
- remove_resource_from_collection
- create_collection
- delete_collection
- search_public_collections
- get_collection
- save_collection
- show_hide_collection
- send_collection_to_admin
- get_featured_collections
- delete_resources_in_collection
- collection_add_resources
- collection_remove_resources
- get_collections_resource_count
- reorder_featured_collections
Search functions
IIIF
Metadata functions
User functions
System
Message functions
Plugin functions
- consentmanager_get_consents
- licensemanager_get_licenses
- consentmanager_get_consent
- consentmanager_delete_consent
- consentmanager_batch_link_unlink
- consentmanager_link_consent
- consentmanager_unlink_consent
- consentmanager_create_consent
- consentmanager_update_consent
- consentmanager_get_all_consents
- consentmanager_get_all_consents_by_collection
- consentmanager_save_file
- faces_set_node
Share functions
Tab functions
Dash functions
resource_log_last_rows
Retrieve recent entries from the resource log
| Variable | Description | Data type | Default |
|---|---|---|---|
| $minref | The minimum ref (id) of the log entry to retrieve | integer | 0 |
| $days | Number of recent days entries to return. Default = 7 (this is ignored if minref is supplied). | integer | 7 |
| $maxrecords | Maximum number of records to return. Default = all rows (0) | integer | 0 |
| $field | Limit results to particular metadata field IDs. To filter by multiple fields use a CSV (e.g "8,73") | string | (empty) |
| $log_code | Limit results to particular log code(s) (see below). To filter by multiple codes use a CSV (e.g "x,X") | string | (empty) |
Return values
Log entries in JSON format, including date, ref, resource, type (type of log entry), resource_type_field, user ID, notes, diff and usageoption value
ref
The ref value is the database table unique identifier for the log entry.
type
The type field records the type of log entry. The value is a log code, defined in ResourceSpace code base file include/definitions.php. Below are the possible values for the type field:
a --- LOG_CODE_ACCESS_CHANGED b --- LOG_CODE_ALTERNATIVE_CREATED c --- LOG_CODE_CREATED C --- LOG_CODE_COPIED d --- LOG_CODE_DOWNLOADED e --- LOG_CODE_EDITED E --- LOG_CODE_EMAILED l --- LOG_CODE_LOGGED_IN m --- LOG_CODE_MULTI_EDITED N --- LOG_CODE_NODE_REVERT o --- LOG_CODE_CREATED_BY_CHANGED O --- LOG_CODE_USER_OPT_IN p --- LOG_CODE_PAYED r --- LOG_CODE_REVERTED_REUPLOADED f --- LOG_CODE_REPLACED R --- LOG_CODE_REORDERED s --- LOG_CODE_STATUS_CHANGED S --- LOG_CODE_SYSTEM t --- LOG_CODE_TRANSFORMED u --- LOG_CODE_UPLOADED U --- LOG_CODE_UNSPECIFIED v --- LOG_CODE_VIEWED x --- LOG_CODE_DELETED + --- LOG_CODE_ENABLED - --- LOG_CODE_DISABLED X --- LOG_CODE_LOCKED Y --- LOG_CODE_UNLOCKED r --- LOG_CODE_COLLECTION_REMOVED_RESOURCE R --- LOG_CODE_COLLECTION_REMOVED_ALL_RESOURCES D --- LOG_CODE_COLLECTION_DELETED_ALL_RESOURCES d --- LOG_CODE_COLLECTION_DELETED_RESOURCE a --- LOG_CODE_COLLECTION_ADDED_RESOURCE c --- LOG_CODE_COLLECTION_ADDED_RESOURCE_COPIED m --- LOG_CODE_COLLECTION_ADDED_RESOURCE_COMMENT * --- LOG_CODE_COLLECTION_ADDED_RESOURCE_RATING S --- LOG_CODE_COLLECTION_SHARED_COLLECTION E --- LOG_CODE_COLLECTION_EMAILED_COLLECTION s --- LOG_CODE_COLLECTION_SHARED_RESOURCE_WITH T --- LOG_CODE_COLLECTION_STOPPED_SHARING_COLLECTION t --- LOG_CODE_COLLECTION_STOPPED_RESOURCE_ACCESS X --- LOG_CODE_COLLECTION_DELETED_COLLECTION b --- LOG_CODE_COLLECTION_BATCH_TRANSFORMED A --- LOG_CODE_COLLECTION_ACCESS_CHANGED Z --- LOG_CODE_COLLECTION_COLLECTION_DOWNLOADED