API Store Guides

Quick Start

Step

Description

Reference

1

Browse through the API store to determine which APIs you want use for your applications.

https://api.canada.ca/en/

2

Create an account in the API store by signing up.

How do I get access to the API Store?

3

Select an API and signup to its plan.

How do I subscribe to an API?

4

Test the API.

How do I test an API before I subscribe to it?

5

Call the API in your application.

How do I call an API?

How do I access the API Store?

To use an API in the API Store, you must have an account.

  1. In the API Store main page, click Register/Login.
  2. Click Register. The Register to the API Store page opens.

3.  Enter your credentials and click Register. A confirmation email will be sent to you by the administrator.

4.  Click the link in the email. Click the link on the page to verify.  The User login page opens in your browser.

5.  Enter your credentials and click Log in.

How do I subscribe to an API?

Before you can use an API, you must subscribe to an API plan. The plan determines the number of API calls that your application can make. Some plans require approval. Think about what you need and choose the most suitable plan. Once your application is subscribed to a plan, the application is assigned a unique User Key (i.e. the user_key parameter). You must use this User Key when you call an API.

  1. Login to the API Store.
  2. Select the API listing link from the Menu drop down at the top of the page.
  3. Select the API you want to use for your application.  The API details page opens.
  4. Click the Plans tab, then click the Subscribe to this plan button for the plan you have chosen. The Subscribe to API page opens.

  5.   In the Nickname and Description boxes, enter your application's information (see above).
  6.   Click Subscribe.  The Subscription Summary page opens.
  7.   Make a note of the User Key so you can use it in your API calls.

You can use the subscription after your Administrator sends you an email indicating your application has been approved.

How do I manage my API subscriptions?

  1. Login to the API Store.
  2. Select the Subscriptions link at the top right of the page.  The My Subscriptions page lists your subscriptions.
  3. Select your subscription. The Subscription summary page opens.
  4. Click Edit <subscription name>.

How do I get the user key for an application?

  1. Login to the API Store.
  2. Select the Subscriptions link at the top right of the page.  The My Subscriptions page lists your subscriptions.
  3. Select the subscription. The Subscription summary page opens.
  4. See the User Key section.  This is the key used in API calls.

How do I regenerate the user key for my application?

  1. Login to the API Store.
  2. Select Subscriptions link at the top right of the page .
  3. Select your subscription.  The Subscription summary page opens.
  4. In the User Key section, click .
  5. Make a note of the User Key so you can use it in the API calls.

How do I use the user key?

The user key must be passed in the header rather than the URI as shown in the below example.

curl "https://cipo-gsm-ised-isde-apicast-production.api.canada.ca/app/scr/api/cgs/classes" -H'user-key: 115aaa43e7d95df63d62eecbfab21e8d'

Notes:

  • Use the -H or –header option.
  • Replace  user-key  with the user key found in the API Store Subscriptions page in the User Key section.

How do I test a REST API before I subscribe to it?

  1. Login to the API Store.
  2. Select the API listing link from the Menu drop down  at the top of the page.
  3. Select the API.  The API details page opens.
  4. Expand the API operations by clicking the operation (for example, GET) or click Expand Operations.
  5. Enter the required parameters in the Value boxes.
  6. Click Try it out!