Invoking APIs‎ > ‎

The API Project URL

REST is usually an HTTP-based protocol. This page describes how the URL for your API is constructed.

The following code snippet shows a typical REST URL for your API:

[http: || https]://[server.company.com[:port[/ServerWAR]]]/[rest || data]/accountName/projectURLFragment/apiversion/request

Service

The leading portion of the URL locates the server. If you have installed the self-contained, single-user version of Live API Creator, which is a demonstration package and based on Jetty, use a URL similar to the following:

http://localhost:8080/rest/default/acme/v3/acme:customers/123

If you have a developer or production account, use a URL similar to the following:

https://server.acme.com/rest/default/acme/v3/customers/123

Depending on the options you have defined for your API, you may or may not be required to use HTTPs as the protocol.

Account/Project

The account/project portion is the name of your API Server account and the URL for your API. API Creator creates these when you sign up for Live API Creator and when you create an API. API names must be unique within your account.

For more information about the URL for your API, see Manage your API Project.

API Version/Request

The last (darkest) portion of the URL reflects the request you are coding. The first part is the name of the API version you are targeting. Your code might create a prefix for the service/project portion to be pre-pended to the request. To facilitate controlled migration over revisions, do not hard-code the API version into the URL.

The second part of the URL is the actual request. This is your resource name, followed by parameters (for example, the primary key, filters, and ordering). Your resource name is either a base table or a defined resource. You can specify resource names with dot notation to access contained resources (for example, OneCustomer.Orders).

For example, to read Order #1 in the Logic Demo API, using API version "v1":

http://server.acme.com/rest/default/logicdemo/v1/OneCustomer.Orders/1

For documentation purposes, you can shorten this to:

projURL/request