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 new Project.
Note that third-party applications using this endpoint via OAuth2 cannot be associated with an Ontology SDK as this will reduce the scope of operations to only those within specified projects. When creating the application, select "No, I won't use an Ontology SDK" on the Resources page.
Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:filesystem-write
.
object
string
The display name of the Resource
string
string
The unique resource identifier (RID) of a Space.
map<RoleId, array>
list<RoleId>
list<OrganizationRid>
object
string
The unique resource identifier (RID) of a Project.
string
The display name of the Project. Must be unique and cannot contain a /
string
The description associated with the Project.
string
The documentation associated with the Project.
string
The full path to the resource, including the resource name itself
string
The Foundry user who created this resource
string
The Foundry user who last updated this resource
string
The time at which the resource was created.
string
The 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
string
The Space Resource Identifier (RID) that the Project lives in.
1
2
3
4
5
curl -X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer $TOKEN" \
"https://$HOSTNAME/api/v2/filesystem/projects/create?preview=true" \
-d '{"organizationRids":["ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa"],"displayName":"My Important Project","defaultRoles":["8bf49052-dc37-4528-8bf0-b551cfb71268"],"description":"project description","roleGrants":{"8bf49052-dc37-4528-8bf0-b551cfb71268":[{"principalId":"f05f8da4-b84c-4fca-9c77-8af0b13d11de","principalType":"USER"}]},"spaceRid":"ri.compass.main.folder.a86ad5f5-3db5-48e4-9fdd-00aa3e5731ca"}'
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 | ||
---|---|---|
Space | Error Code | NOT_FOUND |
Status Code | 404 | |
Description | The referenced space cannot be found. | |
Parameters | spaceRid | |
Project | Error Code | INVALID_ARGUMENT |
Status Code | 400 | |
Description | Project creation is not supported in the current user's space. | |
Parameters | spaceRid | |
Project | Error Code | CONFLICT |
Status Code | 404 | |
Description | The requested display name for the created project is already being used in the space. | |
Parameters | displayName, spaceRid | |
Invalid | Error Code | INVALID_ARGUMENT |
Status Code | 400 | |
Description | The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` or be too long. | |
Parameters | displayName | |
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 | A roleId referenced in either default roles or role grants does not exist in the project role set for the space. | |
Parameters | requestedRoleIds | |
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 | Could not create the Project. |
See Errors for a general overview of errors in the platform.