Working with Projects
With API 1.0, you can create, read, update, and delete projects. A project's default permission can only be one of "none", "read", or "write". More about permissions here.
You must be an administrator to create a project. Takes
- sName: the project name, which must be unique and contain at least some characters
- sDescription: the project description (optional; defaults to the empty string)
- permissionDefault: the default project permission (optional; defaults to "none")
and returns the new project's project record. The primary contact of the project will be you.
The default project permission determines who it is visible to and can read from it. The default project permission is also used for repositories. If a person's permission for a repository is not given, it defaults to "inherit", and the permission inherited is the default project permission of the project the repository belongs to. See Permissions.
Requires read access. Returns the project record corresponding to "ixProject".
Returns a list of all the project records that are readable by you. Use this method to determine the ixProjects, ixRepoGroups, and ixRepos you need.
You must be an administrator to write to a project. Takes
- sName: the new project name (optional)
- sDescription: the new project description (optional)
- permissionDefault: the new default project permission (optional)
and updates the fields on the project corresponding to "ixProject". Returns the updated project record.
You must be an administrator to delete a project. Deletes the project corresponding to "ixProject". Returns true on success.
The following machine codes are errors that may be returned from these calls. See also Common Errors.
- ProjectNameInsufficient: project names must contain enough alphanumeric characters to generate a slug.
- ProjectNameNumerical: project names cannot consist of all numbers.
- CannotUseReservedFileName: project names cannot be a reserved file name.
- ProjectNameIdentical: project names must be unique.
- NameTooSimilar: project name too similar to another project name.
- DefaultPermissionInvalid: invalid default permission.
- ProjectDescriptionTooLong: project descriptions must be at most 100 characters long.