Puth Server Api
Puth is on the one hand a http server over which you work via remote prcedure calls on the remote objects.
#
Create ContextWith a POST request on /context you can create a context.
- Url:
/context
- Method:
POST
Data structure
#
Success response (Code: 200 OK)#
Delete ContextWith a DELETE request on /context you can delete a context.
- Url:
/context
- Method:
DELETE
Data structure
Example data
#
Success response (Code: 200 OK)#
Call on ContextWith a PATCH request on /context/call you can call a function on a remote object.
- Url:
/context/call
- Method:
PATCH
Data structure
If you don't provide an id
and a type
, Puth will call the function on the context object.
Example data
#
Success response (Code: 200 OK)In this example, the createBrowser
function instantiates a new browser object on the context and therefore responds with a GenericObject representation.
You can now use the id
and type
from the response to call functions on the new Browser
object.
For example: calling newPage
function on the browser object:
#
Get on ContextWith a PATCH request on /context/get you can get a property of a remote object.
- Url:
/context/get
- Method:
PATCH
Data structure
#
Success response (Code: 200 OK)#
Set on ContextWith a PATCH request on /context/set you can set a property to a specific value of a remote object.
- Url:
/context/set
- Method:
PATCH
Data structure
#
Success response (Code: 200 OK)#
Delete on ContextWith a PATCH request on /context/delete you can delete a property of a remote object.
- Url:
/context/delete
- Method:
PATCH
Data structure