Endor Labs Namespaces API

Tenants and child namespaces a token may access.

OpenAPI Specification

endor-labs-namespaces-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Endor Labs REST Authentication Namespaces API
  description: The Endor Labs REST API is a uniform resource API over namespaces. Every resource kind (Project, PackageVersion, DependencyMetadata, Finding, Policy, ScanResult, Metric, and more) is addressed under /v1/namespaces/{namespace}/{resource}, with consistent list (GET), get (GET /{uuid}), create (POST), update (PATCH /{uuid}), and delete (DELETE /{uuid}) semantics. List endpoints share a common set of list_parameters (filter, mask, page_size, page_token, sort, count, group). Authentication is a bearer access token obtained by exchanging an API key and secret at POST /v1/auth/api-key.
  termsOfService: https://www.endorlabs.com/terms
  contact:
    name: Endor Labs Support
    url: https://docs.endorlabs.com/rest-api/
  version: '1.0'
servers:
- url: https://api.endorlabs.com/v1
security:
- bearerAuth: []
tags:
- name: Namespaces
  description: Tenants and child namespaces a token may access.
paths:
  /namespaces/{namespace}/namespaces:
    get:
      operationId: listNamespaces
      tags:
      - Namespaces
      summary: List child namespaces under a namespace.
      parameters:
      - $ref: '#/components/parameters/Namespace'
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageToken'
      responses:
        '200':
          description: A list of Namespace resources.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NamespaceList'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    ListResponse:
      type: object
      properties:
        next_page_token:
          type: string
        count:
          type: integer
          format: int32
    TenantMeta:
      type: object
      properties:
        namespace:
          type: string
          description: The namespace the resource belongs to.
    ResourceMeta:
      type: object
      properties:
        name:
          type: string
        kind:
          type: string
        description:
          type: string
        version:
          type: string
        create_time:
          type: string
          format: date-time
        update_time:
          type: string
          format: date-time
    Namespace:
      type: object
      properties:
        uuid:
          type: string
        meta:
          $ref: '#/components/schemas/ResourceMeta'
        tenant_meta:
          $ref: '#/components/schemas/TenantMeta'
    NamespaceList:
      type: object
      properties:
        list:
          type: object
          properties:
            objects:
              type: array
              items:
                $ref: '#/components/schemas/Namespace'
            response:
              $ref: '#/components/schemas/ListResponse'
    Error:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
  responses:
    Unauthorized:
      description: Missing or invalid bearer access token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    PageToken:
      name: list_parameters.page_token
      in: query
      required: false
      description: Opaque token to retrieve the next page of results.
      schema:
        type: string
    Namespace:
      name: namespace
      in: path
      required: true
      description: The tenant namespace (tenant_meta.namespace) that scopes the resource.
      schema:
        type: string
    PageSize:
      name: list_parameters.page_size
      in: query
      required: false
      description: Maximum number of resources to return per page.
      schema:
        type: integer
        format: int32
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer access token obtained from POST /v1/auth/api-key by exchanging an Endor Labs API key and secret.