Projects API
The standard API of Microsoft Dynamics 365 Business Central creates and changes projects and time registrations, but only reads project tasks and project planning lines. The MCP Guard extension adds two API pages that fill that gap, so that an AI assistant can create and change project tasks and project planning lines. The pages work on Business Central versions 28 and 29.
The endpoint
https://api.businesscentral.dynamics.com/v2.0/{environment}/api/vangelderSolutions/projects/v1.0/companies({companyId})/…
| Entity | Object | Operations |
|---|---|---|
projectTasks | Page 73633189 MCP Guard Project Tasks API | Read, create, modify. |
projectPlanningLines | Page 73633190 MCP Guard Proj. Plan Lines API | Read, create, modify. |
Nothing is deleted through these pages. They have no actions and they do not post. Usage is posted through Business Central's own journals and time registration.
What it takes to use them
- Assign the permission set MCP GUARD - USER. Since version 1.13.0.0 it holds the two pages, and nothing on business data. The separate set MCP GUARD - PROJECTS no longer exists. See Permission Sets.
- Give the user Business Central's own permissions on projects.
- Assign an MCP Guard licence.
- Set Project Access on the user's rule. Modify allows changes. Create and Actions also allows creating tasks and planning lines. See Access Levels per Module.
- Add the two pages to the MCP configuration with the operations you want, and turn on Unblock Edit Tools. See MCP Configurations.
Create a project task
Send projectNumber and taskNumber first, then description and taskType. A client can also change totaling, the location and the dimensions.
The totals per task are read-only: budget, usage, billable and invoiced. To get the tasks of one project, filter on projectNumber.
Create a project planning line
Send projectNumber, taskNumber, lineType, planningDate, type and number first, then quantity and the prices. The fields are validated as on the Project Planning Lines page, so the order matters: send the line type, the type and the number before the quantity and the prices.
Without lineNumber, the line gets the next number of its task, in steps of 10000.
On an existing line a client changes the planning date, the quantity, the unit cost, the unit price or the description. To get the lines of one task, filter on projectNumber and taskNumber.
The keys never change
The project number and the task number of an existing project task cannot be changed through the API. Neither can the project, the task and the line number of an existing project planning line. Business Central refuses such a change with a message. See Troubleshoot the API Pages.