Using Swagger Page

The CDE job options that you pass to the requests can get cumbersome. You can use the Swagger page to construct and test your requests.

You can access the Swagger page from the Virtual Cluster Service Details page by clicking API DOC as shown below.

An example procedure to construct and test request:

  1. Click the GET/jobs method in the jobs section.
  2. Click Try it out.
  3. Enter a few options in the provided fields. For example, ensure that the latestjob flag is set to true and enter name[eq]cde_api_job string in the first field.
  4. Click Execute.

    The Request URL field is populated now. You can use this to construct your next request, as shown below. Also a response preview is provided.

  5. Using the highlighted portion of the Request URL, construct a new request as shown below.
    # Show the latest job whose name is cde_cli_job
    curl -H "Authorization: Bearer $ACCESS_TOKEN" -X GET "$JOBS_API_URL/jobs?latestjob=true&filter=name%5Beq%5Dcde_cli_job&limit=20&offset=0&orderby=name&orderasc=true" \
              -H "accept: application/json" \
              -H "Content-Type: application/json"