Download
Last stable v 5.2 2024-11-01
API URL | /lng/put |
Description | create new or update CMS language info RESTFul API |
Access | Restricted to roles: admin, demo (r/o) |
Rquest method | POST |
Request data type | Request raw data |
Request data |
{
id: 'language id in DB table', // ex. '1' (applicable only if language update)
doc_id: 'assigned to language default page id in DB table', // ex. '1' (applicable only if page assigned to language)
name: 'language name', // ex. "English"
title: 'assigned to language default page title', // ex. 'Home' (copy of title_doc)
title_doc: 'assigned to language default page title', // ex. 'Home'
title_full: 'assigned to language default page extended title', // ex. 'All samples related to something'
desc: 'assigned to language default page description',
keyw: 'assigned to language default page keywords',
lang: assigned to language 'default page language id', // ex 'en'
code: 'language_free_code', // ex. 'eng'
code_id: 'language_classificator_id', // ex. 'en'
locale: 'locale code', // ex. 'en_US.utf8'
short: 'language short name', // ex. 'EN'
url: 'language URL', // ex. '/eng'
url_alt: 'alternative language URL', // ex. '#eng' (for jQuery onclick event usage)
def: '1', // 1 - default site language, 0 - not default
public: '1', // 1 - language public available, 0 - no public available
public_start: '0000-00-00 00:00:00', // when language public availability starts (if public=1)
public_stop: '9999-00-00 00:00:00', // when language public availability stops (if public=1)
access_changed: '1', // 1 - access data was changed, 0 - access data remains unchanged
access: { // access control data
i: '1', // 1 - inheritance is alowed, 0 - inheritance is not alowed
r: { // read permission - actual only in Pages tool
g: ['group code', ...], // group/role permissions, ex. ['admin','demo']
u: ['user id', ...] // user permissions, ex. ['jsmi']
},
w: { // write permission - actual only in Pages tool
g: ['group code', ...],
u: ['user id', ...]
},
e:{ // execute permission - controls permission for page execution in browser
g: ['group code', ...],
u: ['user id', ...]
},
m:{ // manage permission - actual only in Pages tool
g: ['group code', ...],
u: ['user id', ...]
},
rep: '1' // 1 - replace access control data in all child nodes, 0 - do not replace
},
manage: '1' - current user has permissions to change access control data
}
|
Response type | JSON |
Response data |
{
rc: 'return code', // '0' - success, '1' - error
msg: 'return message', // error message
data:[
key: 'language free code', // ex. 'eng'
filter: 'language id in DB table', // ex. '1'
title: 'language title', // ex. 'English'
url: 'language url', // ex. '/eng'
type: '1',
folder: true,
tooltip: 'language tooltip text',
editor: 'last update editor name', // ex. 'Linkoln Edgar', '0' - if cms builtin administrator
timestamp: 'last update timestamp' // ex. '2013-09-02 15:04:33'
]
}
|