Create new Joomla content via POST
TODO: Upcoming versions will include ability to automatically check for base64 endcoded content. This will faciliate passing content with special characters to the web service.
https://yourdomain.com/api/v1/content/create
Option | Description |
---|---|
Response formats | JSON |
Requires authentication | Yes, session-based or custom header token |
Rate limited | YES |
Name | Details |
---|---|
title |
|
alias |
|
introtext |
|
fulltext |
|
catid |
|
created_by_alias |
|
state |
|
access |
|
robots |
|
author |
|
rights |
|
xreference |
|
language |
|
You will need to character-encode your input to retain spaces and ensure special characters are not processed.
POST https://yourdomain.com/api/v1/content/create
?title=New Article Title
&introtext=Short introduction for your article.
&fulltext=This is the main content of your article.
&catid=7
&created_by_alias=
&state=1
&access=1
&robots=
&author=
&rights=
&xreference=
&language=en-GB
{
"msg":" Created: New Article Title",
"error": false,
"status": 200
}
The following response headers follow a successful article posting when using token authentication via custom header. Note the Rate Limitation headers which are included be cause a token authenticated this session.
HTTP/1.1 200 OK
Date: Sun, 25 Oct 2015 21:57:50 GMT
Server: Apache/2.2.15
X-Powered-By: PHP/5.4.45
Joomla-Sessionid: 3o993p9k9tf9cd99k99999q4p6
X-Rate-Calls-Remaining: 0
X-Rate-Limit-Limit: 0
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: origin, x-requested-with, content-type, token
Access-Control-Allow-Methods: PUT, GET, POST, DELETE, OPTIONS
Connection: close
Transfer-Encoding: chunked
Content-Type: application/json