Snyk Projects API

The Projects API from Snyk — 2 operation(s) for projects.

OpenAPI Specification

snyk-projects-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Snyk AccessRequests Projects API
  version: REST
servers:
- description: Snyk REST API
  url: https://api.snyk.io/rest
security:
- APIToken: []
- BearerAuth: []
tags:
- name: Projects
paths:
  /orgs/{org_id}/projects:
    get:
      description: 'List all Projects for an Org.


        #### Required permissions


        - `View Projects (org.project.read)`'
      operationId: listOrgProjects
      parameters:
      - description: The ID of the org that the projects belong to.
        in: path
        name: org_id
        required: true
        schema:
          format: uuid
          type: string
      - description: Return projects that belong to the provided targets
        in: query
        name: target_id
        schema:
          items:
            format: uuid
            type: string
          type: array
      - description: Return projects that match the provided target reference
        in: query
        name: target_reference
        schema:
          type: string
      - description: Return projects that match the provided target file
        in: query
        name: target_file
        schema:
          type: string
      - description: Return projects that match the provided target runtime
        in: query
        name: target_runtime
        schema:
          type: string
      - description: The collection count.
        in: query
        name: meta_count
        schema:
          enum:
          - only
          type: string
      - description: Return projects that match the provided IDs.
        explode: false
        in: query
        name: ids
        schema:
          items:
            format: uuid
            type: string
          type: array
        style: form
      - description: Return projects that match the provided names.
        explode: false
        in: query
        name: names
        schema:
          items:
            type: string
          type: array
        style: form
      - description: Return projects with names starting with the specified prefix.
        explode: false
        in: query
        name: names_start_with
        schema:
          items:
            type: string
          type: array
        style: form
      - description: Return projects that match the provided origins.
        explode: false
        in: query
        name: origins
        schema:
          items:
            type: string
          type: array
        style: form
      - description: Return projects that match the provided types.
        explode: false
        in: query
        name: types
        schema:
          items:
            type: string
          type: array
        style: form
      - description: Expand relationships.
        explode: false
        in: query
        name: expand
        schema:
          items:
            enum:
            - target
            type: string
          type: array
        style: form
      - description: Include a summary count for the issues found in the most recent scan of this project
        in: query
        name: meta.latest_issue_counts
        schema:
          type: boolean
      - description: Include the total number of dependencies found in the most recent scan of this project
        in: query
        name: meta.latest_dependency_total
        schema:
          type: boolean
      - description: Filter projects uploaded and monitored before this date (encoded value)
        example: '2021-05-29T09:50:54.014Z'
        in: query
        name: cli_monitored_before
        schema:
          format: date-time
          type: string
      - description: Filter projects uploaded and monitored after this date (encoded value)
        example: '2021-05-29T09:50:54.014Z'
        in: query
        name: cli_monitored_after
        schema:
          format: date-time
          type: string
      - description: Return projects that match the provided importing user public ids.
        explode: false
        in: query
        name: importing_user_public_id
        schema:
          items:
            type: string
          type: array
        style: form
      - description: Return projects that match all the provided tags
        example:
        - key1:value1
        - key2:value2
        explode: false
        in: query
        name: tags
        schema:
          items:
            pattern: ^[a-zA-Z0-9_-]+:[:/?#@&+=%a-zA-Z0-9_.~-]+$
            type: string
          type: array
        style: form
      - description: Return projects that match all the provided business_criticality value
        explode: false
        in: query
        name: business_criticality
        schema:
          items:
            enum:
            - critical
            - high
            - medium
            - low
            type: string
          type: array
        style: form
      - description: Return projects that match all the provided environment values
        explode: false
        in: query
        name: environment
        schema:
          items:
            enum:
            - frontend
            - backend
            - internal
            - external
            - mobile
            - saas
            - onprem
            - hosted
            - distributed
            type: string
          type: array
        style: form
      - description: Return projects that match all the provided lifecycle values
        explode: false
        in: query
        name: lifecycle
        schema:
          items:
            enum:
            - production
            - development
            - sandbox
            type: string
          type: array
        style: form
      - $ref: '#/components/parameters/Version'
      - $ref: '#/components/parameters/StartingAfter'
      - $ref: '#/components/parameters/EndingBefore'
      - $ref: '#/components/parameters/Limit'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                additionalProperties: false
                properties:
                  data:
                    items:
                      additionalProperties: false
                      properties:
                        attributes:
                          $ref: '#/components/schemas/ProjectAttributes'
                        id:
                          description: Resource ID.
                          format: uuid
                          type: string
                        meta:
                          additionalProperties: false
                          properties:
                            cli_monitored_at:
                              description: The date that the project was last uploaded and monitored using cli.
                              example: '2021-05-29T09:50:54.014Z'
                              format: date-time
                              nullable: true
                              type: string
                            latest_dependency_total:
                              $ref: '#/components/schemas/LatestDependencyTotal'
                            latest_issue_counts:
                              $ref: '#/components/schemas/LatestIssueCounts'
                          type: object
                        relationships:
                          $ref: '#/components/schemas/ProjectRelationships'
                        type:
                          description: The Resource type.
                          example: project
                          type: string
                      required:
                      - id
                      - type
                      - attributes
                      type: object
                    type: array
                  jsonapi:
                    $ref: '#/components/schemas/JsonApi'
                  links:
                    $ref: '#/components/schemas/Links'
                  meta:
                    properties:
                      count:
                        minimum: 0
                        type: number
                    type: object
                required:
                - jsonapi
                - links
                type: object
          description: A list of projects is returned for the targeted org
          headers:
            deprecation:
              $ref: '#/components/headers/DeprecationHeader'
            snyk-request-id:
              $ref: '#/components/headers/RequestIdResponseHeader'
            snyk-version-lifecycle-stage:
              $ref: '#/components/headers/VersionStageResponseHeader'
            snyk-version-requested:
              $ref: '#/components/headers/VersionRequestedResponseHeader'
            snyk-version-served:
              $ref: '#/components/headers/VersionServedResponseHeader'
            sunset:
              $ref: '#/components/headers/SunsetHeader'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
      summary: List all Projects for an Org with the given Org ID.
      tags:
      - Projects
      x-snyk-api-lifecycle: released
      x-snyk-api-releases:
      - 2021-06-04~beta
      - 2022-08-12~experimental
      - 2022-12-21~experimental
      - '2023-02-15'
      - '2023-08-28'
      - '2023-09-11'
      - '2023-11-06'
      - '2024-05-31'
      x-snyk-api-resource: projects
      x-snyk-api-stability: ga
      x-snyk-api-version: '2024-05-31'
      x-stability-level: stable
  /orgs/{org_id}/projects/{project_id}:
    delete:
      description: 'Delete one project in the organization by project ID.


        #### Required permissions


        - `View Organization (org.read)`


        - `View Projects (org.project.read)`


        - `Remove Projects (org.project.delete)`'
      operationId: deleteOrgProject
      parameters:
      - description: The ID of the org to which the project belongs to.
        in: path
        name: org_id
        required: true
        schema:
          format: uuid
          type: string
      - description: The ID of the project.
        in: path
        name: project_id
        required: true
        schema:
          format: uuid
          type: string
      - $ref: '#/components/parameters/Version'
      responses:
        '204':
          description: The project has been deleted
          headers:
            deprecation:
              $ref: '#/components/headers/DeprecationHeader'
            snyk-request-id:
              $ref: '#/components/headers/RequestIdResponseHeader'
            snyk-version-lifecycle-stage:
              $ref: '#/components/headers/VersionStageResponseHeader'
            snyk-version-requested:
              $ref: '#/components/headers/VersionRequestedResponseHeader'
            snyk-version-served:
              $ref: '#/components/headers/VersionServedResponseHeader'
            sunset:
              $ref: '#/components/headers/SunsetHeader'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
      summary: Delete project by project ID.
      tags:
      - Projects
      x-snyk-api-lifecycle: released
      x-snyk-api-releases:
      - '2023-11-06'
      - '2024-05-31'
      x-snyk-api-resource: projects
      x-snyk-api-stability: ga
      x-snyk-api-version: '2024-05-31'
      x-stability-level: stable
    get:
      description: 'Get one project of the organization by project ID.


        #### Required permissions


        - `View Projects (org.project.read)`'
      operationId: getOrgProject
      parameters:
      - description: The ID of the org to which the project belongs to.
        in: path
        name: org_id
        required: true
        schema:
          format: uuid
          type: string
      - description: The ID of the project.
        in: path
        name: project_id
        required: true
        schema:
          format: uuid
          type: string
      - description: Expand relationships.
        explode: false
        in: query
        name: expand
        schema:
          items:
            enum:
            - target
            type: string
          type: array
        style: form
      - description: Include a summary count for the issues found in the most recent scan of this project
        in: query
        name: meta.latest_issue_counts
        schema:
          type: boolean
      - description: Include the total number of dependencies found in the most recent scan of this project
        in: query
        name: meta.latest_dependency_total
        schema:
          type: boolean
      - $ref: '#/components/parameters/Version'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                additionalProperties: false
                properties:
                  data:
                    additionalProperties: false
                    properties:
                      attributes:
                        $ref: '#/components/schemas/ProjectAttributes'
                      id:
                        description: The Resource ID.
                        format: uuid
                        type: string
                      meta:
                        additionalProperties: false
                        properties:
                          cli_monitored_at:
                            description: The date that the project was last uploaded and monitored using cli.
                            example: '2021-05-29T09:50:54.014Z'
                            format: date-time
                            nullable: true
                            type: string
                          latest_dependency_total:
                            $ref: '#/components/schemas/LatestDependencyTotal'
                          latest_issue_counts:
                            $ref: '#/components/schemas/LatestIssueCounts'
                        type: object
                      relationships:
                        $ref: '#/components/schemas/ProjectRelationships'
                      type:
                        description: The Resource type.
                        example: project
                        type: string
                    required:
                    - id
                    - type
                    - attributes
                    type: object
                  jsonapi:
                    $ref: '#/components/schemas/JsonApi'
                  links:
                    $ref: '#/components/schemas/Links'
                required:
                - jsonapi
                - data
                - links
                type: object
          description: A project is returned for the targeted org
          headers:
            deprecation:
              $ref: '#/components/headers/DeprecationHeader'
            snyk-request-id:
              $ref: '#/components/headers/RequestIdResponseHeader'
            snyk-version-lifecycle-stage:
              $ref: '#/components/headers/VersionStageResponseHeader'
            snyk-version-requested:
              $ref: '#/components/headers/VersionRequestedResponseHeader'
            snyk-version-served:
              $ref: '#/components/headers/VersionServedResponseHeader'
            sunset:
              $ref: '#/components/headers/SunsetHeader'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
      summary: Get project by project ID.
      tags:
      - Projects
      x-snyk-api-lifecycle: released
      x-snyk-api-releases:
      - 2022-02-01~experimental
      - 2022-08-12~experimental
      - 2022-12-21~experimental
      - '2023-02-15'
      - '2023-08-28'
      - '2023-09-11'
      - '2023-11-06'
      - '2024-05-31'
      x-snyk-api-resource: projects
      x-snyk-api-stability: ga
      x-snyk-api-version: '2024-05-31'
      x-stability-level: stable
    patch:
      description: 'Updates one project of the organization by project ID.


        #### Required permissions


        - `View Organization (org.read)`


        - `View Projects (org.project.read)`


        - `Edit Projects (org.project.edit)`'
      operationId: updateOrgProject
      parameters:
      - $ref: '#/components/parameters/Version'
      - description: The ID of the Org the project belongs to.
        in: path
        name: org_id
        required: true
        schema:
          format: uuid
          type: string
      - description: The ID of the project to patch.
        in: path
        name: project_id
        required: true
        schema:
          format: uuid
          type: string
      - description: Expand relationships.
        explode: false
        in: query
        name: expand
        schema:
          items:
            enum:
            - target
            type: string
          type: array
        style: form
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/PatchProjectRequest'
        description: The project attributes to be updated.
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                additionalProperties: false
                properties:
                  data:
                    additionalProperties: false
                    properties:
                      attributes:
                        $ref: '#/components/schemas/ProjectAttributes'
                      id:
                        description: The Resource ID.
                        example: 331ede0a-de94-456f-b788-166caeca58bf
                        format: uuid
                        type: string
                      links:
                        $ref: '#/components/schemas/Links'
                      meta:
                        additionalProperties: false
                        properties:
                          cli_monitored_at:
                            description: The date that the project was last uploaded and monitored using cli.
                            example: '2021-05-29T09:50:54.014Z'
                            format: date-time
                            nullable: true
                            type: string
                        type: object
                      relationships:
                        $ref: '#/components/schemas/ProjectRelationships'
                      type:
                        description: The Resource type.
                        example: project
                        type: string
                    required:
                    - type
                    - id
                    - attributes
                    type: object
                  jsonapi:
                    $ref: '#/components/schemas/JsonApi'
                  links:
                    $ref: '#/components/schemas/Links'
                required:
                - jsonapi
                - data
                - links
                type: object
          description: A project is updated for the targeted org
          headers:
            deprecation:
              $ref: '#/components/headers/DeprecationHeader'
            snyk-request-id:
              $ref: '#/components/headers/RequestIdResponseHeader'
            snyk-version-lifecycle-stage:
              $ref: '#/components/headers/VersionStageResponseHeader'
            snyk-version-requested:
              $ref: '#/components/headers/VersionRequestedResponseHeader'
            snyk-version-served:
              $ref: '#/components/headers/VersionServedResponseHeader'
            sunset:
              $ref: '#/components/headers/SunsetHeader'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
      summary: Updates project by project ID.
      tags:
      - Projects
      x-snyk-api-lifecycle: released
      x-snyk-api-releases:
      - 2022-12-21~experimental
      - '2023-02-15'
      - '2023-08-28'
      - '2023-09-11'
      - '2023-11-06'
      - '2024-05-31'
      x-snyk-api-resource: projects
      x-snyk-api-stability: ga
      x-snyk-api-version: '2024-05-31'
      x-stability-level: stable
components:
  parameters:
    EndingBefore:
      description: Return the page of results immediately before this cursor
      example: v1.eyJpZCI6IjExMDAifQo=
      in: query
      name: ending_before
      schema:
        type: string
    StartingAfter:
      description: Return the page of results immediately after this cursor
      example: v1.eyJpZCI6IjEwMDAifQo=
      in: query
      name: starting_after
      schema:
        type: string
    Version:
      description: The requested version of the endpoint to process the request
      example: '2026-03-25'
      in: query
      name: version
      required: true
      schema:
        $ref: '#/components/schemas/QueryVersion'
    Limit:
      description: Number of results to return per page
      example: 10
      in: query
      name: limit
      schema:
        default: 10
        format: int32
        maximum: 100
        minimum: 10
        multipleOf: 10
        type: integer
  schemas:
    LatestDependencyTotal:
      additionalProperties: false
      properties:
        total:
          type: number
        updated_at:
          format: date-time
          type: string
      type: object
    ActualVersion:
      description: Resolved API version
      example: '2026-03-25'
      pattern: ^((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?)$
      type: string
    RecurringTestsSettings:
      additionalProperties: false
      description: Settings which describe how recurring tests are run for a project.
      properties:
        frequency:
          description: Test frequency of a project. Also controls when automated PRs may be created.
          enum:
          - daily
          - weekly
          - never
          example: daily
          type: string
      type: object
    JsonApi:
      additionalProperties: false
      example:
        version: '1.0'
      properties:
        version:
          description: Version of the JSON API specification this server supports.
          example: '1.0'
          pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)$
          type: string
      required:
      - version
      type: object
    Meta:
      additionalProperties: true
      description: Free-form object that may contain non-standard information.
      example:
        key1: value1
        key2:
          sub_key: sub_value
        key3:
        - array_value1
        - array_value2
      type: object
    Relationship:
      example:
        data:
          id: 4a72d1db-b465-4764-99e1-ecedad03b06a
          type: resource
        links:
          related:
            href: https://example.com/api/resource/4a72d1db-b465-4764-99e1-ecedad03b06a
      properties:
        data:
          additionalProperties: false
          properties:
            id:
              example: 4a72d1db-b465-4764-99e1-ecedad03b06a
              format: uuid
              type: string
            type:
              description: Type of the related resource
              example: resource
              pattern: ^[a-z][a-z0-9]*(_[a-z][a-z0-9]*)*$
              type: string
          required:
          - type
          - id
          type: object
        links:
          $ref: '#/components/schemas/RelatedLink'
        meta:
          $ref: '#/components/schemas/Meta'
      required:
      - data
      - links
      type: object
    ProjectRelationships:
      additionalProperties: false
      properties:
        importer:
          $ref: '#/components/schemas/Relationship'
        organization:
          $ref: '#/components/schemas/Relationship'
        owner:
          $ref: '#/components/schemas/Relationship'
        target:
          oneOf:
          - $ref: '#/components/schemas/Relationship'
          - $ref: '#/components/schemas/ProjectRelationshipsTarget'
      required:
      - target
      - organization
      type: object
    ManualRemediationPRsSettings20240531:
      additionalProperties: false
      description: Manually raise pull requests to fix new and existing vulnerabilities. If not specified, settings will be inherited from the Organization's integration.
      properties:
        is_patch_remediation_enabled:
          description: Include vulnerability patches in manual pull requests.
          example: true
          type: boolean
      type: object
    QueryVersion:
      description: Requested API version
      example: '2026-03-25'
      pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
      type: string
    ProjectSettings20240531:
      additionalProperties: false
      properties:
        auto_dependency_upgrade:
          $ref: '#/components/schemas/AutoDependencyUpgradeSettings20240531'
        auto_remediation_prs:
          $ref: '#/components/schemas/AutoRemediationPRsSettings20240531'
        manual_remediation_prs:
          $ref: '#/components/schemas/ManualRemediationPRsSettings20240531'
        pull_request_assignment:
          $ref: '#/components/schemas/PullRequestAssignmentSettings20240531'
        pull_requests:
          $ref: '#/components/schemas/PullRequestsSettings20240531'
        recurring_tests:
          $ref: '#/components/schemas/RecurringTestsSettings'
      required:
      - recurring_tests
      - pull_requests
      type: object
    AutoDependencyUpgradeSettings20240531:
      additionalProperties: false
      description: Automatically create pull requests on recurring tests for dependencies as upgrades become available. If not specified, settings will be inherited from the Organization's integration.
      properties:
        ignored_dependencies:
          description: Dependencies which should NOT be included in an automatic upgrade operation.
          example:
          - typescript
          items:
            type: string
          type: array
        is_enabled:
          description: Automatically raise pull requests to update out-of-date dependencies.
          example: true
          type: boolean
        is_inherited:
          description: Apply the auto dependency integration settings of the Organization to this project.
          example: true
          type: boolean
        is_major_upgrade_enabled:
          description: Include major version in dependency upgrade recommendation.
          example: true
          type: boolean
        limit:
          description: Limit of dependency upgrade PRs which can be opened simultaneously. When the limit is reached, no new upgrade PRs are created. If specified, must be between 1 and 10.
          example: 10
          maximum: 10
          minimum: 1
          type: number
        minimum_age:
          description: Minimum dependency maturity period in days. If specified, must be between 1 and 365.
          example: 365
          type: number
      type: object
    PatchProjectRequest:
      additionalProperties: false
      properties:
        data:
          additionalProperties: false
          properties:
            attributes:
              properties:
                business_criticality:
                  example:
                  - medium
                  items:
                    enum:
                    - critical
                    - high
                    - medium
                    - low
                    type: string
                  type: array
                environment:
                  example:
                  - external
                  - hosted
                  items:
                    enum:
                    - frontend
                    - backend
                    - internal
                    - external
                    - mobile
                    - saas
                    - onprem
                    - hosted
                    - distributed
                    type: string
                  type: array
                lifecycle:
                  example:
                  - production
                  items:
                    enum:
                    - production
                    - development
                    - sandbox
                    type: string
                  type: array
                tags:
                  example:
                  - key: tag-key
                    value: tag-value
                  items:
                    properties:
                      key:
                        example: tag-key
                        type: string
                      value:
                        example: tag-value
                        type: string
                    type: object
                  type: array
                test_frequency:
                  description: Test frequency of a project. Also controls when automated PRs may be created.
                  enum:
                  - daily
                  - weekly
                  - never
                  example: daily
                  type: string
              type: object
            id:
              description: The Resource ID.
              example: 331ede0a-de94-456f-b788-166caeca58bf
              format: uuid
              type: string
            relationships:
              properties:
                owner:
                  properties:
                    data:
                      properties:
                        id:
                          description: The public ID of the user that owns the project
                          example: 331ede0a-de94-456f-b788-166caeca58bf
                          format: uuid
                          nullable: true
                          type: string
                        type:
                          enum:
                          - user
                      required:
                      - type
                      - id
                      type: object
                  required:
                  - data
                  type: object
              type: object
            type:
              description: The Resource type.
              enum:
              - project
              type: string
          required:
          - type
          - id
          - attributes
          - relationships
          type: object
      required:
      - data
      type: object
    ErrorDocument:
      additionalProperties: false
      example:
        errors:
        - detail: Permission denied for this resource
          status: '403'
        jsonapi:
          version: '1.0'
      properties:
        errors:
          example:
          - detail: Permission denied for this resource
            status: '403'
          items:
            additionalProperties: false
            example:
              detail: Not Found
              status: '404'
            properties:
              code:
                description: An application-specific error code, expressed as a string value.
                example: entity-not-found
                type: string
              detail:
                description: A human-readable explanation specific to this occurrence of the problem.
                example: 'The request was missing these required fields: ...'
                type: string
              id:
                description: A unique identifier for this particular occurrence of the problem.
                example: f16c31b5-6129-4571-add8-d589da9be524
                format: uuid
                type: string
              links:
                additionalProperties: false
                description: A link that leads to further details about this particular occurrance of the problem.
                example:
                  about: https://example.com/about_this_error
                properties:
                  about:
                    example: https://example.com/api/resource
                    oneOf:


# --- truncated at 32 KB (50 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/snyk/refs/heads/main/openapi/snyk-projects-api-openapi.yml