Advertisement

Persistent API Issue

For Joomla! 5.x Coding related discussions, you could also use: http://groups.google.com/group/joomla-dev-general

Moderators: ooffick, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
WW-Jay
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Jan 23, 2025 4:44 pm

Persistent API Issue

Post by WW-Jay » Thu Jan 23, 2025 5:07 pm

Hello all,

I'm hoping someone can help me solve a persistent issue I've been having with the webservice API on a Joomla 5 site for the past few weeks.

To cover the common troubleshooting steps, I have confirmed that all webservice plugins are installed and enabled, and I am using a valid API auth token from a superuser account on the site. Now on to the issue:

Running a GET request from the site for articles (https://domain.com/api/index.php/v1/content/articles) correctly returns all articles; however, the title field is always missing, for example this is an exert from the request, sanitised:

Code: Select all

    "data": {
        "type": "articles",
        "id": "150",
        "attributes": {
            "typeAlias": "com_content.article",
            "id": 150,
            "asset_id": 385,
            "title": "",
            "alias": "get-response",
            "state": 1,
            "created": "2025-01-23 16:47:05",
            "created_by": 349,
            "created_by_alias": "",
            "modified": "2025-01-23 16:47:12",
            "modified_by": 349,
            "publish_up": "2025-01-23 16:47:05",
            "publish_down": null,
The article has a title of "Get Response", visible in the front-end, back-end, and database of the site, and I have been unable to troubleshoot why it's missing from the response.

The 2nd part of the issue, I imagine, stems from the same point, which is that when attempting a POST request to create a new article, even using the example payload from the API docs:

Code: Select all

{
    "alias": "my-article",
    "articletext": "My text",
    "catid": 64,
    "language": "*",
    "metadesc": "",
    "metakey": "",
    "title": "Here's an article"
}
Will always return me the same 400 error:

Code: Select all

{
    "errors": [
        {
            "title": "Field required: Title"
        }
    ]
}
I'm hoping someone with some more experience with the webservices API, or this particular can point me in the right direction?

Thanks in advance!

Jay

Advertisement
Advertisement
Post Reply

Return to “Joomla! 5.x Coding”