Skip to main content

Access Requests API

Submit and manage access requests for data products.

Endpoints Overview

MethodEndpointDescription
POST/api/products/{id}/access-requestsSubmit request
GET/api/users/me/requestsMy submissions
GET/api/requests/pending-approvalsReviewer inbox
GET/api/requests/{id}Request details
PATCH/api/requests/{id}Update request
POST/api/requests/{id}/approveApprove
POST/api/requests/{id}/rejectReject

Submit Access Request

POST /api/products/{product_id}/access-requests

Request Body

{
"role_id": "role-uuid",
"description": "Need access for Q1 reporting project"
}

Required Fields

FieldTypeDescription
role_iduuidSource system role to request

Optional Fields

FieldTypeDescription
descriptionstringJustification for access

Response

{
"id": "request-uuid",
"status": "pending",
"request_type": "access",
"product": {
"id": "...",
"name": "Customer Events"
},
"role": {
"id": "...",
"name": "Analytics Reader"
},
"requester": {
"id": "...",
"name": "Jane Developer"
},
"created_at": "2026-01-15T10:00:00Z"
}

My Requests

GET /api/users/me/requests

Query Parameters

ParameterTypeDescription
statusstringpending, approved, rejected
pageintegerPage number
sizeintegerItems per page

Response

{
"items": [
{
"id": "...",
"status": "pending",
"product": {"id": "...", "name": "Customer Events"},
"role": {"id": "...", "name": "Analytics Reader"},
"created_at": "2026-01-15T10:00:00Z"
}
],
"total": 3,
"page": 1,
"size": 20
}

Pending Approvals (Reviewer Inbox)

GET /api/requests/pending-approvals

Returns requests where the current user is a designated approver.

Response

{
"items": [
{
"id": "...",
"status": "pending",
"requester": {
"id": "...",
"name": "Bob Smith",
"email": "bob@example.com"
},
"product": {"id": "...", "name": "Sales Data"},
"role": {"id": "...", "name": "Sales Viewer"},
"description": "Need access for monthly reporting",
"created_at": "2026-01-14T08:00:00Z"
}
]
}

Request Details

GET /api/requests/{id}

Response

Includes full workflow visibility:

{
"id": "...",
"status": "pending",
"request_type": "access",
"requester": {...},
"product": {...},
"role": {...},
"description": "Need access for Q1 project",
"created_at": "2026-01-15T10:00:00Z",
"workflow_steps": [
{
"step_order": 1,
"name": "Manager Review",
"status": "pending",
"approvers": [
{
"user": {"id": "...", "name": "Alice Manager"},
"approval": {
"status": "approved",
"notes": "Approved for project scope"
}
}
]
},
{
"step_order": 2,
"name": "Security Review",
"status": "waiting",
"approvers": [
{
"user": {"id": "...", "name": "Security Team"},
"approval": null
}
]
}
]
}

Approve Request

POST /api/requests/{id}/approve

Request Body

{
"notes": "Approved. Access granted until Q1 end."
}

Response

Returns updated request with status: "approved".


Reject Request

POST /api/requests/{id}/reject

Request Body

{
"notes": "Insufficient justification. Please provide project details."
}

Update Request

Requesters can update their justification while pending:

PATCH /api/requests/{id}
{
"description": "Updated: Need access for Q1 revenue reporting. Project deadline: Feb 15."
}

Cancel Request

DELETE /api/requests/{id}

Only the requester can cancel their own pending request.


Revoke Access

For approved requests, admins can revoke access:

POST /api/product-access/{access_id}/revoke
{
"reason": "Project completed"
}

Check User Access

Verify if a user has access to a product:

GET /catalog/spaces/{slug}/products/{id}/my-access
{
"has_access": true,
"access_type": "role",
"role": {"id": "...", "name": "Analytics Reader"},
"granted_at": "2026-01-15T12:00:00Z",
"expires_at": null
}