Download a GitLab project for an assessment
POST/api/v1/integrations/gitlab/projects/:project_id/fetch
Download a GitLab project as a zip archive and store it under the assessment.
The archive is fetched using the connector's OAuth token, uploaded to object storage
under assessments/<assessment_mongo_id>/source/gitlab-<project_id>-<branch>.zip,
and the storage key is returned so the caller can register the source on
the assessment draft.
- Scope required:
integrations:manage. - Rate-limit tier:
integrations_fetch(10/hour per user). - The target assessment must belong to the caller's organization.
- 404 if the caller has no active GitLab connector.
- 500 if the object storage upload fails.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- 429
- 500
Successful Response
Bad request — malformed input or failed validation.
Missing, expired, or invalid credentials.
Authenticated but not authorized for this resource. Note: cross-organization reads return 404, not 403.
Resource not found, or hidden for tenant-enumeration safety (the caller lacks permission to know whether the resource exists).
Conflict — the current resource state does not allow this operation (e.g. assessment already started, email already in use).
Semantic validation failure — request shape was valid but contents were not.
Too many requests — rate limited. Retry after the window resets.
Internal server error — unexpected failure.