Skip to main content

Create project

POST/api/projects
Signed-in member

Read the guideSource: ProjectApiController#create(opens in new tab)

Request body​

application/json

FieldTypeRequiredNotes
namestringRequiredmax 120

Response​

Success: 201

FieldTypeRequiredNotes
idstring (uuid)Optional
namestringOptional
createdAtstring (date-time)Optional
sourcesarray of IntegrationSourceViewOptional
sources[].idstring (uuid)Optional
sources[].typeenum SourceTypeOptionalGITHUBGITLABLINEARJIRA
sources[].deliveryMechanismstringOptional
sources[].externalProjectKeystringOptional
sources[].externalTeamKeystringOptional
sources[].ownerstringOptional
sources[].repositorystringOptional
sources[].apiBaseUrlstringOptional
sources[].externalWorkspaceKeystringOptional
sources[].credentialIdentitystringOptional
sources[].webhookAuthModeenum WebhookAuthModeOptionalGITHUB_HMACGITLAB_SIGNING_TOKENGITLAB_SECRET_TOKENLINEAR_HMACNONE
sources[].webhookIdstring (uuid)Optional
sources[].webhookPathstringOptional
sources[].createdAtstring (date-time)Optional
sources[].lastDeliveryAtstring (date-time)Optional
sources[].accessTokenConfiguredbooleanOptional
sources[].accessTokenUpdatedAtstring (date-time)Optional
sources[].connectionStatusenum ConnectionStatusOptionalACTIVEERRORDISCONNECTED
sources[].lastSyncAtstring (date-time)Optional
sources[].lastErrorCodestringOptional
sources[].nextPollAtstring (date-time)Optional
sources[].healthSourceHealthOptional

Errors​

StatusCodeApplies to
400validation_faileda field is missing or out of rangeAny endpoint
400malformed_requestthe body cannot be readAny endpoint
400invalid_parametera path or query parameter is missing or does not convert, such as an ID that is not a UUIDAny endpoint
401authentication_requiredno sessionAny endpoint
403access_deniedan administrator endpoint, or a missing or stale CSRF tokenAny endpoint
404not_foundno such addressAny endpoint
405method_not_allowedthe address does not take that methodAny endpoint
415unsupported_media_typethe address does not read a body of that typeAny endpoint
500internal_errora fault ReleaseFlow did not foresee; the body never carries the exception behind itAny endpoint
400gitlab_base_url_invalidSources area
400gitlab_host_not_allowedSources area
400jira_site_invalidSources area
400github_token_rejectedSources area
400gitlab_token_rejectedSources area
400linear_token_rejectedSources area
400jira_token_rejectedSources area
400source_credential_requiredSources area
400source_signing_token_invalidSources area
404project_not_foundSources area
404source_not_foundSources area
409github_repository_already_connectedSources area
409gitlab_project_already_connectedSources area
409linear_team_already_connectedSources area
409jira_project_already_connectedSources area
409source_token_missingSources area
409source_sync_in_progressSources area
409source_import_not_supportedSources area
409source_import_not_resumableSources area
409source_disconnectedSources area
409source_not_disconnectedSources area
409source_reconnect_requiredSources area
409source_has_no_webhookSources area
409source_secret_generatedSources area
409source_secret_pastedSources area
503github_unavailableSources area
503gitlab_unavailableSources area
503jira_unavailableSources area

Request

bash
# Sign in first and keep the session cookie in cookies.txt (see Sessions and CSRF).
# CSRF_HEADER and CSRF_TOKEN are the headerName and token GET /api/csrf returned.
curl -X POST "http://localhost:8080/api/projects" \
-b cookies.txt -c cookies.txt \
-H "$CSRF_HEADER: $CSRF_TOKEN" \
-H "Content-Type: application/json" \
--data '{
"name": "<string>"
}'

The request body is an example built from the schema; replace every placeholder.

Response

201

Example

{
  "id": "<uuid>",
  "name": "<string>",
  "createdAt": "<date-time>",
  "sources": [
    {
      "id": "<uuid>",
      "type": "GITHUB",
      "deliveryMechanism": "<string>",
      "externalProjectKey": "<string>",
      "externalTeamKey": "<string>",
      "owner": "<string>",
      "repository": "<string>",
      "apiBaseUrl": "<string>",
      "externalWorkspaceKey": "<string>",
      "credentialIdentity": "<string>",
      "webhookAuthMode": "GITHUB_HMAC",
      "webhookId": "<uuid>",
      "webhookPath": "<string>",
      "createdAt": "<date-time>",
      "lastDeliveryAt": "<date-time>",
      "accessTokenConfigured": false,
      "accessTokenUpdatedAt": "<date-time>",
      "connectionStatus": "ACTIVE",
      "lastSyncAt": "<date-time>",
      "lastErrorCode": "<string>",
      "nextPollAt": "<date-time>",
      "health": {
        "connected": false,
        "disconnectedAt": "<date-time>",
        "secretUpdatedAt": "<date-time>",
        "signatureFailureCount": 0,
        "lastSignatureFailureAt": "<date-time>",
        "quiet": false,
        "quietSince": "<date-time>",
        "usualGapHours": 0,
        "overdue": false
      }
    }
  ]
}