Your First Construct API Call

After your App Registration and logging in the App Sandbox environment, you’re ready to make your first Construct API call!

Using a REST Client Tool

Construct API is a REST-based API using standard HTTP protocols to send client requests and receive response data. An easy way to call a Construct API method is to use a REST client tool such as Postman, which is a Chrome browser plugin that submits REST API requests. Postman allows you to quickly enter a request URI along with required HTTP request headers and parameters, send the request, and see the response data. The following procedure uses Postman to submit a Construct API call.

Calling a Construct API Method

The base URI

The Construct API uses the following base URI:

https://apis.accela.com

Construct API resource endpoints

The Construct API consists of API resources that allow civic applications to get, add, update, delete and search data on the Civic Platform. To call the Construct API, submit an HTTP request using a URL consisting of the base URI and a Construct API resource endpoint. The Construct API resource endpoints and their corresponding HTTP methods are listed by their descriptive names in the Construct API Reference.

For example, to call Get All Records, append the resource endpoint /v4/records to the base URI, as follows:

https://apis.accela.com/v4/records

The Construct API resources have required or optional request parameters. As appropriate, append required or optional request parameters to the request URL, such as the following example:

https://apis.accela.com/v4/records?module=ServiceRequest&status=Submitted

The example calls Get All Records to request the records for the ServiceRequest module and whose status is Submitted. The list of parameters and their descriptions are found on each API detail page in the Construct API Reference.

Putting it together

Using an HTTP client tool, submit the Get All Records request. (The following procedure uses Postman to submit the request; you can use any other tool that allows you to submit HTTP requests.):

  1. Enter the sample request URI:

    https://apis.accela.com/v4/records?module=ServiceRequest&status=Submitted
  2. Specify the HTTP method: GET

  3. Enter the HTTP headers:

    1. Click Headers.

    2. Add an Authorization header.

    3. For the Authorization header, enter the API access token.

      To get the API access token, follow the Test API Token procedure, using records as the scope.

  4. Click Send.

    The response data will be displayed in JSON format (by default).

See also the Accela Developer Blog: Getting Started with the Construct API for a live demonstration.