Comprehensive documentation for all remaining GitLab API resources including webhooks, wikis, snippets, labels, milestones, releases, deployments, security, analytics, and administrative operations.
Configure webhooks to receive notifications about project events.
/**
* ProjectHooks resource class for webhook management
*/
class ProjectHooks<C extends boolean = false> {
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(
projectId: string | number,
options?: PaginationRequestOptions<P> & Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<ProjectHookSchema[], C, E, P>>;
create<E extends boolean = false>(
projectId: string | number,
url: string,
options?: CreateHookOptions & Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<ProjectHookSchema, C, E, void>>;
edit<E extends boolean = false>(
projectId: string | number,
hookId: number,
url: string,
options?: EditHookOptions & Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<ProjectHookSchema, C, E, void>>;
remove<E extends boolean = false>(
projectId: string | number,
hookId: number,
options?: Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<void, C, E, void>>;
}Configure webhooks at group level.
/**
* GroupHooks resource class for group-level webhooks
*/
class GroupHooks<C extends boolean = false> {
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(
groupId: string | number,
options?: PaginationRequestOptions<P> & Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<GroupHookSchema[], C, E, P>>;
create<E extends boolean = false>(
groupId: string | number,
url: string,
options?: CreateHookOptions & Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<GroupHookSchema, C, E, void>>;
}Configure instance-wide webhooks (admin only).
/**
* SystemHooks resource class for instance webhooks
*/
class SystemHooks<C extends boolean = false> {
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(
options?: PaginationRequestOptions<P> & Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<SystemHookSchema[], C, E, P>>;
create<E extends boolean = false>(
url: string,
options?: CreateSystemHookOptions & Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<SystemHookSchema, C, E, void>>;
test<E extends boolean = false>(
hookId: number,
options?: Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<SystemHookTestResult, C, E, void>>;
}Configure third-party integrations.
/**
* Integrations resource class for external service integrations
*/
class Integrations<C extends boolean = false> {
show<E extends boolean = false>(
projectId: string | number,
integration: string,
options?: Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<IntegrationSchema, C, E, void>>;
edit<E extends boolean = false>(
projectId: string | number,
integration: string,
options?: Record<string, any> & Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<IntegrationSchema, C, E, void>>;
remove<E extends boolean = false>(
projectId: string | number,
integration: string,
options?: Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<void, C, E, void>>;
}Manage labels for issues and merge requests.
/**
* ProjectLabels resource class
*/
class ProjectLabels<C extends boolean = false> {
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(
projectId: string | number,
options?: { search?: string; includeAncestorGroups?: boolean }
& PaginationRequestOptions<P> & Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<LabelSchema[], C, E, P>>;
create<E extends boolean = false>(
projectId: string | number,
name: string,
color: string,
options?: { description?: string; priority?: number } & Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<LabelSchema, C, E, void>>;
edit<E extends boolean = false>(
projectId: string | number,
labelId: number,
options?: { name?: string; color?: string; description?: string } & Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<LabelSchema, C, E, void>>;
remove<E extends boolean = false>(
projectId: string | number,
labelId: number,
options?: Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<void, C, E, void>>;
}Manage labels at group level.
/**
* GroupLabels resource class
*/
class GroupLabels<C extends boolean = false> {
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(
groupId: string | number,
options?: PaginationRequestOptions<P> & Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<LabelSchema[], C, E, P>>;
create<E extends boolean = false>(
groupId: string | number,
name: string,
color: string,
options?: { description?: string } & Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<LabelSchema, C, E, void>>;
}Track milestones for project planning.
/**
* ProjectMilestones resource class
*/
class ProjectMilestones<C extends boolean = false> {
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(
projectId: string | number,
options?: { state?: 'active' | 'closed'; search?: string }
& PaginationRequestOptions<P> & Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<MilestoneSchema[], C, E, P>>;
create<E extends boolean = false>(
projectId: string | number,
title: string,
options?: { description?: string; dueDate?: string; startDate?: string }
& Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<MilestoneSchema, C, E, void>>;
edit<E extends boolean = false>(
projectId: string | number,
milestoneId: number,
options?: { title?: string; description?: string; dueDate?: string; stateEvent?: string }
& Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<MilestoneSchema, C, E, void>>;
}Track milestones at group level.
/**
* GroupMilestones resource class
*/
class GroupMilestones<C extends boolean = false> {
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(
groupId: string | number,
options?: { state?: 'active' | 'closed' }
& PaginationRequestOptions<P> & Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<MilestoneSchema[], C, E, P>>;
create<E extends boolean = false>(
groupId: string | number,
title: string,
options?: { description?: string; dueDate?: string }
& Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<MilestoneSchema, C, E, void>>;
}Manage project wiki pages.
/**
* ProjectWikis resource class
*/
class ProjectWikis<C extends boolean = false> {
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(
projectId: string | number,
options?: { withContent?: boolean }
& PaginationRequestOptions<P> & Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<WikiPageSchema[], C, E, P>>;
show<E extends boolean = false>(
projectId: string | number,
slug: string,
options?: Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<WikiPageSchema, C, E, void>>;
create<E extends boolean = false>(
projectId: string | number,
title: string,
content: string,
options?: { format?: 'markdown' | 'rdoc' | 'asciidoc' | 'org' }
& Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<WikiPageSchema, C, E, void>>;
edit<E extends boolean = false>(
projectId: string | number,
slug: string,
options?: { title?: string; content?: string; format?: string }
& Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<WikiPageSchema, C, E, void>>;
remove<E extends boolean = false>(
projectId: string | number,
slug: string,
options?: Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<void, C, E, void>>;
}Manage group wiki pages.
/**
* GroupWikis resource class
*/
class GroupWikis<C extends boolean = false> {
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(
groupId: string | number,
options?: { withContent?: boolean }
& PaginationRequestOptions<P> & Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<WikiPageSchema[], C, E, P>>;
show<E extends boolean = false>(
groupId: string | number,
slug: string,
options?: Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<WikiPageSchema, C, E, void>>;
create<E extends boolean = false>(
groupId: string | number,
title: string,
content: string,
options?: { format?: 'markdown' | 'rdoc' | 'asciidoc' | 'org' }
& Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<WikiPageSchema, C, E, void>>;
}Code snippets at project level.
/**
* ProjectSnippets resource class
*/
class ProjectSnippets<C extends boolean = false> {
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(
projectId: string | number,
options?: PaginationRequestOptions<P> & Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<SnippetSchema[], C, E, P>>;
show<E extends boolean = false>(
projectId: string | number,
snippetId: number,
options?: Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<SnippetSchema, C, E, void>>;
create<E extends boolean = false>(
projectId: string | number,
title: string,
files: SnippetFile[],
options?: { description?: string; visibility?: 'private' | 'internal' | 'public' }
& Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<SnippetSchema, C, E, void>>;
edit<E extends boolean = false>(
projectId: string | number,
snippetId: number,
options?: { title?: string; files?: SnippetFile[]; description?: string }
& Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<SnippetSchema, C, E, void>>;
remove<E extends boolean = false>(
projectId: string | number,
snippetId: number,
options?: Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<void, C, E, void>>;
}Personal snippets.
/**
* Snippets resource class for personal snippets
*/
class Snippets<C extends boolean = false> {
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(
options?: PaginationRequestOptions<P> & Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<SnippetSchema[], C, E, P>>;
show<E extends boolean = false>(
snippetId: number,
options?: Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<SnippetSchema, C, E, void>>;
create<E extends boolean = false>(
title: string,
files: SnippetFile[],
options?: { description?: string; visibility?: 'private' | 'internal' | 'public' }
& Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<SnippetSchema, C, E, void>>;
}Manage project releases.
/**
* ProjectReleases resource class
*/
class ProjectReleases<C extends boolean = false> {
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(
projectId: string | number,
options?: { orderBy?: 'created_at' | 'released_at'; sort?: 'asc' | 'desc' }
& PaginationRequestOptions<P> & Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<ReleaseSchema[], C, E, P>>;
show<E extends boolean = false>(
projectId: string | number,
tagName: string,
options?: Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<ReleaseSchema, C, E, void>>;
create<E extends boolean = false>(
projectId: string | number,
tagName: string,
name: string,
description: string,
options?: { ref?: string; milestones?: string[]; assets?: ReleaseAssets }
& Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<ReleaseSchema, C, E, void>>;
edit<E extends boolean = false>(
projectId: string | number,
tagName: string,
options?: { name?: string; description?: string; milestones?: string[] }
& Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<ReleaseSchema, C, E, void>>;
remove<E extends boolean = false>(
projectId: string | number,
tagName: string,
options?: Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<void, C, E, void>>;
}Manage release asset links.
/**
* ReleaseLinks resource class
*/
class ReleaseLinks<C extends boolean = false> {
all<E extends boolean = false>(
projectId: string | number,
tagName: string,
options?: Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<ReleaseLinkSchema[], C, E, void>>;
create<E extends boolean = false>(
projectId: string | number,
tagName: string,
name: string,
url: string,
options?: { linkType?: 'other' | 'runbook' | 'package' | 'image' }
& Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<ReleaseLinkSchema, C, E, void>>;
remove<E extends boolean = false>(
projectId: string | number,
tagName: string,
linkId: number,
options?: Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<void, C, E, void>>;
}Track deployment history.
/**
* Deployments resource class
*/
class Deployments<C extends boolean = false> {
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(
projectId: string | number,
options?: { orderBy?: 'created_at' | 'updated_at'; sort?: 'asc' | 'desc'; environment?: string }
& PaginationRequestOptions<P> & Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<DeploymentSchema[], C, E, P>>;
show<E extends boolean = false>(
projectId: string | number,
deploymentId: number,
options?: Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<DeploymentSchema, C, E, void>>;
create<E extends boolean = false>(
projectId: string | number,
environment: string,
sha: string,
ref: string,
options?: { tag?: boolean; status?: string }
& Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<DeploymentSchema, C, E, void>>;
edit<E extends boolean = false>(
projectId: string | number,
deploymentId: number,
status: 'success' | 'failed' | 'canceled',
options?: Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<DeploymentSchema, C, E, void>>;
}Manage deployment environments.
/**
* Environments resource class
*/
class Environments<C extends boolean = false> {
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(
projectId: string | number,
options?: { states?: string; search?: string }
& PaginationRequestOptions<P> & Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<EnvironmentSchema[], C, E, P>>;
show<E extends boolean = false>(
projectId: string | number,
environmentId: number,
options?: Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<EnvironmentSchema, C, E, void>>;
create<E extends boolean = false>(
projectId: string | number,
name: string,
options?: { externalUrl?: string }
& Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<EnvironmentSchema, C, E, void>>;
edit<E extends boolean = false>(
projectId: string | number,
environmentId: number,
options?: { name?: string; externalUrl?: string }
& Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<EnvironmentSchema, C, E, void>>;
stop<E extends boolean = false>(
projectId: string | number,
environmentId: number,
options?: Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<EnvironmentSchema, C, E, void>>;
remove<E extends boolean = false>(
projectId: string | number,
environmentId: number,
options?: Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<void, C, E, void>>;
}Manage project member access.
/**
* ProjectMembers resource class
*/
class ProjectMembers<C extends boolean = false> {
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(
projectId: string | number,
options?: { query?: string }
& PaginationRequestOptions<P> & Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<MemberSchema[], C, E, P>>;
show<E extends boolean = false>(
projectId: string | number,
userId: number,
options?: Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<MemberSchema, C, E, void>>;
add<E extends boolean = false>(
projectId: string | number,
userId: number,
accessLevel: number,
options?: { expiresAt?: string }
& Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<MemberSchema, C, E, void>>;
edit<E extends boolean = false>(
projectId: string | number,
userId: number,
accessLevel: number,
options?: { expiresAt?: string }
& Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<MemberSchema, C, E, void>>;
remove<E extends boolean = false>(
projectId: string | number,
userId: number,
options?: Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<void, C, E, void>>;
}Manage group member access.
/**
* GroupMembers resource class
*/
class GroupMembers<C extends boolean = false> {
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(
groupId: string | number,
options?: { query?: string }
& PaginationRequestOptions<P> & Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<MemberSchema[], C, E, P>>;
add<E extends boolean = false>(
groupId: string | number,
userId: number,
accessLevel: number,
options?: { expiresAt?: string }
& Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<MemberSchema, C, E, void>>;
edit<E extends boolean = false>(
groupId: string | number,
userId: number,
accessLevel: number,
options?: { expiresAt?: string }
& Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<MemberSchema, C, E, void>>;
remove<E extends boolean = false>(
groupId: string | number,
userId: number,
options?: Sudo & ShowExpanded<E>
): Promise<GitlabAPIResponse<void, C, E, void>>;
}class ProjectBadges<C extends boolean = false> { }
class GroupBadges<C extends boolean = false> { }class ProjectCustomAttributes<C extends boolean = false> { }
class GroupCustomAttributes<C extends boolean = false> { }class ProjectAccessRequests<C extends boolean = false> { }
class GroupAccessRequests<C extends boolean = false> { }class ProjectAccessTokens<C extends boolean = false> { }
class GroupAccessTokens<C extends boolean = false> { }class ProjectInvitations<C extends boolean = false> { }
class GroupInvitations<C extends boolean = false> { }class ProjectDORA4Metrics<C extends boolean = false> { }
class GroupDORA4Metrics<C extends boolean = false> { }class GroupActivityAnalytics<C extends boolean = false> { }class ApplicationSettings<C extends boolean = false> { }
class ApplicationStatistics<C extends boolean = false> { }
class ApplicationAppearance<C extends boolean = false> { }
class ApplicationPlanLimits<C extends boolean = false> { }class Metadata<C extends boolean = false> { }
class License<C extends boolean = false> { }
class Migrations<C extends boolean = false> { }
class SidekiqMetrics<C extends boolean = false> { }
class SidekiqQueues<C extends boolean = false> { }class AuditEvents<C extends boolean = false> { }
class Events<C extends boolean = false> { }class Search<C extends boolean = false> { }
class SearchAdmin<C extends boolean = false> { }class TodoLists<C extends boolean = false> { }class NotificationSettings<C extends boolean = false> { }class DockerfileTemplates<C extends boolean = false> { }
class GitignoreTemplates<C extends boolean = false> { }
class GitLabCIYMLTemplates<C extends boolean = false> { }
class LicenseTemplates<C extends boolean = false> { }
class ProjectTemplates<C extends boolean = false> { }class Topics<C extends boolean = false> { }
class Namespaces<C extends boolean = false> { }
class Keys<C extends boolean = false> { }
class DeployKeys<C extends boolean = false> { }
class DeployTokens<C extends boolean = false> { }
class BroadcastMessages<C extends boolean = false> { }
class Markdown<C extends boolean = false> { }
class Avatar<C extends boolean = false> { }
class Lint<C extends boolean = false> { }
class Suggestions<C extends boolean = false> { }class Epics<C extends boolean = false> { }
class EpicAwardEmojis<C extends boolean = false> { }
class EpicDiscussions<C extends boolean = false> { }
class EpicIssues<C extends boolean = false> { }
class EpicLabelEvents<C extends boolean = false> { }
class EpicLinks<C extends boolean = false> { }
class EpicNotes<C extends boolean = false> { }
class EpicStateEvents<C extends boolean = false> { }
class LinkedEpics<C extends boolean = false> { }class ProjectIterations<C extends boolean = false> { }
class GroupIterations<C extends boolean = false> { }class ProjectVulnerabilities<C extends boolean = false> { }
class ErrorTrackingSettings<C extends boolean = false> { }
class ErrorTrackingClientKeys<C extends boolean = false> { }
class ExternalStatusChecks<C extends boolean = false> { }class GeoNodes<C extends boolean = false> { }
class GeoSites<C extends boolean = false> { }
class GroupSAMLIdentities<C extends boolean = false> { }
class GroupSAMLLinks<C extends boolean = false> { }
class GroupSCIMIdentities<C extends boolean = false> { }
class GroupLDAPLinks<C extends boolean = false> { }
class GroupServiceAccounts<C extends boolean = false> { }
class ServiceAccounts<C extends boolean = false> { }
class GroupMemberRoles<C extends boolean = false> { }The @gitbeaker/rest package provides over 195 resource classes covering all aspects of the GitLab API. Refer to the main documentation sections for detailed information on the most commonly used resources: