api

package
v5.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2026 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockTilQueueHasRunningItem

func BlockTilQueueHasRunningItem(c *gin.Context)

BlockTilQueueHasRunningItem

@Summary	Block til pipeline queue has a running item
@Router		/queue/norunningpipelines [get]
@Produce	plain
@Success	204
@Tags		Pipeline queues
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)

func CancelPipeline

func CancelPipeline(c *gin.Context)

CancelPipeline

@Summary	Cancel a pipeline
@Router		/repos/{repo_id}/pipelines/{number}/cancel [post]
@Produce	plain
@Success	200
@Tags		Pipelines
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		number			path	int		true	"the number of the pipeline"

func CancelWorkflow

func CancelWorkflow(c *gin.Context)

CancelWorkflow

@Summary	Cancel a specific workflow in a pipeline
@Router		/repos/{repo_id}/pipelines/{number}/workflows/{workflow_id}/cancel [post]
@Produce	plain
@Success	200
@Tags		Pipelines
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		number			path	int		true	"the number of the pipeline"
@Param		workflow_id		path	int		true	"the id of the workflow to cancel"

func ChownRepo

func ChownRepo(c *gin.Context)

ChownRepo

@Summary	Change a repository's owner to the currently authenticated user
@Router		/repos/{repo_id}/chown [post]
@Produce	json
@Success	200	{object}	Repo
@Tags		Repositories
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"

func CreatePipeline

func CreatePipeline(c *gin.Context)

CreatePipeline

@Summary	Trigger a manual pipeline
@Router		/repos/{repo_id}/pipelines [post]
@Produce	json
@Success	200	{object}	Pipeline
@Tags		Pipelines
@Param		Authorization	header	string			true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int				true	"the repository id"
@Param		options			body	PipelineOptions	true	"the options for the pipeline to run"

func DeleteAccessToken

func DeleteAccessToken(c *gin.Context)

DeleteAccessToken

@Summary		Delete an access token
@Description	Deletes an access token by ID.
@Router			/user/access-tokens/{token_id} [delete]
@Produce		plain
@Success		204
@Tags			User
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			token_id		path	int		true	"the token's id"

func DeleteAccessTokenBatch

func DeleteAccessTokenBatch(c *gin.Context)

DeleteAccessTokenBatch

@Summary		Delete multiple access tokens
@Description	Deletes multiple access tokens by their IDs.
@Router			/user/access-tokens/batch [delete]
@Accept			json
@Produce		plain
@Success		204
@Tags			User
@Param			Authorization	header	string							true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			ids				body	DeleteAccessTokenBatchRequest	true	"Token IDs to delete"

func DeleteAgent

func DeleteAgent(c *gin.Context)

DeleteAgent

@Summary	Delete an agent
@Router		/agents/{agent_id} [delete]
@Produce	plain
@Success	200
@Tags		Agents
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		agent_id		path	int		true	"the agent's id"

func DeleteAutoscaler

func DeleteAutoscaler(c *gin.Context)

DeleteAutoscaler

@Summary	Delete an autoscaler
@Router		/autoscalers/{autoscaler_id} [delete]
@Produce	plain
@Success	204
@Tags		Autoscalers
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		autoscaler_id	path	int		true	"the autoscaler's id"

func DeleteCron

func DeleteCron(c *gin.Context)

DeleteCron

@Summary	Delete a cron job
@Router		/repos/{repo_id}/cron/{cron} [delete]
@Produce	plain
@Success	204
@Tags		Repository cron jobs
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		cron			path	string	true	"the cron job id"

func DeleteForge

func DeleteForge(c *gin.Context)

DeleteForge

@Summary	Delete a forge
@Router		/forges/{forgeId} [delete]
@Produce	plain
@Success	200
@Tags		Forges
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		forgeId			path	int		true	"the forge's id"

func DeleteGlobalRegistry

func DeleteGlobalRegistry(c *gin.Context)

DeleteGlobalRegistry

@Summary	Delete a global registry by name
@Router		/registries/{registry} [delete]
@Produce	plain
@Success	204
@Tags		Registries
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		registry		path	string	true	"the registry's name"

func DeleteGlobalSecret

func DeleteGlobalSecret(c *gin.Context)

DeleteGlobalSecret

@Summary	Delete a global secret by name
@Router		/secrets/{secret} [delete]
@Produce	plain
@Success	204
@Tags		Secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		secret			path	string	true	"the secret's name"

func DeleteIntegration added in v5.1.0

func DeleteIntegration(c *gin.Context)

DeleteIntegration

@Summary	Delete an integration
@Router		/user/integrations/{integration_id} [delete]
@Produce	plain
@Success	204
@Tags		Integrations
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		integration_id	path	int		true	"the integration's id"

func DeleteOrg

func DeleteOrg(c *gin.Context)

DeleteOrg

@Summary		Delete an organization
@Description	Deletes the given org. Requires admin rights.
@Router			/orgs/{id} [delete]
@Produce		plain
@Success		204
@Tags			Orgs
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			id				path	string	true	"the org's id"

func DeleteOrgAgent

func DeleteOrgAgent(c *gin.Context)

DeleteOrgAgent

@Summary	Delete an organization-scoped agent
@Router		/orgs/{org_id}/agents/{agent_id} [delete]
@Produce	plain
@Success	204
@Tags		Agents
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		org_id			path	int		true	"the organization's id"
@Param		agent_id		path	int		true	"the agent's id"

func DeleteOrgRegistry

func DeleteOrgRegistry(c *gin.Context)

DeleteOrgRegistry

@Summary	Delete an organization registry by name
@Router		/orgs/{org_id}/registries/{registry} [delete]
@Produce	plain
@Success	204
@Tags		Organization registries
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		org_id			path	string	true	"the org's id"
@Param		registry		path	string	true	"the registry's name"

func DeleteOrgSecret

func DeleteOrgSecret(c *gin.Context)

DeleteOrgSecret

@Summary	Delete an organization secret by name
@Router		/orgs/{org_id}/secrets/{secret} [delete]
@Produce	plain
@Success	204
@Tags		Organization secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		org_id			path	string	true	"the org's id"
@Param		secret			path	string	true	"the secret's name"

func DeletePipeline

func DeletePipeline(c *gin.Context)

DeletePipeline

@Summary	Delete a pipeline
@Router		/repos/{repo_id}/pipelines/{number} [delete]
@Produce	plain
@Success	204
@Tags		Pipelines
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		number			path	int		true	"the number of the pipeline"

func DeletePipelineLogs

func DeletePipelineLogs(c *gin.Context)

DeletePipelineLogs

@Summary	Deletes all logs of a pipeline
@Router		/repos/{repo_id}/logs/{number} [delete]
@Produce	plain
@Success	204
@Tags		Pipeline logs
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		number			path	int		true	"the number of the pipeline"

func DeleteRegistry

func DeleteRegistry(c *gin.Context)

DeleteRegistry

@Summary	Delete a registry by name
@Router		/repos/{repo_id}/registries/{registry} [delete]
@Produce	plain
@Success	204
@Tags		Repository registries
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		registry		path	string	true	"the registry name"

func DeleteRepo

func DeleteRepo(c *gin.Context)

DeleteRepo

@Summary	Delete a repository
@Router		/repos/{repo_id} [delete]
@Produce	json
@Success	200	{object}	Repo
@Tags		Repositories
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"

func DeleteSecret

func DeleteSecret(c *gin.Context)

DeleteSecret

@Summary	Delete a repository secret by name
@Router		/repos/{repo_id}/secrets/{secretName} [delete]
@Produce	plain
@Success	204
@Tags		Repository secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		secretName		path	string	true	"the secret name"

func DeleteStepLogs

func DeleteStepLogs(c *gin.Context)

DeleteStepLogs

@Summary	Delete step logs of a pipeline
@Router		/repos/{repo_id}/logs/{number}/{stepId} [delete]
@Produce	plain
@Success	204
@Tags		Pipeline logs
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		number			path	int		true	"the number of the pipeline"
@Param		stepId			path	int		true	"the step id"

func DeleteToken

func DeleteToken(c *gin.Context)

DeleteToken

@Summary		Reset a token
@Description	Deprecated: Use DELETE /user/access-tokens/:token_id instead. This endpoint rotates the user hash which invalidates ALL tokens.
@Router			/user/token [delete]
@Produce		plain
@Success		200
@Tags			User
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Deprecated

func DeleteUser

func DeleteUser(c *gin.Context)

DeleteUser

@Summary		Delete a user
@Description	Deletes the given user. Requires admin rights.
@Router			/users/{login} [delete]
@Produce		plain
@Success		204
@Tags			Users
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			login			path	string	true	"the user's login name"

func DeleteUserForge added in v5.2.0

func DeleteUserForge(c *gin.Context)

DeleteUserForge

@Summary		Unlink a forge from the current user
@Description	Removes a forge connection from the authenticated user's account. The primary forge cannot be unlinked. All active repos from this forge owned by the user will be disabled and their webhooks removed.
@Router			/user/forges/{forge_id} [delete]
@Produce		json
@Success		200	{object}	UnlinkForgeResponse
@Tags			User
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			forge_id		path	int		true	"the forge's id"

func EventStreamSSE

func EventStreamSSE(c *gin.Context)

EventStreamSSE

@Summary		Stream events like pipeline updates
@Description	With quic and http2 support
@Router			/stream/events [get]
@Produce		plain
@Success		200
@Tags			Events

func GetAccessToken

func GetAccessToken(c *gin.Context)

GetAccessToken

@Summary		Get an access token
@Description	Returns a single access token by ID.
@Router			/user/access-tokens/{token_id} [get]
@Produce		json
@Success		200	{object}	AccessToken
@Tags			User
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			token_id		path	int		true	"the token's id"

func GetAccessTokenList

func GetAccessTokenList(c *gin.Context)

GetAccessTokenList

@Summary		List access tokens
@Description	Returns all access tokens for the authenticated user.
@Router			/user/access-tokens [get]
@Produce		json
@Success		200	{array}	AccessToken
@Tags			User
@Param			Authorization	header	string	true	"Insert your personal access token"				default(Bearer <personal access token>)
@Param			page			query	int		false	"for response pagination, page offset number"	default(1)
@Param			perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetAccessibleIntegrations added in v5.1.0

func GetAccessibleIntegrations(c *gin.Context)

GetAccessibleIntegrations

@Summary		List integrations accessible to the user
@Description	Returns integrations owned by the user plus those shared via allowlists
@Router			/user/integrations/accessible [get]
@Produce		json
@Success		200	{array}	Integration
@Tags			Integrations
@Param			Authorization	header	string	true	"Insert your personal access token"				default(Bearer <personal access token>)
@Param			page			query	int		false	"for response pagination, page offset number"	default(1)
@Param			perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetAgent

func GetAgent(c *gin.Context)

GetAgent

@Summary	Get an agent
@Router		/agents/{agent_id} [get]
@Produce	json
@Success	200	{object}	Agent
@Tags		Agents
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		agent_id		path	int		true	"the agent's id"

func GetAgentTasks

func GetAgentTasks(c *gin.Context)

GetAgentTasks

@Summary	List agent tasks
@Router		/agents/{agent_id}/tasks [get]
@Produce	json
@Success	200	{array}	Task
@Tags		Agents
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		agent_id		path	int		true	"the agent's id"

func GetAgents

func GetAgents(c *gin.Context)

GetAgents

@Summary	List agents
@Router		/agents [get]
@Produce	json
@Success	200	{array}	Agent
@Tags		Agents
@Param		Authorization	header	string	true	"Insert your personal access token"				default(Bearer <personal access token>)
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)
@Param		search			query	string	false	"search in name, platform, backend, custom labels, ID"
@Param		platform		query	string	false	"filter by platform"
@Param		backend			query	string	false	"filter by backend"
@Param		sort			query	string	false	"sort field: id, name, platform, backend, last_contact, capacity"	default(id)
@Param		order			query	string	false	"sort order: asc or desc"											default(asc)

func GetAllRepos

func GetAllRepos(c *gin.Context)

GetAllRepos

@Summary		List all repositories on the server
@Description	Returns a list of all repositories. Requires admin rights.
@Router			/repos [get]
@Produce		json
@Success		200	{array}	Repo
@Tags			Repositories
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			active			query	bool	false	"only list active repos"
@Param			page			query	int		false	"for response pagination, page offset number"	default(1)
@Param			perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetAutoscaler

func GetAutoscaler(c *gin.Context)

GetAutoscaler

@Summary	Get an autoscaler
@Router		/autoscalers/{autoscaler_id} [get]
@Produce	json
@Success	200	{object}	Autoscaler
@Tags		Autoscalers
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		autoscaler_id	path	int		true	"the autoscaler's id"

func GetAutoscalerSelf

func GetAutoscalerSelf(c *gin.Context)

func GetAutoscalers

func GetAutoscalers(c *gin.Context)

GetAutoscalers

@Summary	List autoscalers
@Router		/autoscalers [get]
@Produce	json
@Success	200	{array}	Autoscaler
@Tags		Autoscalers
@Param		Authorization	header	string	true	"Insert your personal access token"				default(Bearer <personal access token>)
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)
@Param		search			query	string	false	"search in name, provider, region, ID"
@Param		provider		query	string	false	"filter by provider"
@Param		enabled			query	bool	false	"filter by enabled status"
@Param		sort			query	string	false	"sort field: id, name, provider, last_contact"	default(id)
@Param		order			query	string	false	"sort order: asc or desc"						default(asc)

func GetAvailableForges added in v5.2.0

func GetAvailableForges(c *gin.Context)

GetAvailableForges

@Summary		Get all available forges that can be linked
@Description	Returns all configured forges, indicating which ones are already linked to the user
@Router			/user/forges/available [get]
@Produce		json
@Success		200	{array}	AvailableForgeResponse
@Tags			User
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)

func GetAvailableScopes

func GetAvailableScopes(c *gin.Context)

GetAvailableScopes

@Summary		Get available scopes
@Description	Returns the available scopes for access tokens based on user role.
@Router			/user/access-tokens/scopes [get]
@Produce		json
@Success		200	{object}	map[string][]string
@Tags			User
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)

func GetBadge

func GetBadge(c *gin.Context)

GetBadge

@Summary	Get status of pipeline as SVG badge
@Router		/badges/{repo_id}/status.svg [get]
@Produce	image/svg+xml
@Success	200
@Tags		Badges
@Param		repo_id	path	int	true	"the repository id"

func GetCC

func GetCC(c *gin.Context)

GetCC

@Summary		Provide pipeline status information to the CCMenu tool
@Description	CCMenu displays the pipeline status of projects on a CI server as an item in the Mac's menu bar.
@Description	More details on how to install, you can find at http://ccmenu.org/
@Description	The response format adheres to CCTray v1 Specification, https://cctray.org/v1/
@Router			/badges/{repo_id}/cc.xml [get]
@Produce		xml
@Success		200
@Tags			Badges
@Param			repo_id	path	int	true	"the repository id"

func GetCron

func GetCron(c *gin.Context)

GetCron

@Summary	Get a cron job
@Router		/repos/{repo_id}/cron/{cron} [get]
@Produce	json
@Success	200	{object}	Cron
@Tags		Repository cron jobs
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		cron			path	string	true	"the cron job id"

func GetCronList

func GetCronList(c *gin.Context)

GetCronList

@Summary	List cron jobs
@Router		/repos/{repo_id}/cron [get]
@Produce	json
@Success	200	{array}	Cron
@Tags		Repository cron jobs
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetEntities

func GetEntities(c *gin.Context)

GetEntities

@Summary		List all entities (users and organizations)
@Description	Returns a combined list of users and organizations for admin management. Requires admin rights.
@Router			/entities [get]
@Produce		json
@Success		200	{array}	Entity
@Tags			Admin
@Param			Authorization	header	string	true	"Insert your personal access token"				default(Bearer <personal access token>)
@Param			page			query	int		false	"for response pagination, page offset number"	default(1)
@Param			perPage			query	int		false	"for response pagination, max items per page"	default(15)
@Param			entity_type		query	string	false	"filter by entity type (user, org, or comma-separated)"
@Param			is_admin		query	string	false	"filter by admin status (true, false, or empty for all)"
@Param			search			query	string	false	"search term for name/login/email"

func GetFeed

func GetFeed(c *gin.Context)

GetFeed

@Summary		Get the currently authenticated users pipeline feed
@Description	The feed lists the most recent pipeline for the currently authenticated user.
@Router			/user/feed [get]
@Produce		json
@Success		200	{array}	Feed
@Tags			User
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)

func GetForge

func GetForge(c *gin.Context)

GetForge

@Summary	Get a forge
@Router		/forges/{forgeId} [get]
@Produce	json
@Success	200	{object}	Forge
@Tags		Forges
@Param		Authorization	header	string	false	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		forgeId			path	int		true	"the forge's id"

func GetForges

func GetForges(c *gin.Context)

GetForges

@Summary	List forges
@Router		/forges [get]
@Produce	json
@Success	200	{array}	Forge
@Tags		Forges
@Param		Authorization	header	string	false	"Insert your personal access token"				default(Bearer <personal access token>)
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetGlobalRegistry

func GetGlobalRegistry(c *gin.Context)

GetGlobalRegistry

@Summary	Get a global registry by name
@Router		/registries/{registry} [get]
@Produce	json
@Success	200	{object}	Registry
@Tags		Registries
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		registry		path	string	true	"the registry's name"

func GetGlobalRegistryList

func GetGlobalRegistryList(c *gin.Context)

GetGlobalRegistryList

@Summary	List global registries
@Router		/registries [get]
@Produce	json
@Success	200	{array}	Registry
@Tags		Registries
@Param		Authorization	header	string	true	"Insert your personal access token"				default(Bearer <personal access token>)
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetGlobalSecret

func GetGlobalSecret(c *gin.Context)

GetGlobalSecret

@Summary	Get a global secret by name
@Router		/secrets/{secret} [get]
@Produce	json
@Success	200	{object}	Secret
@Tags		Secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		secret			path	string	true	"the secret's name"

func GetGlobalSecretAbbreviated

func GetGlobalSecretAbbreviated(c *gin.Context)

GetGlobalSecretAbbreviated

@Summary		Get a global secret with abbreviated value
@Description	Returns the secret with an abbreviated value showing first and last characters.
@Description	Only instance admins can view abbreviated global secret values.
@Router			/secrets/{secret}/abbreviated [get]
@Produce		json
@Success		200	{object}	Secret
@Failure		403	{string}	string	"Instance admin privileges required"
@Tags			Secrets
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			secret			path	string	true	"the secret's name"

func GetGlobalSecretList

func GetGlobalSecretList(c *gin.Context)

GetGlobalSecretList

@Summary	List global secrets
@Router		/secrets [get]
@Produce	json
@Success	200	{array}	Secret
@Tags		Secrets
@Param		Authorization	header	string	true	"Insert your personal access token"				default(Bearer <personal access token>)
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetHealth

func GetHealth(c *gin.Context)

GetHealth returns the health status of the server.

func GetHealthLive

func GetHealthLive(c *gin.Context)

GetHealthLive is a lightweight liveness probe (no dependencies checked).

func GetHealthReady

func GetHealthReady(c *gin.Context)

GetHealthReady is a readiness probe that checks if the server is ready to serve traffic.

func GetImportableRepos added in v5.2.0

func GetImportableRepos(c *gin.Context)

GetImportableRepos returns a list of repos the user can import settings from.

@Summary		Get repos that can be imported from
@Description	Returns all repos where the user is admin and which are different from the target repo.
@Router			/repos/{repo_id}/importable [get]
@Produce		json
@Success		200	{array}	Repo
@Tags			Repositories
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			repo_id			path	int		true	"the target repository id"

func GetIntegration added in v5.1.0

func GetIntegration(c *gin.Context)

GetIntegration

@Summary	Get an integration by ID
@Router		/user/integrations/{integration_id} [get]
@Produce	json
@Success	200	{object}	Integration
@Tags		Integrations
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		integration_id	path	int		true	"the integration's id"

func GetIntegrationList added in v5.1.0

func GetIntegrationList(c *gin.Context)

GetIntegrationList

@Summary	List user's integrations
@Router		/user/integrations [get]
@Produce	json
@Success	200	{array}	Integration
@Tags		Integrations
@Param		Authorization	header	string	true	"Insert your personal access token"				default(Bearer <personal access token>)
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetIntegrationTypes added in v5.1.0

func GetIntegrationTypes(c *gin.Context)

GetIntegrationTypes

@Summary	Get supported integration types
@Router		/integrations/types [get]
@Produce	json
@Success	200	{array}	object{type=string,name=string}
@Tags		Integrations

func GetLogout

func GetLogout(c *gin.Context)

func GetMaintenanceConfig

func GetMaintenanceConfig(c *gin.Context)

GetMaintenanceConfig returns the current maintenance configuration

@Summary		Get maintenance configuration
@Description	Get the current database maintenance configuration
@Router			/admin/maintenance/config [get]
@Produce		json
@Success		200	{object}	MaintenanceConfig
@Tags			Admin
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Security		ApiKeyAuth

func GetMaintenanceConfigByAction

func GetMaintenanceConfigByAction(c *gin.Context)

GetMaintenanceConfigByAction returns maintenance configuration for a specific action

@Summary		Get maintenance configuration by action type
@Description	Get maintenance configuration for a specific action (vacuum, kubernetes_cleanup)
@Router			/admin/maintenance/config/{action} [get]
@Produce		json
@Success		200	{object}	MaintenanceConfig
@Tags			Admin
@Param			Authorization	header	string	true	"Insert your personal access token"			default(Bearer <personal access token>)
@Param			action			path	string	true	"Action type (vacuum, kubernetes_cleanup)"	Enums(vacuum, kubernetes_cleanup)
@Security		ApiKeyAuth

func GetMaintenanceLogs

func GetMaintenanceLogs(c *gin.Context)

GetMaintenanceLogs returns recent maintenance logs

@Summary		Get maintenance logs
@Description	Get recent database maintenance logs
@Router			/admin/maintenance/logs [get]
@Produce		json
@Success		200	{array}	MaintenanceLog
@Tags			Admin
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			limit			query	int		false	"Number of logs to return"			default(50)
@Security		ApiKeyAuth

func GetMaintenanceStats

func GetMaintenanceStats(c *gin.Context)

GetMaintenanceStats returns maintenance statistics

@Summary		Get maintenance statistics
@Description	Get database maintenance statistics
@Router			/admin/maintenance/stats [get]
@Produce		json
@Success		200	{object}	MaintenanceStats
@Tags			Admin
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Security		ApiKeyAuth

func GetMetrics

func GetMetrics(c *gin.Context)

GetMetrics

@Summary		Get metrics
@Description	Returns comprehensive metrics including builds per agent, repo, org, average build time, etc. Non-admins see only their accessible repos.
@Router			/metrics [get]
@Produce		json
@Success		200	{object}	model.Metrics
@Tags			Metrics
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			after			query	int		false	"Unix timestamp - filter metrics after this time"
@Param			before			query	int		false	"Unix timestamp - filter metrics before this time"
@Param			all				query	bool	false	"Show all instance metrics (admin only)"
@Param			repos			query	string	false	"Comma-separated list of repo IDs to filter by"

func GetOrg

func GetOrg(c *gin.Context)

GetOrg

@Summary	Get an organization
@Router		/orgs/{org_id} [get]
@Produce	json
@Success	200	{array}	Org
@Tags		Organization
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		org_id			path	string	true	"the organization's id"

func GetOrgAgents

func GetOrgAgents(c *gin.Context)

GetOrgAgents

@Summary	List agents for an organization
@Router		/orgs/{org_id}/agents [get]
@Produce	json
@Success	200	{array}	Agent
@Tags		Agents
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		org_id			path	int		true	"the organization's id"
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetOrgPermissions

func GetOrgPermissions(c *gin.Context)

GetOrgPermissions

@Summary	Get the permissions of the currently authenticated user for the given organization
@Router		/orgs/{org_id}/permissions [get]
@Produce	json
@Success	200	{array}	OrgPerm
@Tags		Organization permissions
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		org_id			path	string	true	"the organization's id"

func GetOrgRegistry

func GetOrgRegistry(c *gin.Context)

GetOrgRegistry

@Summary	Get a organization registry by address
@Router		/orgs/{org_id}/registries/{registry} [get]
@Produce	json
@Success	200	{object}	Registry
@Tags		Organization registries
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		org_id			path	string	true	"the org's id"
@Param		registry		path	string	true	"the registry's address"

func GetOrgRegistryList

func GetOrgRegistryList(c *gin.Context)

GetOrgRegistryList

@Summary	List organization registries
@Router		/orgs/{org_id}/registries [get]
@Produce	json
@Success	200	{array}	Registry
@Tags		Organization registries
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		org_id			path	string	true	"the org's id"
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetOrgSecret

func GetOrgSecret(c *gin.Context)

GetOrgSecret

@Summary	Get a organization secret by name
@Router		/orgs/{org_id}/secrets/{secret} [get]
@Produce	json
@Success	200	{object}	Secret
@Tags		Organization secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		org_id			path	string	true	"the org's id"
@Param		secret			path	string	true	"the secret's name"

func GetOrgSecretAbbreviated

func GetOrgSecretAbbreviated(c *gin.Context)

GetOrgSecretAbbreviated

@Summary		Get an organization secret with abbreviated value
@Description	Returns the secret with an abbreviated value showing first and last characters.
@Description	Only org admins (via forge membership) can view abbreviated values.
@Router			/orgs/{org_id}/secrets/{secret}/abbreviated [get]
@Produce		json
@Success		200	{object}	Secret
@Failure		403	{string}	string	"Org admin privileges required to view secret value"
@Tags			Organization secrets
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			org_id			path	string	true	"the org's id"
@Param			secret			path	string	true	"the secret's name"

func GetOrgSecretList

func GetOrgSecretList(c *gin.Context)

GetOrgSecretList

@Summary	List organization secrets
@Router		/orgs/{org_id}/secrets [get]
@Produce	json
@Success	200	{array}	Secret
@Tags		Organization secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		org_id			path	string	true	"the org's id"
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetOrgs

func GetOrgs(c *gin.Context)

GetOrgs

@Summary		List organizations
@Description	Returns all registered orgs in the system. Requires admin rights.
@Router			/orgs [get]
@Produce		json
@Success		200	{array}	Org
@Tags			Orgs
@Param			Authorization	header	string	true	"Insert your personal access token"				default(Bearer <personal access token>)
@Param			page			query	int		false	"for response pagination, page offset number"	default(1)
@Param			perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetPipeline

func GetPipeline(c *gin.Context)

GetPipeline

@Summary	Get a repositories pipeline
@Router		/repos/{repo_id}/pipelines/{number} [get]
@Produce	json
@Success	200	{object}	Pipeline
@Tags		Pipelines
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		number			path	int		true	"the number of the pipeline, OR 'latest'"

func GetPipelineConfig

func GetPipelineConfig(c *gin.Context)

GetPipelineConfig

@Summary	Get configuration files for a pipeline
@Router		/repos/{repo_id}/pipelines/{number}/config [get]
@Produce	json
@Success	200	{array}	Config
@Tags		Pipelines
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		number			path	int		true	"the number of the pipeline"

func GetPipelineLast

func GetPipelineLast(c *gin.Context)

func GetPipelineMetadata

func GetPipelineMetadata(c *gin.Context)

GetPipelineMetadata

@Summary	Get metadata for a pipeline or a specific workflow, including previous pipeline info
@Router		/repos/{repo_id}/pipelines/{number}/metadata [get]
@Produce	json
@Success	200	{object}	metadata.Metadata
@Tags		Pipelines
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		number			path	int		true	"the number of the pipeline"

func GetPipelineQueue

func GetPipelineQueue(c *gin.Context)

GetPipelineQueue

@Summary	List pipelines in queue
@Router		/pipelines [get]
@Produce	json
@Success	200	{array}	Feed
@Tags		Pipeline queues
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)

func GetPipelines

func GetPipelines(c *gin.Context)

GetPipelines

@Summary		List repository pipelines
@Description	Get a list of pipelines for a repository.
@Router			/repos/{repo_id}/pipelines [get]
@Produce		json
@Success		200	{array}	Pipeline
@Tags			Pipelines
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			repo_id			path	int		true	"the repository id"
@Param			page			query	int		false	"for response pagination, page offset number"	default(1)
@Param			perPage			query	int		false	"for response pagination, max items per page"	default(50)
@Param			before			query	string	false	"only return pipelines before this RFC3339 date"
@Param			after			query	string	false	"only return pipelines after this RFC3339 date"
@Param			branch			query	string	false	"filter pipelines by branch"
@Param			event			query	string	false	"filter pipelines by webhook events (comma separated)"
@Param			ref				query	string	false	"filter pipelines by strings contained in ref"
@Param			status			query	string	false	"filter pipelines by status"
@Param			search			query	string	false	"search pipelines by number, message, branch, or author"

func GetPublicRepos

func GetPublicRepos(c *gin.Context)

GetPublicRepos

@Summary		List public repositories
@Description	Returns a list of public repositories (no authentication required)
@Router			/repos/public [get]
@Produce		json
@Success		200	{array}	RepoLastPipeline
@Tags			Repositories
@Param			page	query	int	false	"for response pagination, page offset number"	default(1)
@Param			perPage	query	int	false	"for response pagination, max items per page"	default(50)

func GetQueueInfo

func GetQueueInfo(c *gin.Context)

GetQueueInfo

@Summary		Get pipeline queue information
@Description	Returns pipeline queue information with agent details
@Router			/queue/info [get]
@Produce		json
@Success		200	{object}	QueueInfo
@Tags			Pipeline queues
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)

func GetRegistry

func GetRegistry(c *gin.Context)

GetRegistry

@Summary	Get a registry by name
@Router		/repos/{repo_id}/registries/{registry} [get]
@Produce	json
@Success	200	{object}	Registry
@Tags		Repository registries
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		registry		path	string	true	"the registry name"

func GetRegistryList

func GetRegistryList(c *gin.Context)

GetRegistryList

@Summary	List registries
@Router		/repos/{repo_id}/registries [get]
@Produce	json
@Success	200	{array}	Registry
@Tags		Repository registries
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetRepo

func GetRepo(c *gin.Context)

GetRepo

@Summary	Get a repository
@Router		/repos/{repo_id} [get]
@Produce	json
@Success	200	{object}	Repo
@Tags		Repositories
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"

func GetRepoBranches

func GetRepoBranches(c *gin.Context)

GetRepoBranches

@Summary	Get branches of a repository
@Router		/repos/{repo_id}/branches [get]
@Produce	json
@Success	200	{array}	string
@Tags		Repositories
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetRepoForImport added in v5.2.0

func GetRepoForImport(c *gin.Context)

GetRepoForImport returns details of a specific repo for import preview.

@Summary		Get repo details for import preview
@Description	Returns details of a source repo including counts of secrets, registries, and crons.
@Router			/repos/{repo_id}/import-preview/{source_repo_id} [get]
@Produce		json
@Success		200	{object}	ImportPreviewResponse
@Tags			Repositories
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			repo_id			path	int		true	"the target repository id"
@Param			source_repo_id	path	int		true	"the source repository id"

func GetRepoPermissions

func GetRepoPermissions(c *gin.Context)

GetRepoPermissions

@Summary		Check current authenticated users access to the repository
@Description	The repository permission, according to the used access token.
@Router			/repos/{repo_id}/permissions [get]
@Produce		json
@Success		200	{object}	Perm
@Tags			Repositories
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			repo_id			path	int		true	"the repository id"

func GetRepoPullRequests

func GetRepoPullRequests(c *gin.Context)

GetRepoPullRequests

@Summary	List active pull requests of a repository
@Router		/repos/{repo_id}/pull_requests [get]
@Produce	json
@Success	200	{array}	PullRequest
@Tags		Repositories
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetRepos

func GetRepos(c *gin.Context)

GetRepos

@Summary		Get user's repositories
@Description	Retrieve the currently authenticated User's Repository list from all linked forges
@Router			/user/repos [get]
@Produce		json
@Success		200	{array}	RepoLastPipeline
@Tags			User
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			all				query	bool	false	"query all repos, including inactive ones"

func GetSecret

func GetSecret(c *gin.Context)

GetSecret

@Summary	Get a repository secret by name
@Router		/repos/{repo_id}/secrets/{secretName} [get]
@Produce	json
@Success	200	{object}	Secret
@Tags		Repository secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		secretName		path	string	true	"the secret name"

func GetSecretAbbreviated

func GetSecretAbbreviated(c *gin.Context)

GetSecretAbbreviated

@Summary		Get a repository secret with abbreviated value
@Description	Returns the secret with an abbreviated value showing first and last characters.
@Description	Only users with explicit write access from the forge can view abbreviated values.
@Description	Instance admins without explicit repo access cannot view secret values.
@Router			/repos/{repo_id}/secrets/{secretName}/abbreviated [get]
@Produce		json
@Success		200	{object}	Secret
@Failure		403	{string}	string	"Insufficient permissions to view secret value"
@Tags			Repository secrets
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			repo_id			path	int		true	"the repository id"
@Param			secretName		path	string	true	"the secret name"

func GetSecretList

func GetSecretList(c *gin.Context)

GetSecretList

@Summary	List repository secrets
@Router		/repos/{repo_id}/secrets [get]
@Produce	json
@Success	200	{array}	Secret
@Tags		Repository secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetSelf

func GetSelf(c *gin.Context)

GetSelf

@Summary	Get the currently authenticated user
@Router		/user [get]
@Produce	json
@Success	200	{object}	User
@Tags		User
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)

func GetSignaturePublicKey

func GetSignaturePublicKey(c *gin.Context)

GetSignaturePublicKey

@Summary	Get server's signature public key
@Router		/signature/public-key [get]
@Produce	plain
@Success	200
@Tags		System
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)

func GetStepLogs

func GetStepLogs(c *gin.Context)

GetStepLogs

@Summary	Get logs for a pipeline step
@Router		/repos/{repo_id}/logs/{number}/{stepID} [get]
@Produce	json
@Success	200	{array}	LogEntry
@Tags		Pipeline logs
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		number			path	int		true	"the number of the pipeline"
@Param		stepID			path	int		true	"the step id"

func GetTimezones

func GetTimezones(c *gin.Context)

GetTimezones

@Summary		Get all available timezones
@Description	Returns a list of all IANA timezone names available in the system
@Router			/timezones [get]
@Produce		json
@Success		200	{array}	string
@Tags			System

func GetUser

func GetUser(c *gin.Context)

GetUser

@Summary		Get a user
@Description	Returns a user with the specified login name. Requires admin rights.
@Router			/users/{login} [get]
@Produce		json
@Success		200	{object}	User
@Tags			Users
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			login			path	string	true	"the user's login name"

func GetUserCronList

func GetUserCronList(c *gin.Context)

GetUserCronList

@Summary	List all crons from repos accessible by the current user
@Router		/user/crons [get]
@Produce	json
@Success	200	{array}	model.CronWithRepo
@Tags		User
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		search			query	string	false	"Search term for cron name"
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetUserForge added in v5.2.0

func GetUserForge(c *gin.Context)

GetUserForge

@Summary		Get a specific linked forge for the current user
@Description	Returns details of a specific forge connection for the authenticated user
@Router			/user/forges/{forge_id} [get]
@Produce		json
@Success		200	{object}	UserForgeResponse
@Tags			User
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			forge_id		path	int		true	"the forge's id"

func GetUserForgeAffectedRepos added in v5.2.0

func GetUserForgeAffectedRepos(c *gin.Context)

GetUserForgeAffectedRepos

@Summary		Get repos that would be affected by unlinking a forge
@Description	Returns all active repos owned by the user from the specified forge that would be disabled if the forge is unlinked.
@Router			/user/forges/{forge_id}/affected-repos [get]
@Produce		json
@Success		200	{array}	Repo
@Tags			User
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			forge_id		path	int		true	"the forge's id"

func GetUserForges added in v5.2.0

func GetUserForges(c *gin.Context)

GetUserForges

@Summary		Get all linked forges for the current user
@Description	Returns all forge connections linked to the authenticated user's account
@Router			/user/forges [get]
@Produce		json
@Success		200	{array}	UserForgeResponse
@Tags			User
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)

func GetUserOrgList added in v5.0.1

func GetUserOrgList(c *gin.Context)

GetUserOrgList

@Summary		List organizations the current user is a member of
@Description	Returns all organizations where the authenticated user has membership.
@Router			/user/orgs [get]
@Produce		json
@Success		200	{array}	Org
@Tags			User
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)

func GetUserRegistryList

func GetUserRegistryList(c *gin.Context)

GetUserRegistryList

@Summary	List all registries accessible by the current user
@Router		/user/registries [get]
@Produce	json
@Success	200	{array}	RegistryWithOrg
@Tags		User
@Param		Authorization	header	string	true	"Insert your personal access token"			default(Bearer <personal access token>)
@Param		scope			query	string	false	"Comma-separated scopes: user,org,global"	default("user,org,global")
@Param		search			query	string	false	"Search term for registry address"
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetUserSecretList

func GetUserSecretList(c *gin.Context)

GetUserSecretList

@Summary	List all secrets accessible by the current user
@Router		/user/secrets [get]
@Produce	json
@Success	200	{array}	SecretWithOrg
@Tags		User
@Param		Authorization	header	string	true	"Insert your personal access token"			default(Bearer <personal access token>)
@Param		scope			query	string	false	"Comma-separated scopes: user,org,global"	default("user,org,global")
@Param		search			query	string	false	"Search term for secret name"
@Param		page			query	int		false	"for response pagination, page offset number"	default(1)
@Param		perPage			query	int		false	"for response pagination, max items per page"	default(50)

func GetUsers

func GetUsers(c *gin.Context)

GetUsers

@Summary		List users
@Description	Returns all registered, active users in the system. Requires admin rights.
@Router			/users [get]
@Produce		json
@Success		200	{array}	User
@Tags			Users
@Param			Authorization	header	string	true	"Insert your personal access token"				default(Bearer <personal access token>)
@Param			page			query	int		false	"for response pagination, page offset number"	default(1)
@Param			perPage			query	int		false	"for response pagination, max items per page"	default(50)

func HandleAuth

func HandleAuth(c *gin.Context)

func ImportSettings added in v5.2.0

func ImportSettings(c *gin.Context)

ImportSettings imports settings from another repository.

@Summary		Import settings from another repository
@Description	Imports settings, secrets, registries, and/or crons from a source repository. User must be admin of both repositories.
@Router			/repos/{repo_id}/import-settings [post]
@Produce		json
@Success		200	{object}	ImportSettingsResponse
@Tags			Repositories
@Param			Authorization	header	string					true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			repo_id			path	int						true	"the target repository id"
@Param			request			body	ImportSettingsRequest	true	"Import options"

func LogLevel

func LogLevel(c *gin.Context)

LogLevel

@Summary		Current log level
@Description	Endpoint returns the current logging level. Requires admin rights.
@Router			/log-level [get]
@Produce		json
@Success		200	{object}	object{log-level=string}
@Tags			System

func LogStreamSSE

func LogStreamSSE(c *gin.Context)

LogStreamSSE

@Summary	Stream logs of a pipeline step
@Router		/stream/logs/{repo_id}/{pipeline}/{stepID} [get]
@Produce	plain
@Success	200
@Tags		Pipeline logs
@Param		repo_id		path	int	true	"the repository id"
@Param		pipeline	path	int	true	"the number of the pipeline"
@Param		stepID		path	int	true	"the step id"

func LookupOrg

func LookupOrg(c *gin.Context)

LookupOrg

@Summary	Lookup an organization by full name
@Router		/orgs/lookup/{org_full_name} [get]
@Produce	json
@Success	200	{object}	Org
@Tags		Orgs
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		org_full_name	path	string	true	"the organizations full name / slug"

func LookupRepo

func LookupRepo(c *gin.Context)

LookupRepo

@Summary	Lookup a repository by full name
@Router		/repos/lookup/{repo_full_name} [get]
@Produce	json
@Success	200	{object}	Repo
@Tags		Repositories
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_full_name	path	string	true	"the repository full name / slug"

func MoveRepo

func MoveRepo(c *gin.Context)

MoveRepo

@Summary	Move a repository to a new owner
@Router		/repos/{repo_id}/move [post]
@Produce	plain
@Success	204
@Tags		Repositories
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		to				query	string	true	"the username to move the repository to"

func PatchAccessToken

func PatchAccessToken(c *gin.Context)

PatchAccessToken

@Summary		Update an access token
@Description	Updates an access token's name and/or scopes.
@Router			/user/access-tokens/{token_id} [patch]
@Accept			json
@Produce		json
@Success		200	{object}	AccessToken
@Tags			User
@Param			Authorization	header	string						true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			token_id		path	int							true	"the token's id"
@Param			token			body	UpdateAccessTokenRequest	true	"Token update data"

func PatchAgent

func PatchAgent(c *gin.Context)

PatchAgent

@Summary	Update an agent
@Router		/agents/{agent_id} [patch]
@Produce	json
@Success	200	{object}	Agent
@Tags		Agents
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		agent_id		path	int		true	"the agent's id"
@Param		agentData		body	Agent	true	"the agent's data"

func PatchAutoscaler

func PatchAutoscaler(c *gin.Context)

PatchAutoscaler

@Summary	Update an autoscaler
@Router		/autoscalers/{autoscaler_id} [patch]
@Produce	json
@Success	200	{object}	Autoscaler
@Tags		Autoscalers
@Param		Authorization	header	string		true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		autoscaler_id	path	int			true	"the autoscaler's id"
@Param		autoscalerData	body	Autoscaler	true	"the autoscaler's data (only enabled can be updated)"

func PatchCron

func PatchCron(c *gin.Context)

PatchCron

@Summary	Update a cron job
@Router		/repos/{repo_id}/cron/{cron} [patch]
@Produce	json
@Success	200	{object}	Cron
@Tags		Repository cron jobs
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		cron			path	string	true	"the cron job id"
@Param		cronJob			body	Cron	true	"the cron job data"

func PatchForge

func PatchForge(c *gin.Context)

PatchForge

@Summary	Update a forge
@Router		/forges/{forgeId} [patch]
@Produce	json
@Success	200	{object}	Forge
@Tags		Forges
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		forgeId			path	int		true	"the forge's id"
@Param		forgeData		body	Forge	true	"the forge's data"

func PatchGlobalRegistry

func PatchGlobalRegistry(c *gin.Context)

PatchGlobalRegistry

@Summary	Update a global registry by name
@Router		/registries/{registry} [patch]
@Produce	json
@Success	200	{object}	Registry
@Tags		Registries
@Param		Authorization	header	string		true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		registry		path	string		true	"the registry's name"
@Param		registryData	body	Registry	true	"the registry's data"

func PatchGlobalSecret

func PatchGlobalSecret(c *gin.Context)

PatchGlobalSecret

@Summary	Update a global secret by name
@Router		/secrets/{secret} [patch]
@Produce	json
@Success	200	{object}	Secret
@Tags		Secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		secret			path	string	true	"the secret's name"
@Param		secretData		body	Secret	true	"the secret's data"

func PatchIntegration added in v5.1.0

func PatchIntegration(c *gin.Context)

PatchIntegration

@Summary	Update an integration
@Router		/user/integrations/{integration_id} [patch]
@Produce	json
@Success	200	{object}	Integration
@Tags		Integrations
@Param		Authorization	header	string		true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		integration_id	path	int			true	"the integration's id"
@Param		integration		body	Integration	true	"the integration's data"

func PatchOrgAgent

func PatchOrgAgent(c *gin.Context)

PatchOrgAgent

@Summary	Update an organization-scoped agent
@Router		/orgs/{org_id}/agents/{agent_id} [patch]
@Produce	json
@Success	200	{object}	Agent
@Tags		Agents
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		org_id			path	int		true	"the organization's id"
@Param		agent_id		path	int		true	"the agent's id"
@Param		agent			body	Agent	true	"the agent's updated data"

func PatchOrgRegistry

func PatchOrgRegistry(c *gin.Context)

PatchOrgRegistry

@Summary	Update an organization registry by name
@Router		/orgs/{org_id}/registries/{registry} [patch]
@Produce	json
@Success	200	{object}	Registry
@Tags		Organization registries
@Param		Authorization	header	string		true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		org_id			path	string		true	"the org's id"
@Param		registry		path	string		true	"the registry's name"
@Param		registryData	body	Registry	true	"the update registry data"

func PatchOrgSecret

func PatchOrgSecret(c *gin.Context)

PatchOrgSecret

@Summary	Update an organization secret by name
@Router		/orgs/{org_id}/secrets/{secret} [patch]
@Produce	json
@Success	200	{object}	Secret
@Tags		Organization secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		org_id			path	string	true	"the org's id"
@Param		secret			path	string	true	"the secret's name"
@Param		secretData		body	Secret	true	"the update secret data"

func PatchRegistry

func PatchRegistry(c *gin.Context)

PatchRegistry

@Summary	Update a registry by name
@Router		/repos/{repo_id}/registries/{registry} [patch]
@Produce	json
@Success	200	{object}	Registry
@Tags		Repository registries
@Param		Authorization	header	string		true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int			true	"the repository id"
@Param		registry		path	string		true	"the registry name"
@Param		registryData	body	Registry	true	"the attributes for the registry"

func PatchRepo

func PatchRepo(c *gin.Context)

PatchRepo

@Summary	Update a repository
@Router		/repos/{repo_id} [patch]
@Produce	json
@Success	200	{object}	Repo
@Tags		Repositories
@Param		Authorization	header	string		true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int			true	"the repository id"
@Param		repo			body	RepoPatch	true	"the repository's information"

func PatchSecret

func PatchSecret(c *gin.Context)

PatchSecret

@Summary	Update a repository secret by name
@Router		/repos/{repo_id}/secrets/{secretName} [patch]
@Produce	json
@Success	200	{object}	Secret
@Tags		Repository secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		secretName		path	string	true	"the secret name"
@Param		secret			body	Secret	true	"the secret itself"

func PatchUser

func PatchUser(c *gin.Context)

PatchUser

@Summary		Update a user
@Description	Changes the data of an existing user. Requires admin rights.
@Router			/users/{login} [patch]
@Produce		json
@Accept			json
@Success		200	{object}	User
@Tags			Users
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			login			path	string	true	"the user's login name"
@Param			user			body	User	true	"the user's data"

func PauseQueue

func PauseQueue(c *gin.Context)

PauseQueue

@Summary	Pause the pipeline queue
@Router		/queue/pause [post]
@Produce	plain
@Success	204
@Tags		Pipeline queues
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)

func PostAccessToken

func PostAccessToken(c *gin.Context)

PostAccessToken

@Summary		Create an access token
@Description	Creates a new personal access token. The token value is only returned once.
@Router			/user/access-tokens [post]
@Accept			json
@Produce		json
@Success		200	{object}	AccessTokenResponse
@Tags			User
@Param			Authorization	header	string						true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			token			body	CreateAccessTokenRequest	true	"Token data"

func PostAgent

func PostAgent(c *gin.Context)

PostAgent

@Summary		Create a new agent
@Description	Creates a new agent with a random token
@Router			/agents [post]
@Produce		json
@Success		200	{object}	Agent
@Tags			Agents
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			agent			body	Agent	true	"the agent's data (only 'name' and 'no_schedule' are read)"

func PostApproval

func PostApproval(c *gin.Context)

PostApproval

@Summary	Approve and start a pipeline
@Router		/repos/{repo_id}/pipelines/{number}/approve [post]
@Produce	json
@Success	200	{object}	Pipeline
@Tags		Pipelines
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		number			path	int		true	"the number of the pipeline"

func PostAutoscaler

func PostAutoscaler(c *gin.Context)

PostAutoscaler

@Summary		Create a new autoscaler
@Description	Creates a new autoscaler with a random token. Configuration is provided by the autoscaler upon registration.
@Router			/autoscalers [post]
@Produce		json
@Success		200	{object}	AutoscalerWithToken
@Tags			Autoscalers
@Param			Authorization	header	string		true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			autoscaler		body	Autoscaler	true	"the autoscaler's data (only name is required)"

func PostAutoscalerHeartbeat

func PostAutoscalerHeartbeat(c *gin.Context)

PostAutoscalerHeartbeat

@Summary		Update autoscaler heartbeat
@Description	Autoscalers send heartbeats to update their status and configuration
@Router			/autoscalers/{autoscaler_id}/heartbeat [post]
@Produce		json
@Success		200	{object}	map[string]interface{}
@Tags			Autoscalers
@Param			Authorization	header	string	true	"Insert autoscaler token"	default(Bearer <autoscaler token>)
@Param			autoscaler_id	path	int		true	"the autoscaler's id"
@Param			heartbeat		body	object	true	"heartbeat data with active_agents, pending_agents, version, and configuration"

func PostAutoscalerToken

func PostAutoscalerToken(c *gin.Context)

PostAutoscalerToken

@Summary		Regenerate autoscaler token
@Description	Generates a new token for the autoscaler and invalidates the old one
@Router			/autoscalers/{autoscaler_id}/token [post]
@Produce		json
@Success		200	{object}	map[string]interface{}
@Tags			Autoscalers
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			autoscaler_id	path	int		true	"the autoscaler's id"

func PostCron

func PostCron(c *gin.Context)

PostCron

@Summary	Create a cron job
@Router		/repos/{repo_id}/cron [post]
@Produce	json
@Success	200	{object}	Cron
@Tags		Repository cron jobs
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		cronJob			body	Cron	true	"the new cron job"

func PostDecline

func PostDecline(c *gin.Context)

PostDecline

@Summary	Decline a pipeline
@Router		/repos/{repo_id}/pipelines/{number}/decline [post]
@Produce	json
@Success	200	{object}	Pipeline
@Tags		Pipelines
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		number			path	int		true	"the number of the pipeline"

func PostForge

func PostForge(c *gin.Context)

PostForge

@Summary		Create a new forge
@Description	Creates a new forge with a random token
@Router			/forges [post]
@Produce		json
@Success		200	{object}	Forge
@Tags			Forges
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			forge			body	Forge	true	"the forge's data (only 'name' and 'no_schedule' are read)"

func PostGlobalRegistry

func PostGlobalRegistry(c *gin.Context)

PostGlobalRegistry

@Summary	Create a global registry
@Router		/registries [post]
@Produce	json
@Success	200	{object}	Registry
@Tags		Registries
@Param		Authorization	header	string		true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		registry		body	Registry	true	"the registry object data"

func PostGlobalSecret

func PostGlobalSecret(c *gin.Context)

PostGlobalSecret

@Summary	Create a global secret
@Router		/secrets [post]
@Produce	json
@Success	200	{object}	Secret
@Tags		Secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		secret			body	Secret	true	"the secret object data"

func PostHook

func PostHook(c *gin.Context)

PostHook

@Summary	Incoming webhook from forge
@Router		/hook [post]
@Produce	plain
@Success	200
@Tags		System
@Param		hook	body	object	true	"the webhook payload; forge is automatically detected"

func PostIntegration added in v5.1.0

func PostIntegration(c *gin.Context)

PostIntegration

@Summary	Create an integration
@Router		/user/integrations [post]
@Produce	json
@Success	200	{object}	Integration
@Tags		Integrations
@Param		Authorization	header	string		true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		integration		body	Integration	true	"the integration object data"

func PostOrgAgent

func PostOrgAgent(c *gin.Context)

PostOrgAgent

@Summary		Create a new organization-scoped agent
@Description	Creates a new agent with a random token, scoped to the specified organization
@Router			/orgs/{org_id}/agents [post]
@Produce		json
@Success		200	{object}	Agent
@Tags			Agents
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			org_id			path	int		true	"the organization's id"
@Param			agent			body	Agent	true	"the agent's data (only 'name' and 'no_schedule' are read)"

func PostOrgRegistry

func PostOrgRegistry(c *gin.Context)

PostOrgRegistry

@Summary	Create an organization registry
@Router		/orgs/{org_id}/registries [post]
@Produce	json
@Success	200	{object}	Registry
@Tags		Organization registries
@Param		Authorization	header	string		true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		org_id			path	string		true	"the org's id"
@Param		registryData	body	Registry	true	"the new registry"

func PostOrgSecret

func PostOrgSecret(c *gin.Context)

PostOrgSecret

@Summary	Create an organization secret
@Router		/orgs/{org_id}/secrets [post]
@Produce	json
@Success	200	{object}	Secret
@Tags		Organization secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		org_id			path	string	true	"the org's id"
@Param		secretData		body	Secret	true	"the new secret"

func PostPipeline

func PostPipeline(c *gin.Context)

PostPipeline

@Summary		Restart a pipeline
@Description	Restarts a pipeline optional with altered event, deploy or environment
@Router			/repos/{repo_id}/pipelines/{number} [post]
@Produce		json
@Success		200	{object}	Pipeline
@Tags			Pipelines
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			repo_id			path	int		true	"the repository id"
@Param			number			path	int		true	"the number of the pipeline"
@Param			event			query	string	false	"override the event type"
@Param			deploy_to		query	string	false	"override the target deploy value"

func PostRegistry

func PostRegistry(c *gin.Context)

PostRegistry

@Summary	Create a registry
@Router		/repos/{repo_id}/registries [post]
@Produce	json
@Success	200	{object}	Registry
@Tags		Repository registries
@Param		Authorization	header	string		true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int			true	"the repository id"
@Param		registry		body	Registry	true	"the new registry data"

func PostRepo

func PostRepo(c *gin.Context)

PostRepo

@Summary	Activate a repository
@Router		/repos [post]
@Produce	json
@Success	200	{object}	Repo
@Tags		Repositories
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		forge_remote_id	query	string	true	"the id of a repository at the forge"
@Param		forge_id		query	int		false	"the forge id (for multi-forge users)"

func PostSecret

func PostSecret(c *gin.Context)

PostSecret

@Summary	Create a repository secret
@Router		/repos/{repo_id}/secrets [post]
@Produce	json
@Success	200	{object}	Secret
@Tags		Repository secrets
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		secret			body	Secret	true	"the new secret"

func PostToken

func PostToken(c *gin.Context)

PostToken

@Summary		Return the token of the current user as string
@Description	Deprecated: Use POST /user/access-tokens instead for better security and scope control.
@Router			/user/token [post]
@Produce		plain
@Success		200
@Tags			User
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Deprecated

func PostUser

func PostUser(c *gin.Context)

PostUser

@Summary		Create a user
@Description	Creates a new user account with the specified external login. Requires admin rights.
@Router			/users [post]
@Produce		json
@Success		200	{object}	User
@Tags			Users
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			user			body	User	true	"the user's data"

func RepairAllRepos

func RepairAllRepos(c *gin.Context)

RepairAllRepos

@Summary		Repair all repositories on the server
@Description	Executes a repair process on all repositories. Requires admin rights.
@Router			/repos/repair [post]
@Produce		plain
@Success		204
@Tags			Repositories
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)

func RepairRepo

func RepairRepo(c *gin.Context)

RepairRepo

@Summary	Repair a repository
@Router		/repos/{repo_id}/repair [post]
@Produce	plain
@Success	204
@Tags		Repositories
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"

func ResumeQueue

func ResumeQueue(c *gin.Context)

ResumeQueue

@Summary	Resume the pipeline queue
@Router		/queue/resume [post]
@Produce	plain
@Success	204
@Tags		Pipeline queues
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)

func RunCron

func RunCron(c *gin.Context)

RunCron

@Summary	Start a cron job now
@Router		/repos/{repo_id}/cron/{cron} [post]
@Produce	json
@Success	200	{object}	Pipeline
@Tags		Repository cron jobs
@Param		Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param		repo_id			path	int		true	"the repository id"
@Param		cron			path	string	true	"the cron job id"

func RunMaintenanceNow

func RunMaintenanceNow(c *gin.Context)

RunMaintenanceNow runs database maintenance immediately

@Summary		Run maintenance now
@Description	Trigger database maintenance operation immediately
@Router			/admin/maintenance/run [post]
@Produce		json
@Accept			json
@Success		200	{object}	map[string]string
@Tags			Admin
@Param			Authorization	header	string					true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			request			body	RunMaintenanceRequest	true	"Maintenance job request"
@Security		ApiKeyAuth

func SetLogLevel

func SetLogLevel(c *gin.Context)

SetLogLevel

@Summary		Set log level
@Description	Endpoint sets the current logging level. Requires admin rights.
@Router			/log-level [post]
@Produce		json
@Success		200	{object}	object{log-level=string}
@Tags			System
@Param			Authorization	header	string						true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			log-level		body	object{log-level=string}	true	"the new log level, one of <debug,trace,info,warn,error,fatal,panic,disabled>"

func TestIntegration added in v5.1.0

func TestIntegration(c *gin.Context)

TestIntegration

@Summary		Test integration connection
@Description	Tests the connection to the configured secret store
@Router			/user/integrations/{integration_id}/test [post]
@Produce		json
@Success		200	{object}	object{status=string}
@Failure		400	{string}	string	"Connection test failed"
@Tags			Integrations
@Param			Authorization	header	string	true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			integration_id	path	int		true	"the integration's id"

func UpdateMaintenanceConfig

func UpdateMaintenanceConfig(c *gin.Context)

UpdateMaintenanceConfig updates the maintenance configuration

@Summary		Update maintenance configuration
@Description	Update the database maintenance configuration
@Router			/admin/maintenance/config [put]
@Produce		json
@Accept			json
@Success		200	{object}	MaintenanceConfig
@Tags			Admin
@Param			Authorization	header	string				true	"Insert your personal access token"	default(Bearer <personal access token>)
@Param			config			body	MaintenanceConfig	true	"Maintenance configuration"
@Security		ApiKeyAuth

func UpdateMaintenanceConfigByAction

func UpdateMaintenanceConfigByAction(c *gin.Context)

UpdateMaintenanceConfigByAction updates maintenance configuration for a specific action

@Summary		Update maintenance configuration by action type
@Description	Update maintenance configuration for a specific action (vacuum, kubernetes_cleanup)
@Router			/admin/maintenance/config/{action} [put]
@Produce		json
@Accept			json
@Success		200	{object}	MaintenanceConfig
@Tags			Admin
@Param			Authorization	header	string				true	"Insert your personal access token"			default(Bearer <personal access token>)
@Param			action			path	string				true	"Action type (vacuum, kubernetes_cleanup)"	Enums(vacuum, kubernetes_cleanup)
@Param			config			body	MaintenanceConfig	true	"Maintenance configuration"
@Security		ApiKeyAuth

func Version

func Version(c *gin.Context)

Version

@Summary		Get version
@Description	Endpoint returns the server version and build information.
@Router			/version [get]
@Produce		json
@Success		200	{object}	object{source=string,version=string}
@Tags			System

Types

type AccessTokenResponse

type AccessTokenResponse struct {
	*model.AccessToken
	Token string `json:"token"` // Only populated on creation
}

AccessTokenResponse is returned when creating a token (includes the plain token once).

type AvailableForgeResponse added in v5.2.0

type AvailableForgeResponse struct {
	ID        int64  `json:"id"`
	URL       string `json:"url"`
	Type      string `json:"type"`
	IsLinked  bool   `json:"is_linked"`
	IsPrimary bool   `json:"is_primary,omitempty"`
	LinkedAs  string `json:"linked_as,omitempty"`
}

AvailableForgeResponse represents a forge that can potentially be linked.

type CreateAccessTokenRequest

type CreateAccessTokenRequest struct {
	Name      string   `json:"name"       binding:"required"`
	Scopes    []string `json:"scopes"     binding:"required,min=1"`
	OrgID     int64    `json:"org_id"`
	RepoID    int64    `json:"repo_id"`
	ExpiresAt int64    `json:"expires_at"`
}

CreateAccessTokenRequest is the request body for creating an access token.

type DeleteAccessTokenBatchRequest

type DeleteAccessTokenBatchRequest struct {
	IDs []int64 `json:"ids" binding:"required,min=1"`
}

DeleteAccessTokenBatchRequest is the request body for batch deleting access tokens.

type HealthStatus

type HealthStatus struct {
	Status     string            `json:"status"`
	InstanceID string            `json:"instance_id"`
	Timestamp  int64             `json:"timestamp"`
	Checks     map[string]string `json:"checks"`
	Version    string            `json:"version"`
	Uptime     float64           `json:"uptime_seconds"`

} //	@name	HealthStatus

HealthStatus represents the health status of the server.

type ImportPreviewResponse added in v5.2.0

type ImportPreviewResponse struct {
	Repo          *model.Repo `json:"repo"`
	SecretCount   int         `json:"secret_count"`
	RegistryCount int         `json:"registry_count"`
	CronCount     int         `json:"cron_count"`
	PipelineCount int         `json:"pipeline_count"`
	// Org-level assets that would be migrated from same-named orgs on other forges
	OrgSecretCount   int    `json:"org_secret_count"`
	OrgRegistryCount int    `json:"org_registry_count"`
	OrgName          string `json:"org_name,omitempty"`
	OrgSourceForge   string `json:"org_source_forge,omitempty"`
}

ImportPreviewResponse contains repo info and counts for import preview.

type ImportSettingsRequest added in v5.2.0

type ImportSettingsRequest struct {
	SourceRepoID int64 `json:"source_repo_id" binding:"required"`
	Settings     bool  `json:"settings"`
	Secrets      bool  `json:"secrets"`
	Registries   bool  `json:"registries"`
	Crons        bool  `json:"crons"`
	Pipelines    bool  `json:"pipelines"`
	DeleteSource bool  `json:"delete_source"`
}

ImportSettingsRequest represents the request body for importing settings.

type ImportSettingsResponse added in v5.2.0

type ImportSettingsResponse struct {
	Message            string `json:"message"`
	SettingsImported   bool   `json:"settings_imported"`
	SecretsImported    int    `json:"secrets_imported"`
	RegistriesImported int    `json:"registries_imported"`
	CronsImported      int    `json:"crons_imported"`
	PipelinesImported  int    `json:"pipelines_imported"`
	SourceDeleted      bool   `json:"source_deleted"`
}

ImportSettingsResponse represents the response after importing settings.

type RepoResponse added in v5.2.0

type RepoResponse struct {
	*model.Repo
	Messages []string `json:"messages,omitempty"`

} //	@name	RepoResponse

RepoResponse wraps a Repo with optional messages for the frontend.

type RunMaintenanceRequest

type RunMaintenanceRequest struct {
	Job    string `json:"job" binding:"required" example:"vacuumLogTable"` // The maintenance job to run
	DryRun bool   `json:"dry_run,omitempty"`                               // Run in dry-run mode (only for kubernetesCleanup)
}

RunMaintenanceRequest represents the request payload for running maintenance.

type SecretViewAuthorizer

type SecretViewAuthorizer struct {
	// contains filtered or unexported fields
}

SecretViewAuthorizer handles authorization for viewing abbreviated secret values. This is separate from the standard middleware permission checks because viewing secret values requires explicit permissions, not auto-granted admin permissions.

func NewSecretViewAuthorizer

func NewSecretViewAuthorizer(store store.Store, membership cache.MembershipService) *SecretViewAuthorizer

NewSecretViewAuthorizer creates a new SecretViewAuthorizer instance.

func NewSecretViewAuthorizerFromContext

func NewSecretViewAuthorizerFromContext(c *gin.Context, membership cache.MembershipService) *SecretViewAuthorizer

NewSecretViewAuthorizerFromContext creates a SecretViewAuthorizer from gin context.

func (*SecretViewAuthorizer) CanViewGlobalSecret

func (a *SecretViewAuthorizer) CanViewGlobalSecret(user *model.User) bool

CanViewGlobalSecret checks if user is an instance admin. Only instance admins can view global secret values.

func (*SecretViewAuthorizer) CanViewOrgSecret

func (a *SecretViewAuthorizer) CanViewOrgSecret(c context.Context, user *model.User, org *model.Org, _forge forge.Forge) bool

CanViewOrgSecret checks if user is an org admin via forge membership. Org admin membership (as determined by the forge) is sufficient to view org secrets.

func (*SecretViewAuthorizer) CanViewRepoSecret

func (a *SecretViewAuthorizer) CanViewRepoSecret(user *model.User, repo *model.Repo) bool

CanViewRepoSecret checks if user has EXPLICIT write access to view repo secrets. Instance admins without explicit forge-granted push access cannot view secret values. This ensures that instance admins can only view secrets for repos they have explicit access to via the forge (GitHub/GitLab/etc.), not just by virtue of being admins.

type UnlinkForgeResponse added in v5.2.0

type UnlinkForgeResponse struct {
	Message       string `json:"message"`
	DisabledRepos int    `json:"disabled_repos"`
}

UnlinkForgeResponse represents the response when unlinking a forge.

type UpdateAccessTokenRequest

type UpdateAccessTokenRequest struct {
	Name   string   `json:"name"`
	Scopes []string `json:"scopes"`
}

UpdateAccessTokenRequest is the request body for updating an access token.

type UserForgeResponse added in v5.2.0

type UserForgeResponse struct {
	ID          int64           `json:"id"`
	ForgeID     int64           `json:"forge_id"`
	ForgeName   string          `json:"forge_name,omitempty"`
	ForgeType   string          `json:"forge_type,omitempty"`
	ForgeIcon   string          `json:"forge_icon,omitempty"`
	IsPrimary   bool            `json:"is_primary"`
	ForgeLogin  string          `json:"forge_login"`
	ForgeEmail  string          `json:"forge_email,omitempty"`
	ForgeAvatar string          `json:"forge_avatar,omitempty"`
	LinkedAt    int64           `json:"linked_at"`
	LastUsed    int64           `json:"last_used,omitempty"`
	Status      UserForgeStatus `json:"status"`
	Expiry      int64           `json:"expiry,omitempty"`
}

UserForgeResponse represents a user's forge connection in API responses.

type UserForgeStatus added in v5.2.0

type UserForgeStatus string

UserForgeStatus represents the connection status of a linked forge.

const (
	// UserForgeStatusActive means the token is valid and not expired.
	UserForgeStatusActive UserForgeStatus = "active"
	// UserForgeStatusExpired means the token has expired and needs re-authentication.
	UserForgeStatusExpired UserForgeStatus = "expired"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL