Download
Last stable v 5.2 2024-11-01
API URL | /url/get/:id |
Description | Get CMS page info RESTFul API |
Access | Restricted to roles: admin, demo |
Rquest method | GET |
Request data type | URL route parameters |
Request data |
|
Response type | JSON |
Response data |
{
rc: 'return code', // '0' - success, '1' - error
msg: 'success', // error message
data: {
mdl: '1', // 1 - page has assigned model page, 0 - not assigned model
mdl_title: 'model-page', // assigned to page model title
id: 'page id in DB table', // ex. '1'
type: '0', // page type: 0 - regular, 1 - model, 2 - sample
title: 'page title', // ex. 'Samples'
title_full: 'page extended title', // ex. 'All samples related to something'
meta: {
title: 'page title',
desc: 'page description',
keyw: 'page keywords',
lang: 'page language id' // ex 'en'
},
dir_id: 'page folder id in DB table',
dir_path: 'path to page',
seq: "56704a4f7fd51", // unique SEQ
pid: 'page pernament unique ID', // ex. '53d021ace89c4',
code: 'page type code', // ex. 'regular'
code_title: 'page type title', // ex. 'Regular site page'
url: 'page URL', // ex. '/samples'
url_alias: [array of alias URL],
redirect: '0', // 0 - no redirect, 1 - redirect to another URL
redirect_url: '', // redirect URL, ex. 'http://www.google.com' if redirect=1
redirect_code: 'HTTP redirect code',
public: '1', // 1 - page public available, 0 - no public available
public_start: '0000-00-00 00:00:00', // when page public availability starts (if public=1)
public_stop: '9999-00-00 00:00:00', // when page public availability stops (if public=1)
mdl_id: 'model ID',
mdl_doc_id: 'model page ID',
tpl_key: '', // '' - if default template, 0 - template located in one of smarty template folders, 1 - template located in files sytems under '/cms/files'
tpl_title: '', // '' - if default template, template name if tpl_key=0, template file path if tpl_key=1
tpl_file: '', //'' - if default template, template file name if tpl_key=0, template file path if tpl_key=1
fnc: '', // '' - default URL routing function, 'class::function' - URL routing function (PHP class must be declared)
life: '', // page caching life time in sec
sitemap: '1', // 1 - include page into sitemap, 0 - don't include
sitemap_priority: '0.6', // page priority 0.0 ... 1.0
sitemap_frequency: '3', // page update frequency: 0 - always, 1 - hourly, 2 - daily, 3 - weekly, 4 - monthly, 5 - yearly, 6 - never
search: '1', // 1 - include page into search index, 0 - don't include
index: '1', // 1 - page include into full-text indexing and serach
boost: '1.0', // boost level for page in full-text search
top: [['2','topic_code'], ...], // topic array
opt: [['2','','option text'], ...], // options array
onl: [['1', 'optional data id', 'optional data'], ...], // optional data array
method: '[]', // request method JSON array, ex. ["GET","POST"]
files: [['0', 'file id', 'file path', 'caching', 'life'], ...], // caching: '', 'caching', 'nocache', 'inline'; life: -1, 0-n (in secs)
css: [['type', '', 'file'], ...], // style sheet files, type: 0 - file path under '/cms/files', 1 - CMS config defined, 2 - external URL
js: [['type', '', 'file'], ...], // javascript files, type: 0 - file path under '/cms/files', 1 - CMS config defined, 2 - external URL
creator: 'page creator user ID', // ex. '0',
creator_name: 'page creator user name', // ex. 'CMS',
creator_timestamp: 'page create timestamp', // ex. '2015-12-31 17:57:16'
editor: 'last update editor name', // ex. 'Linkoln Edgar', 'CMS' - if cms builtin administrator
timestamp: 'last update timestamp', // ex. '2013-09-02 15:04:33'
acc: { // access control data
acl: { // access control list
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', ...]
}
},
acl_inherit: { // inherited access control list; top folder inherits permissions from Pages tool roles: admin, demo (r/o)
r: { // inherited read permission - actual only in Pages tool
g: ['group code', ...], // group/role permissions, ex. ['admin','demo']
u: ['user id', ...] // user permissions, ex. ['jsmi']
},
w: { // inherited write permission - actual only in Pages tool
g: ['group code', ...],
u: ['user id', ...]
},
e: { // inherited execute permission - controls permission for page execution in browser
g: ['group code', ...],
u: ['user id', ...]
},
m: { // inherited manage permission - actual only in Pages tool
g: ['group code', ...],
u: ['user id', ...]
}
},
inherit: '1', // 1 - inheritance is alowed, 0 - inheritance is not alowed
manage: '1' // 1 - logged user has permission to manage permissions, 0 - logged user does not have permission to manage permissions
},
data: [ // datastreams
[ // datastream
'0',
'data stream type', // types: '0' - storage, '1' - file, '2' - redirect
'data stream code', // ex. 'pdf'
'data stream ID', // ex. 'license'
'file path or URL', // ex. '/cms/files/license.pdf' - not applicable for type='storage'
'mime type', // ex. 'application/pdf'
'file size', // ex. '284847'
'available via URL', // '1' - available, '0' - not available
'date, time of availability start', // ex. '0000-00-00 00:00:00'
'date, time of availability stop', // ex. '9999-00-00 00:00:00'
{ // data stream access control data
acl: { // access control list
i: '1',
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', ...]
}
},
inherit: '1', // 1 - inheritance is alowed, 0 - inheritance is not alowed
manage: '1' // 1 - logged user has permission to manage permissions, 0 - logged user does not have permission to manage permissions
},
'XML metadata' // optional, ex. '<dc><identifier>aaa</identifier></dc>'
]
...
]
}
}
|