Skip to main content

How to use CDB APIs with Postman

Postman provides a graphical interface for sending CDB API requests and inspecting responses. Authentication is configured at the collection level, a protection template is retrieved, and its id is reused in another request.

  1. 1

    Store the token

    Click Create new, then Environment. Name the environment CDB API. Add a variable named token and set the value to the API token.

    CDB API environment with the token variable

    Select CDB API in Environment.

    Environment menu listing CDB API
  2. 2

    Authorize the collection

    Create a collection. On its Authorization tab:

    1. Set Auth type to API Key.
    2. Set Key to Authorization.
    3. Set Value to apikey {{token}}.
    4. Set Add to to Header.
    Collection authorization set to API Key

    Requests in the collection use this header when their authorization is inherited.

  3. 3

    Read the templates

    Create a request in the collection. On the Authorization tab, the collection authorization is shown as Inherited.

    Set the method to GET and enter https://api.cdb-staging.cdn.orange.com/security/sifter/v3/templates as the request URL. The operation is List protection templates.

    Select Send.

    HTTP 200 means the request succeeded.

    List templates request returning HTTP 200

    Find the template named Basic in the response. In the CDB API environment, create a variable named template_id and set its value to the template's id.

  4. 4

    Read one template

    Create another request in the same collection. On the Authorization tab, the collection authorization is shown as Inherited.

    Set the method to GET and enter https://api.cdb-staging.cdn.orange.com/security/sifter/v3/templates/{{template_id}} as the request URL. The operation is Get protection template.

    Select Send.

    An HTTP 200 response confirms that the request succeeded. The response body contains the selected template.