Apache Nutch Seed API

Manage seed URL lists

OpenAPI Specification

apache-nutch-seed-api-openapi.yml Raw ↑
openapi: 3.1.2
info:
  title: Apache Nutch REST Admin Seed API
  description: REST API for managing Apache Nutch crawl jobs, configurations, seed lists, database queries, and data readers.
  version: 1.0.0
  license:
    name: Apache 2.0
    identifier: Apache-2.0
  contact:
    name: Apache Nutch
    url: https://nutch.apache.org
servers:
- url: '{protocol}://localhost:{port}'
  description: Nutch REST server
  variables:
    protocol:
      default: http
      enum:
      - http
      - https
      description: The protocol used to access the Nutch server.
    port:
      default: '8081'
      description: The port the Nutch server listens on. Configurable via the --port command-line argument.
security:
- basicAuth: []
tags:
- name: Seed
  description: Manage seed URL lists
paths:
  /seed/:
    get:
      tags:
      - Seed
      summary: Apache Nutch List All Seed Lists
      description: Returns a map of all created seed files keyed by name.
      operationId: getSeedLists
      responses:
        '200':
          description: A JSON object mapping seed list names to SeedList objects.
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/SeedList'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /seed/create:
    post:
      tags:
      - Seed
      summary: Apache Nutch Create a Seed List File
      description: Creates a seed list file from the provided URLs and writes it to HDFS. Returns the path to the created seed file directory.
      operationId: createSeedFile
      requestBody:
        required: true
        description: The seed list containing URLs to write.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SeedList'
      responses:
        '200':
          description: Path to the created seed file directory.
          content:
            text/plain:
              schema:
                type: string
              example: seedFiles/seed-1700000000000
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  responses:
    Unauthorized:
      description: Unauthorized. Basic authentication credentials are missing or invalid.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
            example:
              message: Authentication required.
    BadRequest:
      description: Bad request. The request body is missing, malformed, or contains invalid parameters.
      content:
        text/plain:
          schema:
            type: string
          example: Nutch configuration cannot be empty!
    InternalServerError:
      description: An unexpected server error occurred.
      content:
        text/plain:
          schema:
            type: string
          example: Internal server error.
  schemas:
    SeedList:
      type: object
      description: A named list of seed URLs.
      required:
      - seedUrls
      properties:
        id:
          type: integer
          format: int64
          minimum: 0
          maximum: 9007199254740991
          description: The seed list identifier.
          readOnly: true
        name:
          type: string
          description: A human-readable name for this seed list.
        seedFilePath:
          type: string
          description: The HDFS path where the seed file is stored. Populated after creation.
          readOnly: true
        seedUrls:
          type: array
          items:
            $ref: '#/components/schemas/SeedUrl'
          description: The collection of seed URLs in this list.
      example:
        name: my-seeds
        seedUrls:
        - url: https://example.com
        - url: https://nutch.apache.org
    SeedUrl:
      type: object
      description: A single seed URL entry.
      properties:
        id:
          type: integer
          format: int64
          minimum: 0
          maximum: 9007199254740991
          description: The seed URL identifier.
          readOnly: true
        url:
          type: string
          description: The seed URL.
      example:
        url: https://example.com
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic Authentication.