API

API

The Drova GRC API gives you access to a set of Drova GRC features for use in your own app to integrate with Drova GRC, such as getting GRC Records and Bulk Query data from Drova GRC.

Before you do anything, you should create a Service Account in your Drova GRC site so that you can make API calls.

Create authorisation credentials (GRC Service Account)

Any application that wants to integrate with Drova GRC APIs must have authorisation credentials that identify the application to Drova Identity OAuth 2.0 server.

The following steps explain how to create an authorisation credential (Service Account) for your Drova GRC Site. Your applications can then use the credentials to access APIs that you have enabled for that Drova GRC Site.

Go to the Menu > Maintainance > General > Service Accounts

Click on “Add service account” button and enter the info. Ensure you set the right permission for your service account to access the right module.

Open image-20231019-233713.png
Open image-20231019-233924.png

After creating your Service Account, copy or save the secret.txt file from the Create Service Account popup. Securely store the file in a location that only your application can access.

Please be aware that the Client Secret is only displayed once during the service account creation process. Once you exit this dialogue, you will not have access to it again.

Obtaining OAuth 2.0 access tokens

In order to use the Drova GRC API, you must first get an access token from the Service Account by using the get token endpoint.

Plain Text

curl -X POST \ https://auth.drova.com/oauth/token \ -H 'Content-Type: application/json' \ -d '{ "grant_type": "client_credentials", "client_id": "[client_id]", "client_secret": "[client_secret]", "audience": "https://api.drova.com/graphql" }'
  • audience: The public Drova API server must be https://api.drova.com/graphql

  • client_id: Your Service Account’s Client ID.

  • client_secret: Your Service Account’s Client Secret.

The response contains the access_token, token_type, expires_in (seconds), and scopes values, for example:

Plain Text

{ "access_token": "eyJz93a...k4laUWw", "token_type": "Bearer", "scope": "grc:triline:compliance:read grc:triline:compliance:write grc:triline:control-inventory:read grc:triline:control-inventory:write grc:triline:event:read grc:triline:event:write grc:triline:kri:read grc:triline:kri:write grc:triline:risk:read grc:triline:risk:write grc:triline:register:read grc:triline:register:write", "expires_in": 86400, }

Scopes

The access token's response scope would reflect the Service Account's current permission setting in Drova GRC.

Bellowing is the list of scopes that can be returned from OAuth Server

Scope

Description

Scope

Description

grc:triline:event:read

List of all Event records

grc:triline:risk:read

List of all Risk records

grc:triline:control-inventory:read

List of all Control Inventory records

grc:triline:kri:read

List of all Kri records

grc:triline:compliance:read

List of all Compliance records

grc:triline:register:read

List of all Register records

grc:triline:event:write

Manage all Event records

grc:triline:risk:write

Manage all Risk records

grc:triline:control-inventory:write

Manage all Control Inventory records

grc:triline:kri:write

Manage all Kri records

grc:triline:compliance:write

Manage all Compliance records

grc:triline:register:write

Manage all Register records

Query Drova GRC data with GraphQL



    • Related Articles

    • Perform bulk operations with the GraphQL API

      You can streamline data retrieval with the GRC GraphQL API by using bulk operations, which allow you to fetch data in large quantities asynchronously. This API is specifically designed to simplify handling pagination for extensive datasets. It ...
    • Understanding each Module's designed use case

      Module: Compliance Summary: Features: Advantage: Benefit Module: Risk Summary: Features: Advantage: Benefit: Module: Key Metrics/KRIs Summary: Features: Advantage: Benefit: Module: Event Register Summary: Features: Advantage: Benefit: Module: ...
    • Query records with GraphQL

      Drova chose GraphQL because it allows us to be very specific about the data we want, saving time and reducing unnecessary information. It's like ordering exactly what you need from a menu, whereas traditional REST APIs might serve you a full meal. ...
    • SSO FAQ

      General Q. Can SSO be used in combination with a normal password login? A. No. Our SSO system means that all users for a configured email domain will be required to use SSO to login. Q. Can I test SSO login before enabling? A. Drova can enable SSO on ...