Organization webhooks
Organization webhooks allow downstream products to automatically record and respond to changes regarding access to datasets/projects within your organization.
Once a webhook is configured in your Organization’s “Settings” tab, a webhook will be triggered for the following events:
Authorization is requested to a dataset/project in your org
Authorization is granted to a dataset/project in your org
Authorization is deleted from a dataset/project in your org
Organization webhooks are triggered via a POST
request to the URL provided on your Organization’s setting tab. The request body will typically include:
eventType
(will be “dataset.authorization.created”, “dataset.authorization.deleted”, “dataset.authorization_request.created”)granteeEmail
: The email of the user who is requesting or being granted accessgranteeId
: The data.world ID of the user who is requesting or being granted accessgranteeType
: Either “USER” for an individual user, or “ORGANIZATION” if an entire organization is granted accessresourceOwner
: The data.world ID of the owner of the dataset. This should match your org ID that you configured the webhook on.resourceId
: The data.world ID of the resource. When combined withresourceOwner
, you can construct a URL to the resource, ex: https://data.world/{resourceOwner}/{resourceId}authorizationLevel
: The access level, either NONE, READ, WRITE, or ADMINrequestFormFields
: A customized key-value set of customizable form fields a user fills out when requesting access.event
: Metadata about the event, such as timestamp and the data.world ID of the user that triggered the event.
Example JSON payload:
{ "eventType": "dataset.authorization_request.created", "granteeEmail": "test-user@data.world", "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": "test-user@data.world", "Message": "This is a message test-user typed whenr equesting access" } }