API Actions

Version 23.4.8843


API Actions


Use actions to extend the set of operations on resources and to execute unrelated actions on the server. Actions must be executed as an HTTP POST request. The following is an example action invocation:
使用 Action 来扩展对资源的 Action 集并在服务器上执行不相关的 Action 。 Action 必须作为 HTTP POST 请求执行。 以下是 Action 调用示例:

POST http://MyServer:MyPort/connector/MyAPIPortName/api.rsc/WashCar/
{
  Wax: "Wax_1"
}

这是相应的响应:

{"Complete": "Complete_1"} 

使用 URL 参数作为输入

如果客户端不支持 HTTP POST 方法,可以使用 URL 参数“@x-http-method”调用 Action。 然后可以将 Action 的输入指定为附加 URL 参数。 例如:

http://MyServer:MyPort/connector/MyAPIPortName/api.rsc/WashCar?@x-http-method=POST&URLparam1=my\_url\_parameter1&urlparam2=my\_url\_param2