GitLab CI/CD namespaces API

Operations about namespaces

Operations 8

PUT /api/v4/namespaces/{id} Update a namespace #
GET /api/v4/namespaces/{id} Get namespace by ID #
GET /api/v4/namespaces/{id}/gitlab_subscription #
POST /api/v4/namespaces/{id}/storage/limit_exclusion Creates a storage limit exclusion for a Namespace #
DELETE /api/v4/namespaces/{id}/storage/limit_exclusion Removes a storage limit exclusion for a Namespace #
GET /api/v4/namespaces/storage/limit_exclusions Retrieve all limit exclusions #
GET /api/v4/namespaces List namespaces #
GET /api/v4/namespaces/{id}/exists Get existence of a namespace #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/gitlab-ci-namespaces-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

gitlab-ci-namespaces-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: GitLab access_requests Namespaces API
  version: v4
  description: Operations related to access requests
servers:
- url: https://gitlab.com
tags:
- name: namespaces
  description: Operations about namespaces
paths:
  /api/v4/namespaces/{id}:
    put:
      summary: Update a namespace
      description: Deprecated in 17.8
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: Update a namespace
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_Namespace'
      tags:
      - namespaces
      operationId: putApiV4NamespacesId
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/putApiV4NamespacesId'
        required: true
    get:
      summary: Get namespace by ID
      description: Get a namespace by ID
      parameters:
      - in: path
        name: id
        description: ID or URL-encoded path of the namespace
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Get namespace by ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_Namespace'
        '401':
          description: Unauthorized
        '404':
          description: Not found
      tags:
      - namespaces
      operationId: getApiV4NamespacesId
  /api/v4/namespaces/{id}/gitlab_subscription:
    get:
      description: Returns the subscription for the namespace
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: Returns the subscription for the namespace
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_GitlabSubscription'
      tags:
      - namespaces
      operationId: getApiV4NamespacesIdGitlabSubscription
  /api/v4/namespaces/{id}/storage/limit_exclusion:
    post:
      summary: Creates a storage limit exclusion for a Namespace
      description: Creates a Namespaces::Storage::LimitExclusion
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '201':
          description: Creates a storage limit exclusion for a Namespace
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_Namespaces_Storage_LimitExclusion'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
      tags:
      - namespaces
      operationId: postApiV4NamespacesIdStorageLimitExclusion
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/postApiV4NamespacesIdStorageLimitExclusion'
        required: true
    delete:
      summary: Removes a storage limit exclusion for a Namespace
      description: Removes a Namespaces::Storage::LimitExclusion
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '204':
          description: Removes a storage limit exclusion for a Namespace
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '422':
          description: Unprocessable entity
      tags:
      - namespaces
      operationId: deleteApiV4NamespacesIdStorageLimitExclusion
  /api/v4/namespaces/storage/limit_exclusions:
    get:
      summary: Retrieve all limit exclusions
      description: Gets all records for namespaces that have been excluded
      parameters:
      - in: query
        name: page
        description: Current page number
        required: false
        example: 1
        schema:
          type: integer
          format: int32
          default: 1
      - in: query
        name: per_page
        description: Number of items per page
        required: false
        example: 20
        schema:
          type: integer
          format: int32
          default: 20
      responses:
        '200':
          description: Retrieve all limit exclusions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_Namespaces_Storage_LimitExclusion'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      tags:
      - namespaces
      operationId: getApiV4NamespacesStorageLimitExclusions
  /api/v4/namespaces:
    get:
      summary: List namespaces
      description: Get a list of the namespaces of the authenticated user. If the user is an administrator, a list of all namespaces in the GitLab instance is shown.
      parameters:
      - in: query
        name: search
        description: Returns a list of namespaces the user is authorized to view based on the search criteria
        required: false
        schema:
          type: string
      - in: query
        name: owned_only
        description: In GitLab 14.2 and later, returns a list of owned namespaces only
        required: false
        schema:
          type: boolean
      - in: query
        name: top_level_only
        description: Only include top level namespaces
        required: false
        schema:
          type: boolean
          default: false
      - in: query
        name: full_path_search
        description: If `true`, the `search` parameter is matched against the full path of the namespaces
        required: false
        schema:
          type: boolean
          default: false
      - in: query
        name: page
        description: Current page number
        required: false
        example: 1
        schema:
          type: integer
          format: int32
          default: 1
      - in: query
        name: per_page
        description: Number of items per page
        required: false
        example: 20
        schema:
          type: integer
          format: int32
          default: 20
      - in: query
        name: requested_hosted_plan
        description: Name of the hosted plan requested by the customer
        required: false
        schema:
          type: string
      responses:
        '200':
          description: List namespaces
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/API_Entities_Namespace'
        '401':
          description: Unauthorized
      tags:
      - namespaces
      operationId: getApiV4Namespaces
  /api/v4/namespaces/{id}/exists:
    get:
      summary: Get existence of a namespace
      description: Get existence of a namespace by path. Suggests a new namespace path that does not already exist.
      parameters:
      - in: path
        name: id
        description: Namespace’s path
        required: true
        schema:
          type: string
      - in: query
        name: parent_id
        description: The ID of the parent namespace. If no ID is specified, only top-level namespaces are considered.
        required: false
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: Get existence of a namespace
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_NamespaceExistence'
        '401':
          description: Unauthorized
      tags:
      - namespaces
      operationId: getApiV4NamespacesIdExists
components:
  schemas:
    putApiV4NamespacesId:
      type: object
      properties:
        shared_runners_minutes_limit:
          type: integer
          format: int32
          description: Compute minutes quota for this namespace
        extra_shared_runners_minutes_limit:
          type: integer
          format: int32
          description: Extra compute minutes for this namespace
        additional_purchased_storage_size:
          type: integer
          format: int32
          description: Additional storage size for this namespace
        additional_purchased_storage_ends_on:
          type: string
          format: date
          description: End of subscription of the additional purchased storage
        gitlab_subscription_attributes:
          type: object
          description: Object that contains information on the GitLab subscription
          properties:
            start_date:
              type: string
              format: date
              description: Start date of subscription
            seats:
              type: integer
              format: int32
              description: Number of seats in subscription
            max_seats_used:
              type: integer
              format: int32
              description: Highest number of active users in the last month
            plan_code:
              type: string
              description: Subscription tier code
            end_date:
              type: string
              format: date
              description: End date of subscription
            auto_renew:
              type: boolean
              description: Whether subscription will auto renew on end date
            trial:
              type: boolean
              description: Whether the subscription is a trial
            trial_ends_on:
              type: string
              format: date
              description: End date of trial
            trial_starts_on:
              type: string
              format: date
              description: Start date of trial
            trial_extension_type:
              type: integer
              format: int32
              description: Whether subscription is an extended or reactivated trial
      description: Update a namespace
    API_Entities_Namespaces_Storage_LimitExclusion:
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 1
        namespace_id:
          type: integer
          format: int32
          example: 123
        namespace_name:
          type: string
          example: GitLab
        reason:
          type: string
          example: a reason
      required:
      - id
      - namespace_id
      - namespace_name
      - reason
      description: API_Entities_Namespaces_Storage_LimitExclusion model
    API_Entities_Namespace:
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 2
        name:
          type: string
          example: project
        path:
          type: string
          example: my_project
        kind:
          type: string
          example: project
        full_path:
          type: string
          example: group/my_project
        parent_id:
          type: integer
          format: int32
          example: 1
        avatar_url:
          type: string
          example: https://example.com/avatar/12345
        web_url:
          type: string
          example: https://example.com/group/my_project
        members_count_with_descendants:
          type: integer
          format: int32
          example: 5
        root_repository_size:
          type: integer
          format: int32
          example: 123
        projects_count:
          type: integer
          format: int32
          example: 123
        shared_runners_minutes_limit:
          type: integer
          format: int32
          example: 133
        extra_shared_runners_minutes_limit:
          type: integer
          format: int32
          example: 133
        additional_purchased_storage_size:
          type: integer
          format: int32
          example: 1000
        additional_purchased_storage_ends_on:
          type: string
          format: date
          example: '2022-06-18'
        billable_members_count:
          type: integer
          format: int32
          example: 2
        seats_in_use:
          type: integer
          format: int32
          example: 5
        max_seats_used:
          type: integer
          format: int32
          example: 100
        max_seats_used_changed_at:
          type: string
          format: date
          example: '2022-06-18'
        end_date:
          type: string
          format: date
          example: '2022-06-18'
        plan:
          type: string
          example: default
        trial_ends_on:
          type: string
          format: date
          example: '2022-06-18'
        trial:
          type: boolean
      required:
      - id
      - name
      - path
      - kind
      - full_path
      - parent_id
      - avatar_url
      - web_url
      - billable_members_count
      description: API_Entities_Namespace model
    API_Entities_NamespaceExistence:
      type: object
      properties:
        exists:
          type: boolean
        suggests:
          type: array
          items:
            type: string
          example:
          - my-group1
      required:
      - exists
      - suggests
      description: API_Entities_NamespaceExistence model
    API_Entities_GitlabSubscription:
      type: object
      properties:
        plan:
          type: object
          properties:
            code:
              type: string
            name:
              type: string
            trial:
              type: string
            auto_renew:
              type: string
            upgradable:
              type: string
            exclude_guests:
              type: string
          required:
          - code
          - name
          - trial
          - auto_renew
          - upgradable
          - exclude_guests
        usage:
          type: object
          properties:
            seats_in_subscription:
              type: string
            seats_in_use:
              type: string
            max_seats_used:
              type: string
            seats_owed:
              type: string
          required:
          - seats_in_subscription
          - seats_in_use
          - max_seats_used
          - seats_owed
        billing:
          type: object
          properties:
            subscription_start_date:
              type: string
            subscription_end_date:
              type: string
            trial_ends_on:
              type: string
          required:
          - subscription_start_date
          - subscription_end_date
          - trial_ends_on
      required:
      - plan
      - usage
      - billing
      description: API_Entities_GitlabSubscription model
    postApiV4NamespacesIdStorageLimitExclusion:
      type: object
      properties:
        reason:
          type: string
          description: The reason the Namespace is being excluded
      required:
      - reason
      description: Creates a storage limit exclusion for a Namespace
  securitySchemes:
    access_token_header:
      type: apiKey
      name: PRIVATE-TOKEN
      in: header
    access_token_query:
      type: apiKey
      name: private_token
      in: query