postProjectsWithHttpInfo method
Creates a project — the handle a site is deployed and served under — and answers 201 with it in draft.
Creates a project — the handle a site is deployed and served under — and answers 201 with it in draft. name is required; slug is derived from the name when omitted and is the identifier that matters — it becomes the S3 key segment, the public host <slug>.hanzo.app, and the handle every later call addresses, so it must match ^[a-z0-9]([a-z0-9-]{0,38}[a-z0-9])?$ and may not be a reserved label such as api or admin. framework is a build hint from a closed set, defaulting to static; it never gates a deploy, it only tells CI how to build a linked repo. Two defaults are worth knowing: the analytics beacon is ON unless analytics is explicitly false, and visibility is public unless asked otherwise. Publishing publicly is free; PRIVATE is the paid feature, and an unfunded org asking for it is refused rather than quietly published as public. Creation also provisions the project's data space and a canonical git repo, both best-effort — neither can fail the create. Scope: a validated principal is required (403 without one) and the project is created in THAT principal's org. The slug is unique per org, so a slug already used in the caller's own org is a 409 while the same slug in another org is irrelevant.
Note: This method returns the HTTP Response.
Parameters:
- ProjectsCreate projectsCreate (required):
Implementation
Future<Response> postProjectsWithHttpInfo(ProjectsCreate projectsCreate,) async {
// ignore: prefer_const_declarations
final path = r'/v1/projects';
// ignore: prefer_final_locals
Object? postBody = projectsCreate;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}