Skip to content

Server API

DeclanBuckley edited this page Jan 25, 2021 · 12 revisions

Home / Developer / Server Tier / API

Definition of the API methods and example API call.

Summary.

The API classes contain the API methods, each of which is an entry point to the application for API clients. Typically the methods will call one of the BSO classes that inherit the BaseTemplate classes.

Example.

public class Comment_API 
{
    public static dynamic Create(JSONRPC_API requestApi)
    {
        return new Comment_BSO_Create(requestApi).Create().Response;
    }

    public static dynamic Update(JSONRPC_API requestApi)
    {
        return new Comment_BSO_Update(requestApi).Update().Response;
    }

    public static dynamic Delete(JSONRPC_API requestApi)
    {
        return new Comment_BSO_Delete(requestApi).Delete().Response;
    }
}

Example of an API call.

An API is called from an external client, using the namespace, API and method name along with any required parameters. An example is shown below:

{ "jsonrpc": "2.0", "method" : "PxStat.System.Navigation.Navigation_API.Read", "params" : { "RlsCode":188 }, "id": "2" }

Clone this wiki locally