About the Examples

The examples in this documentation use cURL to simulate GET, POST, PUT, and DELETE requests to the REST API. cURL is a command line tool for getting or sending JSON data using URL syntax.

Some of the more common cURL options include the following:

Option Description
--request Specify HTTP verb to use, for example POST (executes a GET if omitted).
--header Pass header information to the server.
--url Specify the REST endpoint you are exercising.
--include Include protocol headers in the output.

For example, you can force the server to return JSON in the response body by including a header line in the curl request that specifies the content-type application/json:

curl --request GET \
  --url 'https://{{url}}/contact/123456789' \
  --header 'authorization: Bearer {{oauth_token}}' \
  --header 'content-type: application/json'

The domain in the examples is represented by a variable, such as {{url}} in the preceding request. The variable typically resolves to a path such as company.deltek.com/company/api where the first instance of the company name is for the subdomain and the second instance of the company name indicates how to access the application in the case that the company uses other Deltek applications.