Components

Create component

Changed on

Create a Component for a Project. Requires admin access to the Project, and the Project must have Components enabled.

post/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/components

Request

  • Base URL
    https://api.qlty.sh
  • Auth
    HTTP bearer

Path parameters

ownerKeyOrIdstring required

Repository owner name (login) or workspace ID

Example:acme-corp
projectKeyOrIdstring required

Repository name or project ID

Example:my-repo

Request body

namestring required
descriptionstring nullable
pathGlobsstring[] required

Glob patterns matching the Component's file paths, one glob per array element. * matches any characters, including /.

Example request

{
  "name": "Backend API",
  "description": "Core backend API services",
  "pathGlobs": [
    "src/api/*"
  ]
}

Response

The created component

idstring required
namestring required
descriptionstring nullable required
pathGlobsstring[] required

Example response

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Backend API",
  "description": "Core backend API services",
  "pathGlobs": [
    "src/api/*"
  ]
}

Changes

    • breaking

      the request property's minItems was increased to 1

    • breaking

      the request property type changed from string to array

    • breaking

      the response's property type changed from string to array for status

    • info

      the request property's minLength was decreased from 1 to 0

    • info

      endpoint added