-
Notifications
You must be signed in to change notification settings - Fork 19
Ximdex cms api: languages
Javi Carretero edited this page Sep 5, 2013
·
3 revisions
Ximdex CMS provides multiple languages that you can enable on the Control Panel. Also, you can query the Ximdex API too for this information:
Description | Log in into Ximdex CMS |
---|---|
URL | /api/lang |
Parameters | ximtoken (required): session token obtained with the login action. |
langid (optional): if present, the info of this specific language will be returned. | |
Response | Array of languages containing the following information about each one: IdLanguage, the language id; Name, the name of the language; IsoName, the language ISO code. |
Example | |
POST Request #1 | curl -X POST --data "ximtoken=XXABCDEFGHXX" http://example.org/ximdex/api/lang |
GET Request #1 | curl -X GET "http://example.org/ximdex/api/lang?ximtoken=XXABCDEFGHXX" |
Response #1 | {"error":0,"data":[{"IdLanguage":"10002","Name":"Spanish","IsoName":"es"},{"IdLanguage":"10003","Name":"English","IsoName":"en"}]} |
POST Request #2 | curl -X POST --data "langid=10002&ximtoken=XXABCDEFGHXX" http://example.org/ximdex/api/lang |
GET Request #2 | curl -X GET "http://example.org/ximdex/api/lang?langid=10002&ximtoken=XXABCDEFGHXX" |
Response #2 | {"error":0,"data":[{"IdLanguage":"10002","Name":"Spanish","IsoName":"es"}]} |