Calling APIs
After you create the token header, you can open the API Reference and use the IBM® Guardium® Exposure Manager APIs.
Before you begin
Authorization header token.
You can also create and use an OAuth authorization token, as described in Accessing APIs with OAuth.
After you create the token header, you can read about and use the APIs from the API Reference.Note: When you click the link to the APIs, the next page warns you that you are leaving the IBM website. This message is expected. Click the redirect link to open the API landing page.
From the API landing page, click API Reference to go to the APIs.
The first time that you open the API reference, enter the following information in the API page:
- Authentication: Paste in the token header that you created in IBM Guardium Exposure Manager.
Note: Make sure that you include the entire header token as the Authorization header token, including the word
Basicfollowed by a space. For example,Basic N2Q1MDEyZGIt...YxZjIzNGJhYQ== - URL: Copy the URL from your IBM Guardium Exposure Manager instance, and click the default base URL to display the product URL window. Paste your URL into the product URL window (without the https:// prefix).
Note: If you use OAuth authentication, then you can also authenticate with the OAuth token, as follows:
- Call Get access token from the AuthServer API.
- Copy the generated command and paste it into a terminal window. For example:
curl --request GET \ --url https://mycompany.com/api/v3/oauth/token \ --header 'accept: application/json' \ --header 'authorization: Basic YjIwMDUzZT...2JiOmNZMlpqbW52ZVg=' - When you run the command, IBM Guardium Exposure Manager returns the following information:
{"access_token":"4Zt8brtAyw3m9yseT8mfmSgK8kNMimFDIeedpUSe","expires_in":"7200","token_type":"Bearer"} - You can now use the Bearer token for all of your APIs. For example:
curl --request GET \ --url https://mycompany.com/api/v3/dashboards \ --header 'accept: application/json' \ --header 'authorization: Bearer 4Zt8brtAyw3...imFDIeedpUSe'
At any time, you can select a programming language from the Language ribbon. The API interface offers plenty of choices. The default produces cURL commands.
About this task
Procedure
What to do next
You can now paste the API code into any command window or program, and run it from there.
Note: The Response window is not currently implemented.