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

ProjectResource (Semantic Module)

← Back to Modules Reference

The ProjectResource semantic module is applied to associations pointing from the Project entity to target resource entities (e.g., Task, Milestone, Document, Board).

This links sub-resources to a specific project, establishing clear project data boundaries and enabling the Serverless Engine to secure project-scoped routes as well as aggregate cross-project collection queries.


AttributeSpecification
ScopeAssociation (Applied to relationships between entities)
Data TypeAssociation / Foreign Key
Has ConfigurationNo

  • When to use: Apply to associations defined on the Project entity that point to resource tables to indicate that the resource belongs to the project container (e.g. Project.tasks -> Task).
  • When not to use:
    • Do not apply to the association between the project and the user entity (use ProjectMembers instead).
    • Do not confuse with organization boundaries (use OrganizationResources for tenant-level partitioning).

To link resources to your project context in the user interface:

  1. Open the Domain Modeler and select your Project entity.
  2. Add a new association pointing to the resource entity (e.g. Task).
  3. Set the relationship settings:
    • Multiple: Check this option if the project contains multiple instances of the resource (e.g. tasks).
  4. In the association details panel, select ProjectResource under Semantic Modules.
  5. Save your changes.

The Serverless Engine uses this semantic module when evaluating Match Project Role:

  • Nested Project Routes (/projects/:projectId/tasks): Verifies that the requested child entity is linked to :projectId via the ProjectResource association.
  • Aggregated Cross-Project Routes (GET /tasks): Automatically filters the collection query to only return records belonging to projects where the caller is a member (WHERE project_id IN (SELECT project_id FROM project_members WHERE user_id = :userId)).