Organization webhooks

Overview

Organization webhooks empower downstream products to automatically record and respond to changes regarding access to datasets/projects within an organization. This enables a more efficient, reactive, and automated workflow in managing dataset access.

Understanding Organization Webhooks

When you set up an organization webhook in the Settings tab of your organization, it activates notifications for specific events related to dataset/project access. These events include when:

  • A request for access to a dataset/project is made
  • Access is granted to a dataset/project
  • Access is removed from a dataset/project

How Webhooks work

A webhook triggers a POST request to the URL you specify in your organization's settings. The payload of this request typically contains important details like:

FieldDescription
eventTypeWill be "dataset.authorization.created", "dataset.authorization.deleted", "dataset.authorization_request.created".
granteeEmailThe email of the user who is requesting or being granted access.
granteeIdThe data.world ID of the user who is requesting or being granted access.
granteeTypeEither "USER" for an individual user, or "ORGANIZATION" if an entire organization is granted access.
resourceOwnerThe data.world ID of the owner of the dataset. This should match your org ID that you configured the webhook on.
resourceIdThe data.world ID of the resource. When combined with resourceOwner, you can construct a URL to the resource, for example: https://data.world/{resourceOwner}/{resourceId}.
authorizationLevelThe access level, either NONE, READ, WRITE, or ADMIN.
requestFormFieldsA customized key-value set of customizable form fields a user fills out when requesting access.
eventMetadata about the event, such as timestamp and the data.world ID of the user that triggered the event.

This table outlines the structure of the request body sent to your organization's webhook URL when certain events related to dataset authorizations occur on data.world.

Example JSON Payload

{
  "eventType": "dataset.authorization_request.created",
  "granteeEmail": "[email protected]",
  "granteeId": "test-user",
  "granteeType": "USER",
  "resourceOwner": "my-test-org",
  "resourceId": "sample-test-dataset",
  "authorizationLevel": "READ",
  "event": {
    "triggeredBy": "test-user",
    "created": "Thu, 20 Sep 2019 19:10:45 GMT"
  },
  "requestFormFields": {
    "Full name": "test-user",
    "Contact email": "[email protected]",
    "Message": "This is a message test-user typed when requesting access"
  }
}

How to Enable Organization Webhooks

To enable organization webhooks:

  1. Go to the organization where you want to enable webhooks.
  2. On the Organization profile page, select the Settings tab > Webhooks section.

webhooks-settings

  1. In the Webhooks configuration window, provide the Webhook URL and a brief description. Select Submit. The webhook has been configured.