Custom api Invalid api path
Your action name should be
$action = 'syncreports_sync.info';
In general here is how an API v1 method name should look.
entity_alias.method
| |
| |------------the name of the method to call.Child of the `<methods>` tag in the `api.xml` file
|
|--- the tag name you specified in `api.xml` inside the `<resources>` tag
[EDIT]
Your other issue is caused by the fact that you are missing the model declarations in config.xml
.
Add this inside the <global>
tag
<models>
<syncreports>
<class>Mycompany_Syncreports_Model</class>
</syncreports>
</models>
If you want to use mycompany_syncreports
as a model alias just like you do for helpers put this xml instead of the above
<models>
<mycompany_syncreports>
<class>Mycompany_Syncreports_Model</class>
</mycompany_syncreports>
</models>
But in this case you need to modify your api.xml
.
Change this line:
<model>syncreports/sync_api</model>
To this one
<model>mycompany_syncreports/sync_api</model>