This endpoint is in preview and may be modified or removed at any time.
To use this endpoint, add preview=true to the request query parameters.
Creates a project from a project template.
Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:filesystem-write.
objectstringThe unique resource identifier (RID) of a project template.
map<ProjectTemplateVariableId, ProjectTemplateVariableValue>list<RoleId>list<OrganizationRid>stringobjectstringThe unique resource identifier (RID) of a Project.
stringThe display name of the Project. Must be unique and cannot contain a /
stringThe description associated with the Project.
stringThe documentation associated with the Project.
stringThe full path to the resource, including the resource name itself
stringThe Foundry user who created this resource
stringThe Foundry user who last updated this resource
stringThe time at which the resource was created.
stringThe time at which the resource was most recently updated.
string (enum)The trash status of the Project.
Enum values: DIRECTLY_TRASHED, ANCESTOR_TRASHED, NOT_TRASHED
stringThe Space Resource Identifier (RID) that the Project lives in.
1
2
3
4
5
curl -X POST \
\t-H "Content-type: application/json" \
\t-H "Authorization: Bearer $TOKEN" \
"https://$HOSTNAME/api/v2/filesystem/projects/createFromTemplate?preview=true" \
-d '{"variableValues":{"name":"my project name"},"organizationRids":["ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa"],"defaultRoles":["8bf49052-dc37-4528-8bf0-b551cfb71268"],"templateRid":"ri.compass.main.template.c410f510-2937-420e-8ea3-8c9bcb3c1791"}'1
2
3
4
5
6
7
8
9
10
11
12
13
{
"path": "/Empyrean Airlines/My Important Project",
"updatedTime": "2024-09-25T17:29:35.974Z",
"updatedBy": "f05f8da4-b84c-4fca-9c77-8af0b13d11de",
"createdBy": "f05f8da4-b84c-4fca-9c77-8af0b13d11de",
"displayName": "My Important Project",
"documentation": "project documentation",
"description": "project description",
"createdTime": "2024-09-25T17:29:35.974Z",
"rid": "ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8",
"spaceRid": "ri.compass.main.folder.a86ad5f5-3db5-48e4-9fdd-00aa3e5731ca",
"trashStatus": "NOT_TRASHED"
}| Error Name | ||
|---|---|---|
Project | Error Code | NOT_FOUND |
| Status Code | 404 | |
| Description | The project template RID referenced cannot be found. | |
| Parameters | projectTemplateRid | |
Default | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | The requested default roles are not in the role set of the space for the project template. | |
| Parameters | | |
Not | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | The user is not authorized to apply at least one of the organization markings required to create the project from template. | |
| Parameters | organizationRids | |
Invalid | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | Organizations on a project must also exist on the parent space. This error is thrown if the configuration of a project's organizations (on creation or subsequently) results in the project being marked with either no organizations in a marked space, or with an organization that is not present on the parent space. | |
| Parameters | organizationRids | |
Create | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | The create project request would create a project with no principal being granted an owner-like role. As a result, there would be no user with administrative privileges over the project. A role is defined to be owner-like if it has the `compass:edit-project` operation. In the common case of the default role-set, this is just the `compass:manage` role. | |
| Parameters | grantedRoleIds, roleSetOwnerLikeRoleIds | |
Create | Error Code | PERMISSION_DENIED |
| Status Code | 403 | |
| Description | The user is not authorized to create the group in the organization required to create the project from template. | |
| Parameters | organizationsWithoutPermission | |
Add | Error Code | PERMISSION_DENIED |
| Status Code | 403 | |
| Description | The user is not authorized to add a a group to the parent group required to create the project from template. | |
| Parameters | parentGroupsWithoutPermission | |
Template | Error Code | CONFLICT |
| Status Code | 409 | |
| Description | Creating the project from template would attempt to create new groups with names conflicting either with other new groups, or existing groups. | |
| Parameters | conflictingGroupNames | |
Template | Error Code | CONFLICT |
| Status Code | 409 | |
| Description | Creating the project from template would attempt to create new markings with names conflicting either with other new markings, or existing markings. | |
| Parameters | conflictingMarkingNames | |
Invalid | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | The template requested for project creation contains principal IDs that do not exist. | |
| Parameters | invalidPrincipalIds | |
Invalid | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | Either the user has not passed a value for a template with unset project description, or has passed a value for a template with fixed project description. | |
| Parameters | | |
Invalid | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | Either the user has not passed organizations for a template with suggested organizations, or has passed organization for a template with fixed organizations. | |
| Parameters | | |
Missing | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | A variable defined on the template requested for project creation does not have a value set in the request. | |
| Parameters | templateVariableId | |
Invalid | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | A variable referenced in the request to create project from template is not defined on the template. | |
| Parameters | templateVariableId | |
Invalid | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | The value passed in the request to create project from template for an enum type variable is not a valid option. | |
| Parameters | variableId, invalidOption, validOptions | |
Organizations | Error Code | NOT_FOUND |
| Status Code | 404 | |
| Description | At least one organization RID could not be found. | |
| Parameters | organizationRids | |
Invalid | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | Either the user has not passed default roles for a template with suggested default roles, or has passed default roles for a template with fixed default roles. | |
| Parameters | | |
Create | Error Code | PERMISSION_DENIED |
| Status Code | 403 | |
| Description | Could not createFromTemplate the Project. | |
| Parameters | | |
Project | Error Code | NOT_FOUND |
| Status Code | 404 | |
| Description | The given Project could not be found. | |
| Parameters | projectRid | |
See Errors for a general overview of errors in the platform.