User tests: Successful: Unsuccessful:
Pull Request for Issue # .
added endpoints for content category history
GET v1/content/category/:id/contenthistory
PATCH v1/content/category/:id/contenthistory/keep
DELETE v1/content/category/:id/contenthistory
npm cypress run --spec tests/System/integration/api/com_contenthistory/Content_Category.cy.js
N/A
test + endpoint
As discussed, this API enhancement will be documented first in https://manual.joomla.org/migrations/54-60/new-features, please note:
id
for /v1/content/category/:id/contenthistory
is the contenthistory and NOT the category.id
PATCH
is only available for the attribute keep_forever
with /v1/content/category/:id/contenthistory/keep
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins JavaScript Unit Tests |
Title |
|
Labels |
Added:
Unit/System Tests
Documentation Required
Webservices
PR-5.3-dev
|
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-03-24 21:43:44 |
Closed_By | ⇒ | alikon |
Status | Closed | ⇒ | New |
Closed_Date | 2025-03-24 21:43:44 | ⇒ | |
Closed_By | alikon | ⇒ |
Status | New | ⇒ | Pending |
Title |
|
Labels |
Added:
PR-5.4-dev
Removed: Documentation Required PR-5.3-dev |
yes, of course
but i'll be slow, i'm short in free time currently
Category | Front End Plugins JavaScript Unit Tests | ⇒ | Administration Language & Strings Front End Plugins JavaScript Unit Tests |
Title |
|
I have tested this item 🔴 unsuccessfully on 6ceaaf1
I have tested with current 6.0-dev and curl command line (script and output will be attached to the PR)
GET /v1/content/category/:id/contenthistory
-> 401 "Unauthorized" with error "Forbidden"PATCH /v1/content/category/:id/contenthistory/keep
-> 401 "Unauthorized" with error "Forbidden"DELETE /v1/content/category/:id/contenthistory
-> 401 "Unauthorized" with error "Forbidden"GET /v1/content/category/:id/contenthistory
-> 200 "OK" and returning the entry in JSON formatPATCH /v1/content/category/:id/contenthistory/keep
-> 200 "OK" and empty return
GET
has "keep_forever" : 1
setDELETE /v1/tags/:id/contenthistory
-> 204 "No Content" end no content returned
GET /v1/content/category/4711/contenthistory
-> 200 "OK" and json structure with self link and empty data and empty metaPATCH /v1/content/category/4711/contenthistory/keep
-> 400 "Bad Request" with JSON error "Changed the keep forever value for a history version."DELETE /v1/content/category/4711/contenthistory
-> 500 "Internal Server Error" with JSON error "RuntimeException"Not tested was the following. Should this or something elso be tested next time?
The database has been checked in parallel and regardless of this PR, the content history entries for content category are not deleted when the content category is deleted and I will extend the issue #45584 for this.
Regardless of this PR, testing also found that attempting to delete an not-trashed content category via the API results in 500, and I will create an issue for that.
There is are difference in the endpoints using singular and plural with #44669 is this intended? For example:
Thank you @alikon for your contribution and for adding System Tests for the new REST API category history functionality.
Is it possible to also test PATCH and DELETE requests in the System Tests after testing GET?
I would test in parallel with curl or postman and document this as the mentioned System Test spec is already included in the CI. And would ask around how to proceed with the documentation, e.g. there is no POST as the history entries are only created implicit.