createArticle
- Home
- Blogs & Articles
- UgcArticle
- createArticle
createArticle
Creates an article.
Parameters
| Name | Description |
| blogID required | Blog ID (Site ID) the article belongs to. |
| userID required | User ID that’s performing the action. |
| title required | Title of article. |
| body required | Body of article. |
| summary optional | Summary of article. |
| publishDate optional | Date when to publish an article. |
| output optional | The response output format. Accepts JSON and XML. |
Request Syntax
| https://services.onesite.com/rest/ugcArticle?action=createArticle&blogID=225642611&userID=229928503&title=My New Article&body=The body of my new article…&devkey=[devkey] |
JSON Response
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
{ "service":"ugcArticle", "action":"createArticle", "code":1, "message":"Article Successfully Created", "item":{ "articleID":"267412", "blogID":"225642611", "nodeID":"188234", "numVersions":"1", "numActiveVersions":"1", "dateCreated":"2019-02-04 13:40:17", "dateCreated_ts":1549309217, "firstPublished":"2019-02-04 13:40:18", "firstPublished_ts":1549309218, "status":"active", "permissions":"1048544289", "isPublic":"1", "numViews":"0", "rating":"0", "cms_url":"http://www.onesitedemo.com/cms/267412/my_new_article", "url":"http://www.onesitedemo.com/go/article/view/267412/my_new_article", "version":{ "versionID":"464685", "articleID":"267412", "blogID":"225642611", "nodeID":"188234", "title":"My New Article", "titleURL":"my_new_article", "summary":"", "body":"The body of my new article...", "layoutID":"0", "numPages":"1", "versionDate":"2019-02-04 13:40:18", "versionDate_ts":1549309218, "createdBy":"229928503", "versionStatus":"active", "attachments":null, "languages":[ false ], "publishDate":"2019-02-04 13:40:18", "publishDate_ts":1549309218 } } } |
Service Information
| Service | ugcArticle |
| Method | createArticle |
| Type | REST |
| Response Types | JSON, XML |