What are Server Resources
A server resource is a collection of available functions and objects associated with your organization. Once authenticated your application can make calls to these resources over SSL. Each server resource is contained within the result of an OpenPath envelope as described in the next section.
How Server Resources Work
The root of all requests are made to https://api-app.openpath.io/v1/ followed by the resource. For example if you wanted to get all your customers from the system, you would use https://api-app.openpath.io/v1/customer.
Calling a Single Record
If you want to grab a single customer record, you would make the same call but append the customer id to the endpoint as follows: https://api-app.openpath.io/customer/942.
Inline Resource Calls
Similarly, if you wanted to get all a customer's transactions, you can append the same endpoint with resource you want to grab from the customer, so now your endpoint would look like https://api-app.openpath.io/v1/customer/942/transaction. And, if you wanted to grab a single transaction you could do either https://api-app.openpath.io/v1/customer/942/transaction/23 or https://api-app.openpath.io/v1/transaction/23
Unsecured Root Endpoint
The endpoint below is the root endpoint and is one of two “unsecured” (meaning you do not need an authorized token to access) endpoints, the other being the actual authentication endpoint to get a security tokens from. Since the below endpoint is a GET request and unsecured you can test this endpoint through a web browser.
Endpoint Actions
Some endpoints will have additional actions which can perform certain functions on that server resource, such as processing a transaction. These actions are appended to the endpoint as a query string. For example, to process a queued transaction you could make the following call https://api-app.openpath.io/queue/19/pending/5?accept=true. In this case the action is Accept which decides if the transaction should be killed right there in the queue or passed on to be processes.
The above are unique actions which may or may not apply to resources; however there are also common actions which can be applied to all resources and are described in the next section about Envelopes.
HTTP Verbs
The http verbs are how the http request is made (e.g. POST, GET, PUT and DELETE). These verbs determine how you interact with the resource. The follow is the list of verbs and their functions.
POST Create a new record in the server resource.
GET Read the data from the server resource.
PUT Update an existing record in the server resource.
DELETE Remove the record from the server resource.
Calling a Single Record
If you want to grab a single customer record, you would make the same call but append the customer id to the endpoint as follows: https://api-app.openpath.io/customer/942.
Inline Resource Calls
Similarly, if you wanted to get all a customer's transactions, you can append the same endpoint with resource you want to grab from the customer, so now your endpoint would look like https://api-app.openpath.io/v1/customer/942/transaction. And, if you wanted to grab a single transaction you could do either https://api-app.openpath.io/v1/customer/942/transaction/23 or https://api-app.openpath.io/v1/transaction/23
Unsecured Root Endpoint
The endpoint below is the root endpoint and is one of two “unsecured” (meaning you do not need an authorized token to access) endpoints, the other being the actual authentication endpoint to get a security tokens from. Since the below endpoint is a GET request and unsecured you can test this endpoint through a web browser.
Endpoint Actions
Some endpoints will have additional actions which can perform certain functions on that server resource, such as processing a transaction. These actions are appended to the endpoint as a query string. For example, to process a queued transaction you could make the following call https://api-app.openpath.io/queue/19/pending/5?accept=true. In this case the action is Accept which decides if the transaction should be killed right there in the queue or passed on to be processes.
The above are unique actions which may or may not apply to resources; however there are also common actions which can be applied to all resources and are described in the next section about Envelopes.
HTTP Verbs
The http verbs are how the http request is made (e.g. POST, GET, PUT and DELETE). These verbs determine how you interact with the resource. The follow is the list of verbs and their functions.
POST Create a new record in the server resource.
GET Read the data from the server resource.
PUT Update an existing record in the server resource.
DELETE Remove the record from the server resource.
Actions
None
Endpoints
GET https://api-app.openpath.io/v1
Returns the basic information about this API.
Root Request
GET /v1 HTTP/1.1
Host: api-app.openpath.io
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
Root Response
{
"organization": "OpenPath, Inc.",
"application": "OpenPath API",
"version": "1.1.0.0",
"copyright": "Copyright ©2016 OpenPath, Inc.",
"name": "OpenPath Root",
"description": "This is the root restful application programming interface for the OpenPath application. Unauthorized access is strictly prohibited.",
"result": null,
"paging": {
"count": 0,
"page": 1,
"size": 1
},
"status": 200,
"status_message": "OK",
"errors": null
}
Returns the basic information about this API.
Root Request
GET /v1 HTTP/1.1
Host: api-app.openpath.io
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
Root Response
{
"organization": "OpenPath, Inc.",
"application": "OpenPath API",
"version": "1.1.0.0",
"copyright": "Copyright ©2016 OpenPath, Inc.",
"name": "OpenPath Root",
"description": "This is the root restful application programming interface for the OpenPath application. Unauthorized access is strictly prohibited.",
"result": null,
"paging": {
"count": 0,
"page": 1,
"size": 1
},
"status": 200,
"status_message": "OK",
"errors": null
}