REST API GUIDE

auteurlabb-projectportfolio-service

Version: 1.0.33

Handles the lifecycle of film projects and access management, allowing filmmakers & studios to submit, update, publish (public/private), withdraw projects, and manage project access for investors/bookmarks. Enforces admin approval & efficient searching/filtering. Connects projects to user (and optionally studio) ownership.

Architectural Design Credit and Contact Information

The architectural design of this microservice is credited to . For inquiries, feedback, or further information regarding the architecture, please direct your communication to:

Email:

We encourage open communication and welcome any questions or discussions related to the architectural aspects of this microservice.

Documentation Scope

Welcome to the official documentation for the ProjectPortfolio Service’s REST API. This document is designed to provide a comprehensive guide to interfacing with our ProjectPortfolio Service exclusively through RESTful API endpoints.

Intended Audience

This documentation is intended for developers and integrators who are looking to interact with the ProjectPortfolio Service via HTTP requests for purposes such as creating, updating, deleting and querying ProjectPortfolio objects.

Overview

Within these pages, you will find detailed information on how to effectively utilize the REST API, including authentication methods, request and response formats, endpoint descriptions, and examples of common use cases.

Beyond REST It’s important to note that the ProjectPortfolio Service also supports alternative methods of interaction, such as gRPC and messaging via a Message Broker. These communication methods are beyond the scope of this document. For information regarding these protocols, please refer to their respective documentation.

Authentication And Authorization

To ensure secure access to the ProjectPortfolio service’s protected endpoints, a project-wide access token is required. This token serves as the primary method for authenticating requests to our service. However, it’s important to note that access control varies across different routes:

Protected API: Certain API (routes) require specific authorization levels. Access to these routes is contingent upon the possession of a valid access token that meets the route-specific authorization criteria. Unauthorized requests to these routes will be rejected.

**Public API **: The service also includes public API (routes) that are accessible without authentication. These public endpoints are designed for open access and do not require an access token.

Token Locations

When including your access token in a request, ensure it is placed in one of the following specified locations. The service will sequentially search these locations for the token, utilizing the first one it encounters.

Location Token Name / Param Name
Query access_token
Authorization Header Bearer
Header auteurlabb-access-token
Cookie auteurlabb-access-token

Please ensure the token is correctly placed in one of these locations, using the appropriate label as indicated. The service prioritizes these locations in the order listed, processing the first token it successfully identifies.

Api Definitions

This section outlines the API endpoints available within the ProjectPortfolio service. Each endpoint can receive parameters through various methods, meticulously described in the following definitions. It’s important to understand the flexibility in how parameters can be included in requests to effectively interact with the ProjectPortfolio service.

This service is configured to listen for HTTP requests on port 3001, serving both the main API interface and default administrative endpoints.

The following routes are available by default:

This service is accessible via the following environment-specific URLs:

Parameter Inclusion Methods: Parameters can be incorporated into API requests in several ways, each with its designated location. Understanding these methods is crucial for correctly constructing your requests:

Query Parameters: Included directly in the URL’s query string.

Path Parameters: Embedded within the URL’s path.

Body Parameters: Sent within the JSON body of the request.

Session Parameters: Automatically read from the session object. This method is used for parameters that are intrinsic to the user’s session, such as userId. When using an API that involves session parameters, you can omit these from your request. The service will automatically bind them to the API layer, provided that a session is associated with your request.

Note on Session Parameters: Session parameters represent a unique method of parameter inclusion, relying on the context of the user’s session. A common example of a session parameter is userId, which the service automatically associates with your request when a session exists. This feature ensures seamless integration of user-specific data without manual input for each request.

By adhering to the specified parameter inclusion methods, you can effectively utilize the ProjectPortfolio service’s API endpoints. For detailed information on each endpoint, including required parameters and their accepted locations, refer to the individual API definitions below.

Common Parameters

The ProjectPortfolio service’s business API support several common parameters designed to modify and enhance the behavior of API requests. These parameters are not individually listed in the API route definitions to avoid repetition. Instead, refer to this section to understand how to leverage these common behaviors across different routes. Note that all common parameters should be included in the query part of the URL.

Supported Common Parameters:

By utilizing these common parameters, you can tailor the behavior of API requests to suit your specific requirements, ensuring optimal performance and usability of the ProjectPortfolio service.

Error Response

If a request encounters an issue, whether due to a logical fault or a technical problem, the service responds with a standardized JSON error structure. The HTTP status code within this response indicates the nature of the error, utilizing commonly recognized codes for clarity:

Each error response is structured to provide meaningful insight into the problem, assisting in diagnosing and resolving issues efficiently.

{
  "result": "ERR",
  "status": 400,
  "message": "errMsg_organizationIdisNotAValidID",
  "errCode": 400,
  "date": "2024-03-19T12:13:54.124Z",
  "detail": "String"
}

Object Structure of a Successfull Response

When the ProjectPortfolio service processes requests successfully, it wraps the requested resource(s) within a JSON envelope. This envelope not only contains the data but also includes essential metadata, such as configuration details and pagination information, to enrich the response and provide context to the client.

Key Characteristics of the Response Envelope:

Design Considerations: The structure of a API’s response data is meticulously crafted during the service’s architectural planning. This design ensures that responses adequately reflect the intended data relationships and service logic, providing clients with rich and meaningful information.

Brief Data: Certain API’s return a condensed version of the object data, intentionally selecting only specific fields deemed useful for that request. In such instances, the API documentation will detail the properties included in the response, guiding developers on what to expect.

API Response Structure

The API utilizes a standardized JSON envelope to encapsulate responses. This envelope is designed to consistently deliver both the requested data and essential metadata, ensuring that clients can efficiently interpret and utilize the response.

HTTP Status Codes:

Success Response Format:

For successful operations, the response includes a "status": "OK" property, signaling the successful execution of the request. The structure of a successful response is outlined below:

{
  "status":"OK",
  "statusCode": 200,   
  "elapsedMs":126,
  "ssoTime":120,
  "source": "db",
  "cacheKey": "hexCode",
  "userId": "ID",
  "sessionId": "ID",
  "requestId": "ID",
  "dataName":"products",
  "method":"GET",
  "action":"list",
  "appVersion":"Version",
  "rowCount":3
  "products":[{},{},{}],
  "paging": {
    "pageNumber":1, 
    "pageRowCount":25, 
    "totalRowCount":3,
    "pageCount":1
  },
  "filters": [],
  "uiPermissions": []
}

Handling Errors:

For details on handling error scenarios and understanding the structure of error responses, please refer to the “Error Response” section provided earlier in this documentation. It outlines how error conditions are communicated, including the use of HTTP status codes and standardized JSON structures for error messages.

Resources

ProjectPortfolio service provides the following resources which are stored in its own database as a data object. Note that a resource for an api access is a data object for the service.

FilmProject resource

Resource Definition : A film project submitted by a filmmaker or studio with all required metadata, visibility, and lifecycle status. FilmProject Resource Properties

Name Type Required Default Definition
title String Project title, unique per owner
description Text Project description (for details page/fulltext search)
synopsis Text Short synopsis or tagline
budget Double Estimated budget (USD)
cast String List of major cast members (names)
genre String Project genres/tags
projectType Enum Origin: filmmaker or studio
ownerUserId ID User ID of project owner (filmmaker/studio admin)
studioId ID (Optional) User ID of the studio (for studio projects)
isPublic Boolean Project public visibility flag
approvalStatus Enum Project approval/publication workflow status
mediaUrls String Project demo reel/trailer/cover media URLs
featured Boolean Platform feature flag (for promoted projects)
publishedAt Date Publication date
accessPolicy Enum Access policy (open: any authorized user, restricted: need grant)
director String Director of the film project
fundingGoal Double Funding goal amount (USD)

Enum Properties

Enum properties are represented as strings in the database. The values are mapped to their corresponding names in the application layer.

projectType Enum Property

Property Definition : Origin: filmmaker or studioEnum Options

Name Value Index
filmmaker "filmmaker"" 0
studio "studio"" 1
approvalStatus Enum Property

Property Definition : Project approval/publication workflow statusEnum Options

Name Value Index
pending "pending"" 0
approved "approved"" 1
rejected "rejected"" 2
withdrawn "withdrawn"" 3
accessPolicy Enum Property

Property Definition : Access policy (open: any authorized user, restricted: need grant)Enum Options

Name Value Index
open "open"" 0
restricted "restricted"" 1

AccessGrant resource

Resource Definition : Access grants to private projects, allowing selected users to view restricted projects (requested/granted/revoked/denied). AccessGrant Resource Properties

Name Type Required Default Definition
projectId ID Film project ID for which access is granted/requested
granteeUserId ID ID of user being granted/requesting access
grantedByUserId ID Who granted/revoked the access (or null for self-request)
status Enum requested (pending); granted (success); revoked; denied
requestMessage Text Message from requester (for context)
dateGranted Date Timestamp when access status last updated

Enum Properties

Enum properties are represented as strings in the database. The values are mapped to their corresponding names in the application layer.

status Enum Property

Property Definition : requested (pending); granted (success); revoked; deniedEnum Options

Name Value Index
requested "requested"" 0
granted "granted"" 1
revoked "revoked"" 2
denied "denied"" 3

ProjectBookmark resource

Resource Definition : User bookmarks/follows for projects. Each bookmark is per user+project. ProjectBookmark Resource Properties

Name Type Required Default Definition
projectId ID The project being bookmarked
userId ID The user who bookmarked this project
createdAtBookmark Date When bookmark was made

InvestmentOffer resource

Resource Definition : Tracks investment offers from investors to film projects. Each offer has an amount, optional message, and status workflow (pending/accepted/rejected/withdrawn). InvestmentOffer Resource Properties

Name Type Required Default Definition
projectId ID Film project receiving the investment offer
investorUserId ID Investor who made the offer
offerAmount Double Investment amount in USD
message Text Cover letter or terms from the investor
status Enum Offer lifecycle status
respondedAt Date When the project owner responded
responseNote Text Project owner note on accept/reject

Enum Properties

Enum properties are represented as strings in the database. The values are mapped to their corresponding names in the application layer.

status Enum Property

Property Definition : Offer lifecycle statusEnum Options

Name Value Index
pending "pending"" 0
accepted "accepted"" 1
rejected "rejected"" 2
withdrawn "withdrawn"" 3

UserFollow resource

Resource Definition : Tracks user-to-user follow relationships. A follower follows a target user (filmmaker, studio, investor). UserFollow Resource Properties

Name Type Required Default Definition
followerUserId ID The user who is following
followingUserId ID The user being followed
followedAt Date When the follow relationship was created

Business Api

Create Filmproject API

[Default create API] — This is the designated default create API for the filmProject data object. Frontend generators and AI agents should use this API for standard CRUD operations. Submit a new film project (by filmmaker/studio). Sets approvalStatus=pending and assigns ownerUserId from session. Studio projects require studioId.

API Frontend Description By The Backend Architect

Used by filmmakers/studios to submit a new project. Standard create form. Approval workflow starts automatically. Owner assigned from session.

Rest Route

The createFilmProject API REST controller can be triggered via the following route:

/v1/filmprojects

Rest Request Parameters

The createFilmProject api has got 15 regular request parameters

Parameter Type Required Population
title String true request.body?.[“title”]
description Text true request.body?.[“description”]
synopsis Text false request.body?.[“synopsis”]
budget Double true request.body?.[“budget”]
cast String false request.body?.[“cast”]
genre String false request.body?.[“genre”]
projectType Enum true request.body?.[“projectType”]
studioId ID false request.body?.[“studioId”]
isPublic Boolean true request.body?.[“isPublic”]
mediaUrls String false request.body?.[“mediaUrls”]
featured Boolean false request.body?.[“featured”]
publishedAt Date false request.body?.[“publishedAt”]
accessPolicy Enum true request.body?.[“accessPolicy”]
director String false request.body?.[“director”]
fundingGoal Double false request.body?.[“fundingGoal”]
title : Project title, unique per owner
description : Project description (for details page/fulltext search)
synopsis : Short synopsis or tagline
budget : Estimated budget (USD)
cast : List of major cast members (names)
genre : Project genres/tags
projectType : Origin: filmmaker or studio
studioId : (Optional) User ID of the studio (for studio projects)
isPublic : Project public visibility flag
mediaUrls : Project demo reel/trailer/cover media URLs
featured : Platform feature flag (for promoted projects)
publishedAt : Publication date
accessPolicy : Access policy (open: any authorized user, restricted: need grant)
director : Director of the film project
fundingGoal : Funding goal amount (USD)

REST Request To access the api you can use the REST controller with the path POST /v1/filmprojects

  axios({
    method: 'POST',
    url: '/v1/filmprojects',
    data: {
            title:"String",  
            description:"Text",  
            synopsis:"Text",  
            budget:"Double",  
            cast:"String",  
            genre:"String",  
            projectType:"Enum",  
            studioId:"ID",  
            isPublic:"Boolean",  
            mediaUrls:"String",  
            featured:"Boolean",  
            publishedAt:"Date",  
            accessPolicy:"Enum",  
            director:"String",  
            fundingGoal:"Double",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "filmProject",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"filmProject": {
		"id": "ID",
		"title": "String",
		"description": "Text",
		"synopsis": "Text",
		"budget": "Double",
		"cast": "String",
		"genre": "String",
		"projectType": "Enum",
		"projectType_idx": "Integer",
		"ownerUserId": "ID",
		"studioId": "ID",
		"isPublic": "Boolean",
		"approvalStatus": "Enum",
		"approvalStatus_idx": "Integer",
		"mediaUrls": "String",
		"featured": "Boolean",
		"publishedAt": "Date",
		"accessPolicy": "Enum",
		"accessPolicy_idx": "Integer",
		"director": "String",
		"fundingGoal": "Double",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Update Filmproject API

[Default update API] — This is the designated default update API for the filmProject data object. Frontend generators and AI agents should use this API for standard CRUD operations. Update a film project. Only the owner or admin can update. Only admin can set approvalStatus=approved/rejected. Owner can withdraw (approvalStatus=withdrawn).

API Frontend Description By The Backend Architect

For editing project details (including withdrawal). ApprovalStatus can only be changed by admin (other than withdrawn by owner). Owner cannot submit direct publish/approve requests; always wait admin.

Rest Route

The updateFilmProject API REST controller can be triggered via the following route:

/v1/filmprojects/:filmProjectId

Rest Request Parameters

The updateFilmProject api has got 15 regular request parameters

Parameter Type Required Population
filmProjectId ID true request.params?.[“filmProjectId”]
title String false request.body?.[“title”]
description Text false request.body?.[“description”]
synopsis Text false request.body?.[“synopsis”]
budget Double false request.body?.[“budget”]
cast String false request.body?.[“cast”]
genre String false request.body?.[“genre”]
isPublic Boolean false request.body?.[“isPublic”]
approvalStatus Enum true request.body?.[“approvalStatus”]
mediaUrls String false request.body?.[“mediaUrls”]
featured Boolean false request.body?.[“featured”]
publishedAt Date false request.body?.[“publishedAt”]
accessPolicy Enum false request.body?.[“accessPolicy”]
director String false request.body?.[“director”]
fundingGoal Double false request.body?.[“fundingGoal”]
filmProjectId : This id paremeter is used to select the required data object that will be updated
title : Project title, unique per owner
description : Project description (for details page/fulltext search)
synopsis : Short synopsis or tagline
budget : Estimated budget (USD)
cast : List of major cast members (names)
genre : Project genres/tags
isPublic : Project public visibility flag
approvalStatus : Project approval/publication workflow status
mediaUrls : Project demo reel/trailer/cover media URLs
featured : Platform feature flag (for promoted projects)
publishedAt : Publication date
accessPolicy : Access policy (open: any authorized user, restricted: need grant)
director : Director of the film project
fundingGoal : Funding goal amount (USD)

REST Request To access the api you can use the REST controller with the path PATCH /v1/filmprojects/:filmProjectId

  axios({
    method: 'PATCH',
    url: `/v1/filmprojects/${filmProjectId}`,
    data: {
            title:"String",  
            description:"Text",  
            synopsis:"Text",  
            budget:"Double",  
            cast:"String",  
            genre:"String",  
            isPublic:"Boolean",  
            approvalStatus:"Enum",  
            mediaUrls:"String",  
            featured:"Boolean",  
            publishedAt:"Date",  
            accessPolicy:"Enum",  
            director:"String",  
            fundingGoal:"Double",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "filmProject",
	"method": "PATCH",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"filmProject": {
		"id": "ID",
		"title": "String",
		"description": "Text",
		"synopsis": "Text",
		"budget": "Double",
		"cast": "String",
		"genre": "String",
		"projectType": "Enum",
		"projectType_idx": "Integer",
		"ownerUserId": "ID",
		"studioId": "ID",
		"isPublic": "Boolean",
		"approvalStatus": "Enum",
		"approvalStatus_idx": "Integer",
		"mediaUrls": "String",
		"featured": "Boolean",
		"publishedAt": "Date",
		"accessPolicy": "Enum",
		"accessPolicy_idx": "Integer",
		"director": "String",
		"fundingGoal": "Double",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	},
	"ownerUser": {}
}

Get Filmproject API

[Default get API] — This is the designated default get API for the filmProject data object. Frontend generators and AI agents should use this API for standard CRUD operations. Fetch project details. Accessible by owner, admin, or for public + approved projects. Also for granted investors/users (accessGrant).

API Frontend Description By The Backend Architect

Used to display project details page. Applies access and visibility policy – if project is private, only owner/admin/granted users can see; if public+approved, visible to everyone logged in. User denied access gets 404.

Rest Route

The getFilmProject API REST controller can be triggered via the following route:

/v1/filmprojects/:filmProjectId

Rest Request Parameters

The getFilmProject api has got 1 regular request parameter

Parameter Type Required Population
filmProjectId ID true request.params?.[“filmProjectId”]
filmProjectId : This id paremeter is used to query the required data object.

REST Request To access the api you can use the REST controller with the path GET /v1/filmprojects/:filmProjectId

  axios({
    method: 'GET',
    url: `/v1/filmprojects/${filmProjectId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

This route’s response is constrained to a select list of properties, and therefore does not encompass all attributes of the resource.

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "filmProject",
	"method": "GET",
	"action": "get",
	"appVersion": "Version",
	"rowCount": 1,
	"filmProject": {
		"ownerUser": {
			"fullname": "String",
			"avatar": "String",
			"roleId": "String"
		},
		"studio": {
			"fullname": "String",
			"avatar": "String",
			"roleId": "String"
		},
		"isActive": true
	}
}

List Filmprojects API

[Default list API] — This is the designated default list API for the filmProject data object. Frontend generators and AI agents should use this API for standard CRUD operations. List projects (public+approved, owned, or where granted). With filters for search. Results by role: owner/all their projects; normal users see only public+approved; investors/studios see owned or accessible, or public+approved. Filters: genre, budget, approvalStatus, isPublic, featured, projectType, title, description (text search).

API Frontend Description By The Backend Architect

Allows all users to search/browse projects. Only public/approved projects are visible to normal users; owners/investors get private projects to which they’re granted. Search by genre, budget, etc. Use for the main project directory.

Rest Route

The listFilmProjects API REST controller can be triggered via the following route:

/v1/filmprojects

Rest Request Parameters The listFilmProjects api has got no request parameters.

REST Request To access the api you can use the REST controller with the path GET /v1/filmprojects

  axios({
    method: 'GET',
    url: '/v1/filmprojects',
    data: {
    
    },
    params: {
    
        }
  });

REST Response

This route’s response is constrained to a select list of properties, and therefore does not encompass all attributes of the resource.

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "filmProjects",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"filmProjects": [
		{
			"ownerUser": [
				{
					"fullname": "String",
					"avatar": "String",
					"roleId": "String"
				},
				{},
				{}
			],
			"isActive": true
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Create Accessgrant API

[Default create API] — This is the designated default create API for the accessGrant data object. Frontend generators and AI agents should use this API for standard CRUD operations. Create a new accessGrant. Used for access requests (user) or direct grant (owner/admin).

API Frontend Description By The Backend Architect

Investors request access to private/restricted projects; project owners or admins grant/revoke access to users. Status flows: requested→granted/denied/revoked. Owner can only grant/revoke their own; admins can manage all.

Rest Route

The createAccessGrant API REST controller can be triggered via the following route:

/v1/accessgrants

Rest Request Parameters

The createAccessGrant api has got 6 regular request parameters

Parameter Type Required Population
projectId ID true request.body?.[“projectId”]
granteeUserId ID true request.body?.[“granteeUserId”]
grantedByUserId ID false request.body?.[“grantedByUserId”]
status Enum true request.body?.[“status”]
requestMessage Text false request.body?.[“requestMessage”]
dateGranted Date false request.body?.[“dateGranted”]
projectId : Film project ID for which access is granted/requested
granteeUserId : ID of user being granted/requesting access
grantedByUserId : Who granted/revoked the access (or null for self-request)
status : requested (pending); granted (success); revoked; denied
requestMessage : Message from requester (for context)
dateGranted : Timestamp when access status last updated

REST Request To access the api you can use the REST controller with the path POST /v1/accessgrants

  axios({
    method: 'POST',
    url: '/v1/accessgrants',
    data: {
            projectId:"ID",  
            granteeUserId:"ID",  
            grantedByUserId:"ID",  
            status:"Enum",  
            requestMessage:"Text",  
            dateGranted:"Date",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "accessGrant",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"accessGrant": {
		"id": "ID",
		"projectId": "ID",
		"granteeUserId": "ID",
		"grantedByUserId": "ID",
		"status": "Enum",
		"status_idx": "Integer",
		"requestMessage": "Text",
		"dateGranted": "Date",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Update Accessgrant API

[Default update API] — This is the designated default update API for the accessGrant data object. Frontend generators and AI agents should use this API for standard CRUD operations. Update status of an access grant. Only admin or project owner can grant, revoke, or deny. User can cancel (delete) their own pending request or see status.

API Frontend Description By The Backend Architect

Used for access management UI. Owners/admins can grant/revoke/deny access grants; requesters can cancel. For status transitions, always log who did it and when. Only valid transitions possible (ex: can’t grant if not owner/admin).

Rest Route

The updateAccessGrant API REST controller can be triggered via the following route:

/v1/accessgrants/:accessGrantId

Rest Request Parameters

The updateAccessGrant api has got 4 regular request parameters

Parameter Type Required Population
accessGrantId ID true request.params?.[“accessGrantId”]
status Enum true request.body?.[“status”]
requestMessage Text false request.body?.[“requestMessage”]
dateGranted Date false request.body?.[“dateGranted”]
accessGrantId : This id paremeter is used to select the required data object that will be updated
status : requested (pending); granted (success); revoked; denied
requestMessage : Message from requester (for context)
dateGranted : Timestamp when access status last updated

REST Request To access the api you can use the REST controller with the path PATCH /v1/accessgrants/:accessGrantId

  axios({
    method: 'PATCH',
    url: `/v1/accessgrants/${accessGrantId}`,
    data: {
            status:"Enum",  
            requestMessage:"Text",  
            dateGranted:"Date",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "accessGrant",
	"method": "PATCH",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"accessGrant": {
		"id": "ID",
		"projectId": "ID",
		"granteeUserId": "ID",
		"grantedByUserId": "ID",
		"status": "Enum",
		"status_idx": "Integer",
		"requestMessage": "Text",
		"dateGranted": "Date",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Get Accessgrant API

[Default get API] — This is the designated default get API for the accessGrant data object. Frontend generators and AI agents should use this API for standard CRUD operations. Get a single accessGrant record by id. Used for grant management UI.

API Frontend Description By The Backend Architect

Shows a single access grant: who, for what project, current status, request message.

Rest Route

The getAccessGrant API REST controller can be triggered via the following route:

/v1/accessgrants/:accessGrantId

Rest Request Parameters

The getAccessGrant api has got 1 regular request parameter

Parameter Type Required Population
accessGrantId ID true request.params?.[“accessGrantId”]
accessGrantId : This id paremeter is used to query the required data object.

REST Request To access the api you can use the REST controller with the path GET /v1/accessgrants/:accessGrantId

  axios({
    method: 'GET',
    url: `/v1/accessgrants/${accessGrantId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "accessGrant",
	"method": "GET",
	"action": "get",
	"appVersion": "Version",
	"rowCount": 1,
	"accessGrant": {
		"id": "ID",
		"projectId": "ID",
		"granteeUserId": "ID",
		"grantedByUserId": "ID",
		"status": "Enum",
		"status_idx": "Integer",
		"requestMessage": "Text",
		"dateGranted": "Date",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Accessgrants API

[Default list API] — This is the designated default list API for the accessGrant data object. Frontend generators and AI agents should use this API for standard CRUD operations. List all accessGrants for a project (owner/admin) or for a user (user’s own requests).

API Frontend Description By The Backend Architect

Used by project owners/admins to see all access requests; by users to see their own requests & statuses. Investors check their granted projects for dashboard; owners manage through this list.

Rest Route

The listAccessGrants API REST controller can be triggered via the following route:

/v1/accessgrants

Rest Request Parameters

Filter Parameters

The listAccessGrants api supports 3 optional filter parameters for filtering list results:

projectId (ID): Film project ID for which access is granted/requested

granteeUserId (ID): ID of user being granted/requesting access

status (Enum): requested (pending); granted (success); revoked; denied

REST Request To access the api you can use the REST controller with the path GET /v1/accessgrants

  axios({
    method: 'GET',
    url: '/v1/accessgrants',
    data: {
    
    },
    params: {
    
        // Filter parameters (see Filter Parameters section above)
        // projectId: '<value>' // Filter by projectId
        // granteeUserId: '<value>' // Filter by granteeUserId
        // status: '<value>' // Filter by status
            }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "accessGrants",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"accessGrants": [
		{
			"id": "ID",
			"projectId": "ID",
			"granteeUserId": "ID",
			"grantedByUserId": "ID",
			"status": "Enum",
			"status_idx": "Integer",
			"requestMessage": "Text",
			"dateGranted": "Date",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Create Bookmark API

[Default create API] — This is the designated default create API for the projectBookmark data object. Frontend generators and AI agents should use this API for standard CRUD operations. Add a project bookmark (user/project pair, unique).

API Frontend Description By The Backend Architect

Users bookmark projects for easy retrieval. Only one bookmark per (user, project).

Rest Route

The createBookmark API REST controller can be triggered via the following route:

/v1/bookmark

Rest Request Parameters

The createBookmark api has got 1 regular request parameter

Parameter Type Required Population
projectId ID true request.body?.[“projectId”]
projectId : The project being bookmarked

REST Request To access the api you can use the REST controller with the path POST /v1/bookmark

  axios({
    method: 'POST',
    url: '/v1/bookmark',
    data: {
            projectId:"ID",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "projectBookmark",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"projectBookmark": {
		"id": "ID",
		"projectId": "ID",
		"userId": "ID",
		"createdAtBookmark": "Date",
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID",
		"isActive": true
	}
}

Delete Bookmark API

[Default delete API] — This is the designated default delete API for the projectBookmark data object. Frontend generators and AI agents should use this API for standard CRUD operations. Remove a project bookmark (user can only delete their own bookmarks).

API Frontend Description By The Backend Architect

Bookmarks are always per-user: can only remove bookmark if you’re the owner.

Rest Route

The deleteBookmark API REST controller can be triggered via the following route:

/v1/bookmark/:projectBookmarkId

Rest Request Parameters

The deleteBookmark api has got 1 regular request parameter

Parameter Type Required Population
projectBookmarkId ID true request.params?.[“projectBookmarkId”]
projectBookmarkId : This id paremeter is used to select the required data object that will be deleted

REST Request To access the api you can use the REST controller with the path DELETE /v1/bookmark/:projectBookmarkId

  axios({
    method: 'DELETE',
    url: `/v1/bookmark/${projectBookmarkId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "projectBookmark",
	"method": "DELETE",
	"action": "delete",
	"appVersion": "Version",
	"rowCount": 1,
	"projectBookmark": {
		"id": "ID",
		"projectId": "ID",
		"userId": "ID",
		"createdAtBookmark": "Date",
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID",
		"isActive": false
	}
}

List Bookmarks API

[Default list API] — This is the designated default list API for the projectBookmark data object. Frontend generators and AI agents should use this API for standard CRUD operations. List a user’s own bookmarks. Only accessible for current user. Used for profile/bookmarks view.

API Frontend Description By The Backend Architect

Used for the user’s My Bookmarks page. Always lists only YOUR bookmarks, never others’.

Rest Route

The listBookmarks API REST controller can be triggered via the following route:

/v1/bookmarks

Rest Request Parameters

Filter Parameters

The listBookmarks api supports 2 optional filter parameters for filtering list results:

projectId (ID): The project being bookmarked

userId (ID): The user who bookmarked this project

REST Request To access the api you can use the REST controller with the path GET /v1/bookmarks

  axios({
    method: 'GET',
    url: '/v1/bookmarks',
    data: {
    
    },
    params: {
    
        // Filter parameters (see Filter Parameters section above)
        // projectId: '<value>' // Filter by projectId
        // userId: '<value>' // Filter by userId
            }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "projectBookmarks",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"projectBookmarks": [
		{
			"id": "ID",
			"projectId": "ID",
			"userId": "ID",
			"createdAtBookmark": "Date",
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID",
			"isActive": true
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Create Investmentoffer API

[Default create API] — This is the designated default create API for the investmentOffer data object. Frontend generators and AI agents should use this API for standard CRUD operations. Investor sends an investment offer to a film project. Status defaults to pending. Only investors can create offers.

Rest Route

The createInvestmentOffer API REST controller can be triggered via the following route:

/v1/investmentoffers

Rest Request Parameters

The createInvestmentOffer api has got 5 regular request parameters

Parameter Type Required Population
projectId ID true request.body?.[“projectId”]
offerAmount Double true request.body?.[“offerAmount”]
message Text false request.body?.[“message”]
respondedAt Date false request.body?.[“respondedAt”]
responseNote Text false request.body?.[“responseNote”]
projectId : Film project receiving the investment offer
offerAmount : Investment amount in USD
message : Cover letter or terms from the investor
respondedAt : When the project owner responded
responseNote : Project owner note on accept/reject

REST Request To access the api you can use the REST controller with the path POST /v1/investmentoffers

  axios({
    method: 'POST',
    url: '/v1/investmentoffers',
    data: {
            projectId:"ID",  
            offerAmount:"Double",  
            message:"Text",  
            respondedAt:"Date",  
            responseNote:"Text",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "investmentOffer",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"investmentOffer": {
		"id": "ID",
		"projectId": "ID",
		"investorUserId": "ID",
		"offerAmount": "Double",
		"message": "Text",
		"status": "Enum",
		"status_idx": "Integer",
		"respondedAt": "Date",
		"responseNote": "Text",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Respond Toinvestmentoffer API

[Default update API] — This is the designated default update API for the investmentOffer data object. Frontend generators and AI agents should use this API for standard CRUD operations. Project owner accepts or rejects an investment offer. Only the project owner or admin can respond.

Rest Route

The respondToInvestmentOffer API REST controller can be triggered via the following route:

/v1/respondtoinvestmentoffer/:investmentOfferId

Rest Request Parameters

The respondToInvestmentOffer api has got 6 regular request parameters

Parameter Type Required Population
investmentOfferId ID true request.params?.[“investmentOfferId”]
offerAmount Double false request.body?.[“offerAmount”]
message Text false request.body?.[“message”]
status Enum false request.body?.[“status”]
respondedAt Date false request.body?.[“respondedAt”]
responseNote Text false request.body?.[“responseNote”]
investmentOfferId : This id paremeter is used to select the required data object that will be updated
offerAmount : Investment amount in USD
message : Cover letter or terms from the investor
status : Offer lifecycle status
respondedAt : When the project owner responded
responseNote : Project owner note on accept/reject

REST Request To access the api you can use the REST controller with the path PATCH /v1/respondtoinvestmentoffer/:investmentOfferId

  axios({
    method: 'PATCH',
    url: `/v1/respondtoinvestmentoffer/${investmentOfferId}`,
    data: {
            offerAmount:"Double",  
            message:"Text",  
            status:"Enum",  
            respondedAt:"Date",  
            responseNote:"Text",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "investmentOffer",
	"method": "PATCH",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"investmentOffer": {
		"id": "ID",
		"projectId": "ID",
		"investorUserId": "ID",
		"offerAmount": "Double",
		"message": "Text",
		"status": "Enum",
		"status_idx": "Integer",
		"respondedAt": "Date",
		"responseNote": "Text",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Investmentoffers API

[Default list API] — This is the designated default list API for the investmentOffer data object. Frontend generators and AI agents should use this API for standard CRUD operations. List investment offers. Admins see all, investors see their own, filmmakers/studios see offers on their projects.

Rest Route

The listInvestmentOffers API REST controller can be triggered via the following route:

/v1/investmentoffers

Rest Request Parameters

Filter Parameters

The listInvestmentOffers api supports 4 optional filter parameters for filtering list results:

projectId (ID): Film project receiving the investment offer

investorUserId (ID): Investor who made the offer

offerAmount (Double): Investment amount in USD

status (Enum): Offer lifecycle status

REST Request To access the api you can use the REST controller with the path GET /v1/investmentoffers

  axios({
    method: 'GET',
    url: '/v1/investmentoffers',
    data: {
    
    },
    params: {
    
        // Filter parameters (see Filter Parameters section above)
        // projectId: '<value>' // Filter by projectId
        // investorUserId: '<value>' // Filter by investorUserId
        // offerAmount: '<value>' // Filter by offerAmount
        // status: '<value>' // Filter by status
            }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "investmentOffers",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"investmentOffers": [
		{
			"id": "ID",
			"projectId": "ID",
			"investorUserId": "ID",
			"offerAmount": "Double",
			"message": "Text",
			"status": "Enum",
			"status_idx": "Integer",
			"respondedAt": "Date",
			"responseNote": "Text",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Withdraw Investmentoffer API

Investor withdraws their own pending offer. Sets status to withdrawn.

Rest Route

The withdrawInvestmentOffer API REST controller can be triggered via the following route:

/v1/withdrawinvestmentoffer/:investmentOfferId

Rest Request Parameters

The withdrawInvestmentOffer api has got 6 regular request parameters

Parameter Type Required Population
investmentOfferId ID true request.params?.[“investmentOfferId”]
offerAmount Double false request.body?.[“offerAmount”]
message Text false request.body?.[“message”]
status Enum false request.body?.[“status”]
respondedAt Date false request.body?.[“respondedAt”]
responseNote Text false request.body?.[“responseNote”]
investmentOfferId : This id paremeter is used to select the required data object that will be updated
offerAmount : Investment amount in USD
message : Cover letter or terms from the investor
status : Offer lifecycle status
respondedAt : When the project owner responded
responseNote : Project owner note on accept/reject

REST Request To access the api you can use the REST controller with the path PATCH /v1/withdrawinvestmentoffer/:investmentOfferId

  axios({
    method: 'PATCH',
    url: `/v1/withdrawinvestmentoffer/${investmentOfferId}`,
    data: {
            offerAmount:"Double",  
            message:"Text",  
            status:"Enum",  
            respondedAt:"Date",  
            responseNote:"Text",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "investmentOffer",
	"method": "PATCH",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"investmentOffer": {
		"id": "ID",
		"projectId": "ID",
		"investorUserId": "ID",
		"offerAmount": "Double",
		"message": "Text",
		"status": "Enum",
		"status_idx": "Integer",
		"respondedAt": "Date",
		"responseNote": "Text",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Follow User API

[Default create API] — This is the designated default create API for the userFollow data object. Frontend generators and AI agents should use this API for standard CRUD operations. Follow a user. Creates a follow relationship between the session user and the target user. Duplicate follows are prevented by composite index.

Rest Route

The followUser API REST controller can be triggered via the following route:

/v1/followuser

Rest Request Parameters

The followUser api has got 2 regular request parameters

Parameter Type Required Population
followingUserId ID true request.body?.[“followingUserId”]
followedAt Date false request.body?.[“followedAt”]
followingUserId : The user being followed
followedAt : When the follow relationship was created

REST Request To access the api you can use the REST controller with the path POST /v1/followuser

  axios({
    method: 'POST',
    url: '/v1/followuser',
    data: {
            followingUserId:"ID",  
            followedAt:"Date",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "userFollow",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"userFollow": {
		"id": "ID",
		"followerUserId": "ID",
		"followingUserId": "ID",
		"followedAt": "Date",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Unfollow User API

[Default delete API] — This is the designated default delete API for the userFollow data object. Frontend generators and AI agents should use this API for standard CRUD operations. Unfollow a user. Removes the follow relationship. Only the follower (owner) can unfollow.

Rest Route

The unfollowUser API REST controller can be triggered via the following route:

/v1/unfollowuser/:userFollowId

Rest Request Parameters

The unfollowUser api has got 1 regular request parameter

Parameter Type Required Population
userFollowId ID true request.params?.[“userFollowId”]
userFollowId : This id paremeter is used to select the required data object that will be deleted

REST Request To access the api you can use the REST controller with the path DELETE /v1/unfollowuser/:userFollowId

  axios({
    method: 'DELETE',
    url: `/v1/unfollowuser/${userFollowId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "userFollow",
	"method": "DELETE",
	"action": "delete",
	"appVersion": "Version",
	"rowCount": 1,
	"userFollow": {
		"id": "ID",
		"followerUserId": "ID",
		"followingUserId": "ID",
		"followedAt": "Date",
		"isActive": false,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Userfollows API

[Default list API] — This is the designated default list API for the userFollow data object. Frontend generators and AI agents should use this API for standard CRUD operations. List follow relationships. Filter by followerUserId to get who a user follows, or by followingUserId to get a user’s followers.

Rest Route

The listUserFollows API REST controller can be triggered via the following route:

/v1/userfollows

Rest Request Parameters

Filter Parameters

The listUserFollows api supports 2 optional filter parameters for filtering list results:

followerUserId (ID): The user who is following

followingUserId (ID): The user being followed

REST Request To access the api you can use the REST controller with the path GET /v1/userfollows

  axios({
    method: 'GET',
    url: '/v1/userfollows',
    data: {
    
    },
    params: {
    
        // Filter parameters (see Filter Parameters section above)
        // followerUserId: '<value>' // Filter by followerUserId
        // followingUserId: '<value>' // Filter by followingUserId
            }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "userFollows",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"userFollows": [
		{
			"id": "ID",
			"followerUserId": "ID",
			"followingUserId": "ID",
			"followedAt": "Date",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Authentication Specific Routes

Common Routes

Route: currentuser

Route Definition: Retrieves the currently authenticated user’s session information.

Route Type: sessionInfo

Access Route: GET /currentuser

Parameters

This route does not require any request parameters.

Behavior

// Sample GET /currentuser call
axios.get("/currentuser", {
  headers: {
    "Authorization": "Bearer your-jwt-token"
  }
});

Success Response Returns the session object, including user-related data and token information.

{
  "sessionId": "9cf23fa8-07d4-4e7c-80a6-ec6d6ac96bb9",
  "userId": "d92b9d4c-9b1e-4e95-842e-3fb9c8c1df38",
  "email": "user@example.com",
  "fullname": "John Doe",
  "roleId": "user",
  "tenantId": "abc123",
  "accessToken": "jwt-token-string",
  ...
}

Error Response 401 Unauthorized: No active session found.

{
  "status": "ERR",
  "message": "No login found"
}

Notes

Route: permissions

*Route Definition*: Retrieves all effective permission records assigned to the currently authenticated user.

*Route Type*: permissionFetch

Access Route: GET /permissions

Parameters

This route does not require any request parameters.

Behavior

// Sample GET /permissions call
axios.get("/permissions", {
  headers: {
    "Authorization": "Bearer your-jwt-token"
  }
});

Success Response

Returns an array of permission objects.

[
  {
    "id": "perm1",
    "permissionName": "adminPanel.access",
    "roleId": "admin",
    "subjectUserId": "d92b9d4c-9b1e-4e95-842e-3fb9c8c1df38",
    "subjectUserGroupId": null,
    "objectId": null,
    "canDo": true,
    "tenantCodename": "store123"
  },
  {
    "id": "perm2",
    "permissionName": "orders.manage",
    "roleId": null,
    "subjectUserId": "d92b9d4c-9b1e-4e95-842e-3fb9c8c1df38",
    "subjectUserGroupId": null,
    "objectId": null,
    "canDo": true,
    "tenantCodename": "store123"
  }
]

Each object reflects a single permission grant, aligned with the givenPermissions model:

Error Responses

{
  "status": "ERR",
  "message": "No login found"
}

Notes

Tip: Applications can cache permission results client-side or server-side, but should occasionally refresh by calling this endpoint, especially after login or permission-changing operations.

Route: permissions/:permissionName

Route Definition: Checks whether the current user has access to a specific permission, and provides a list of scoped object exceptions or inclusions.

Route Type: permissionScopeCheck

Access Route: GET /permissions/:permissionName

Parameters

Parameter Type Required Population
permissionName String Yes request.params.permissionName

Behavior

// Sample GET /permissions/orders.manage
axios.get("/permissions/orders.manage", {
  headers: {
    "Authorization": "Bearer your-jwt-token"
  }
});

Success Response

{
  "canDo": true,
  "exceptions": [
    "a1f2e3d4-xxxx-yyyy-zzzz-object1",
    "b2c3d4e5-xxxx-yyyy-zzzz-object2"
  ]
}

All sources, documents and other digital materials are copyright of .

About Us

For more information please visit our website: .

. .