28.2.2. Projects
The Knowledge Store REST API supports the following endpoints for managing, building, and deploying projects in Business Central. The Knowledge Store REST API base URL is http://SERVER:PORT/decision-central/rest/
. All requests require HTTP Basic authentication or token-based authentication for the rest-all
user role.
- [GET] /spaces/{spaceName}/projects
Returns projects in a specified space.
Expand 表28.4 Request parameters Name Description Type Requirement spaceName
Name of the space for which you are retrieving projects
String
Required
Example server response (JSON)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - [GET] /spaces/{spaceName}/projects/{projectName}
Returns information about a specified project in a specified space.
Expand 表28.5 Request parameters Name Description Type Requirement spaceName
Name of the space where the project is located
String
Required
projectName
Name of the project to be retrieved
String
Required
Example server response (JSON)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - [POST] /spaces/{spaceName}/projects
Creates a project in a specified space.
Expand 表28.6 Request parameters Name Description Type Requirement spaceName
Name of the space in which the new project will be created
String
Required
body
The
name
,groupId
,version
,description
, and any other components of the new projectRequest body
Required
Example request body (JSON)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example server response (JSON)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - [DELETE] /spaces/{spaceName}/projects/{projectName}
Deletes a specified project from a specified space.
Expand 表28.7 Request parameters Name Description Type Requirement spaceName
Name of the space where the project is located
String
Required
projectName
Name of the project to be deleted
String
Required
Example server response (JSON)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - [POST] /spaces/{spaceName}/git/clone
Clones a project into a specified space from a specified Git address.
Expand 表28.8 Request parameters Name Description Type Requirement spaceName
Name of the space to which you are cloning a project
String
Required
body
The
name
,description
, and Git repositoryuserName
,password
, andgitURL
for the project to be clonedRequest body
Required
Example request body (JSON)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example server response (JSON)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - [POST] /spaces/{spaceName}/projects/{projectName}/maven/compile
Compiles a specified project in a specified space (equivalent to
mvn compile
).Expand 表28.9 Request parameters Name Description Type Requirement spaceName
Name of the space where the project is located
String
Required
projectName
Name of the project to be compiled
String
Required
Example server response (JSON)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - [POST] /spaces/{spaceName}/projects/{projectName}/maven/test
Tests a specified project in a specified space (equivalent to
mvn test
).Expand 表28.10 Request parameters Name Description Type Requirement spaceName
Name of the space where the project is located
String
Required
projectName
Name of the project to be tested
String
Required
Example server response (JSON)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - [POST] /spaces/{spaceName}/projects/{projectName}/maven/install
Installs a specified project in a specified space (equivalent to
mvn install
).Expand 表28.11 Request parameters Name Description Type Requirement spaceName
Name of the space where the project is located
String
Required
projectName
Name of the project to be installed
String
Required
Example server response (JSON)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - [POST] /spaces/{spaceName}/projects/{projectName}/maven/deploy
Deploys a specified project in a specified space (equivalent to
mvn deploy
).Expand 表28.12 Request parameters Name Description Type Requirement spaceName
Name of the space where the project is located
String
Required
projectName
Name of the project to be deployed
String
Required
Example server response (JSON)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow