Skip to content
API Now! is currently in closed beta. We are constantly updating these guides as we release updates!

ProjectRole (Semantic Module)

← Back to Modules Reference

The ProjectRole semantic module is applied to the role property attached directly to the ProjectMembers relationship edge, representing member roles within a project or workspace (e.g. owner, admin, maintainer, contributor, viewer).


AttributeSpecification
ScopeProperty (Applied to a relationship edge attribute)
Data TypeString (configured with an enum list of allowed roles)
Has ConfigurationNo

To build a valid project role property, the platform enforces the following compile-time rules:

  • Enum Requirement: The property annotated with ProjectRole defines an enum of allowed roles (e.g. ['owner', 'admin', 'maintainer', 'contributor', 'viewer']).
  • Relationship Edge Scope: The property must be attached directly to the ProjectMembers relationship edge.

To define project roles in the user interface:

  1. Open the Domain Modeler and select the relationship tagged with ProjectMembers.
  2. Under the relationship edge properties panel, locate the role property (tagged with ProjectRole).
  3. Enable the property for your API and customize the allowed Enum role options (e.g., owner, admin, maintainer, contributor, viewer).
  4. Save your changes.

When evaluating project-level access using the Match Project Role access rule (e.g. enforcing roles: ['maintainer', 'admin']), the Serverless Engine inspects this edge property on the link table to verify whether the authenticated member holds one of the required roles for the requested API action.