REST/SOAP endpoints

Learn how to create REST and SOAP endpoints.

A project requires an endpoint which is the access point for your project's pipeline. You can create either a REST or a SOAP endpoint.

Endpoints in a project

REST endpoints use HTTP 1.1 verbs (GET, POST, PUT, PATCH and DELETE) and a path to a resource to create the endpoint. The path can include path parameters which are defined using curly braces, such as {parameter}. Normally, the response is returned as JSON.

SOAP endpoints use .wsdl files, which are XML files, to create the endpoint.

A project can contain as many endpoints as required.

Any created endpoint is reachable with or without a trailing slash. For example, if your published endpoint is .../foo, then it is also reachable by .../foo/.

Path of an endpoint

The following shows a typical path of an endpoint.

<organization-name>/<project-name>/<resource>/<subresource>/{parameter}

Path element

Description

<organization-name>

Organization in which you created the project that contains the endpoint.

<project-name>

Project containing the endpoint.

<resource>

Top level exposed resource.

<subresource>

Subsequent level exposed resource.

{parameter}

Path parameter within curly braces { }.

Here is an example from the Quickstart.

/xapix-io-api-data/vehicle-demo/engines/{engine_id}.json

Path parameters are variable parts of a URL path. They are used to point to a specific resource. A URL can have several path parameters, each denoted with curly braces { }. The order of the path parameters are important. See Here for more details. ‚Äč

Using endpoint extensions such as .json or .xml

Using an extension ensures the response to a request made to the API is in the format indicated by the extension. This can be used in place of Accept headers which may be required when making a response from a browser, for instance. A browser may only accept JSON or XML; therefore, using an endpoint extension makes the format of the response explicit to the browser.

In the example shown below (also shown above), the extension is shown as .json. This causes a response from the API to be in JSON.

Likewise, if an endpoint had an .xml extension, the response would be formatted in XML.

# JSON response
/xapix-io-api-data/vehicle-demo/engines/{engine_id}.json
# XML response
/xapix-io-api-data/vehicle-demo/engines/{engine_id}.xml

In the case of a .json extention, the response provided by the API to this endpoint is formatted in JSON.

"manufacturer":"Remedy Engines",
"power_hp":"180",
"price":"4800.0"
}