3. The scope name is arbitrary. If you register your own scope, it will be available in the list of permissions for local applications. To add methods to an existing scope, specify the method name. If you add methods that are available to all applications, specify the constant \CRestUtil::GLOBAL_SCOPE instead of the name.
The method name is also arbitrary, both upper and lower case are allowed. But it is recommended to stick to the lower case. The traditional naming is scope_name.entity_name.action.
```php
http://cp.sigurd.bx/rest/sigurdtest.test?auth=qcdfzzjtp8hvcbjl42eg93wuw5n0mvsb&test=222
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"result": {
"myresponse": "My own response",
"yourquery": {
"test": "222"
}
}
}
http://cp.sigurd.bx/rest/sigurdtest.test.xml?auth=qcdfzzjtp8hvcbjl42eg93wuw5n0mvsb&error=1
HTTP/1.1 402 Payment Required
Content-Type: text/xml; charset=utf-8
<?xml version="1.0" ?>
<response>
<error>ERROR_CODE</error>
<error_description>Message</error_description>
</response>
Todo
Description
When creating your own applications for boxed editions, there is a need to add new methods for them to the REST API. Procedure:
Example