All Downloads are FREE. Search and download functionalities are using the official Maven repository.

swagger.swagger.yaml Maven / Gradle / Ivy

There is a newer version: 2.7.1
Show newest version
# Copyright (c) 2000-2020, Board of Trustees of Leland Stanford Jr. University
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors
# may be used to endorse or promote products derived from this software without
# specific prior written permission. 
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

swagger: "2.0"
info:
  title: "LOCKSS Poller Service REST API"
  version: "2.0.0"
  description: "REST API of the LOCKSS Poller Service"
  contact:
    name: "LOCKSS Support"
    url: "https://www.lockss.org/"
    email: "[email protected]"
  license:
    name: "BSD-3-Clause"
    url: "https://opensource.org/licenses/BSD-3-Clause"
host: 'laaws.lockss.org:443'
basePath: /
schemes:
  - https
security:
  - basicAuth: []
paths:
  /polls:
    post:
      tags:
        - "service"
      summary: Send a request to call a poll to the poller
      description: Use the information found in the descriptor object to initiate a  poll.
      operationId: callPoll
      consumes: 
        - application/json
      produces:
        - application/json
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/PollDesc'
      responses:
        '202':
          description: The Poll request has been accepted and added to the queue.
          schema:
            type: string
            description: Return a poll service id.
        '401':
          description: The Request is unauthorized
        '403':
          description: The Au is not eligible for polling
        '404':
          description: The descriptor (au) can not be found.
        '500':
          description: Internal Server Error
    get:
      tags:
        - "service"
      summary: Query for poll properties
      description: Query for polls that meet a set of specified conditions
      operationId: getPolls
      produces:
        - application/json
      parameters:
        - name: 'pollQuery'
          in: query
          description: The query that specifies the polls to be returned
          required: true
          type: string
      responses:
        '200':
          description: Information about the requested polls
          schema:
            type: array
            items:
              $ref: '#/definitions/pollWsResult'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
  '/polls/{psId}':
    get:
      tags:
        - "service"
      summary: Get queued poll status
      description: Get the status of a previously queued poll.
      operationId: getPollStatus
      produces:
        - application/json
      parameters: []
      responses:
        '200':
          description: Poll info returned.
          schema:
            $ref: '#/definitions/PollerSummary'
        '401':
          description: Unauthorized request
        '404':
          description: No such poll service id.
        '500':
          description: Internal Server Error
    delete:
      tags:
        - "service"
      summary: Stop a poll and remove from queue.
      description: >-
        Stop a running poll and delete any schecduled polls for poll with the
        poll service id.
      operationId: cancelPoll
      produces:
        - application/json
      parameters: []
      responses:
        '200':
          description: Poll successfully stopped
        '401':
          description: Unauthorized request
        '404':
          description: No poll found with that id
        '500':
          description: Internal Server Error
    parameters:
      - name: psId
        in: path
        required: true
        type: string
  /status:
    get:
      tags:
      - "service"
      summary: "Get the status of the service"
      description: "Get the status of the service"
      operationId: "getStatus"
      produces:
      - "application/json"
      responses:
        200:
          description: "The status of the service"
          schema:
            $ref: "#/definitions/apiStatus"
        401:
          description: "Unauthorized request"
        500:
          description: "Internal server error"
        503:
          description: "Some or all of the system is not available"
  '/polls/{pollKey}/tallies':
    get:
      tags:
        - "poll-detail"
      summary: Page Tally
      operationId: getTallyUrls
      produces:
        - application/json
      parameters:
        - name: tally
          in: query
          required: true
          type: string
          description: The kind of tally element to return.
          enum:
            - "agree"
            - "disagree"
            - "error"
            - "noQuorum"
            - "tooClose"
        - name: page
          in: query
          required: false
          type: integer
          description: The page number.
        - name: size
          in: query
          required: false
          type: integer
          description: The size of the page.
      responses:
        '200':
          description: A pagable list of urls for given tally type.
          schema:
            $ref: '#/definitions/UrlPager'
          headers:
            X-Page-Count:
              type: integer
              x-example: 1
            X-Page-Number:
              type: integer
              x-example: 1
            X-Page-Size:
              type: integer
              x-example: 25
            X-Total-Count:
              type: integer
              x-example: 50
        '404':
          description: Poll Key not found.
        '500':
          description: Internal Server Error
    parameters:
      - name: pollKey
        in: path
        required: true
        type: string
        description: The pollKey as listed in the PollDetail object.
  '/polls/{pollKey}/repairs':
    get:
      tags:
        - "poll-detail"
      summary: Poll Repairs
      operationId: getRepairQueueData
      produces:
        - application/json
      parameters:
        - name: repair
          in: query
          required: true
          type: string
          description: The repair queue elements to return.
          enum:
            - "pending"
            - "active"
            - "completed"
        - name: page
          in: query
          required: false
          type: integer
          description: The page number.
        - name: size
          in: query
          required: false
          type: integer
          description: The size of the page.
      responses:
        '200':
          description: A pagable list of repair queue elements.
          schema:
            $ref: '#/definitions/RepairPager'
          headers:
            X-Page-Count:
              type: integer
              x-example: 1
            X-Page-Number:
              type: integer
              x-example: 1
            X-Page-Size:
              type: integer
              x-example: 25
            X-Total-Count:
              type: integer
              x-example: 50
        '404':
          description: Poll ID not found.
        '500':
          description: Internal Server Error
    parameters:
      - name: pollKey
        in: path
        required: true
        type: string
        description: The pollKey as listed in the PollDetail object.
  '/polls/{pollKey}/peer/{peerId}':
    get:
      tags:
        - "poll-detail"
      summary: Poll Peer Data
      operationId: getPollPeerVoteUrls
      produces:
        - application/json
      parameters:
        - name: urls
          in: query
          required: true
          type: string
          description: The voter urls to return.
          enum:
            - "agreed"
            - "disagreed"
            - "pollerOnly"
            - "voterOnly"
        - name: page
          in: query
          required: false
          type: integer
          description: The page number
        - name: size
          in: query
          required: false
          type: integer
          description: The page size
      responses:
        '200':
          description: A pagable list of voter urls with a given status.
          schema:
            $ref: '#/definitions/UrlPager'
          headers:
            X-Page-Count:
              type: integer
              x-example: 1
            X-Page-Number:
              type: integer
              x-example: 1
            X-Page-Size:
              type: integer
              x-example: 25
            X-Total-Count:
              type: integer
              x-example: 50
        '404':
          description: Poll or Voter ID not found.
        '500':
          description: Internal Server Error
    parameters:
      - name: pollKey
        in: path
        required: true
        type: string
        description: The pollKey from the PollDetail.
      - name: peerId
        in: path
        required: true
        type: string
        description: The peerId from the Poll Detail.PeerData.
  /polls/poller:
    get:
      tags:
        - "poller-polls"
      summary: Get the list of recent polls as poller.
      description: >-
        Get the list of recent polls as poller from the poll queue. if size and
        page are passed in use those arguments to limit return data.
      operationId: getPollsAsPoller
      produces:
        - application/json
      parameters:
        - name: size
          in: query
          required: false
          type: integer
          format: int32
          description: Size of the page to retrieve.
          x-example: 10
        - name: page
          in: query
          required: false
          type: integer
          format: int32
          description: Number of the page to retrieve.
          x-example: 1
      responses:
        '200':
          description: A pagable list has been returned.
          schema:
            $ref: '#/definitions/PollerPager'
          headers:
            X-Page-Count:
              type: integer
              x-example: 1
            X-Page-Number:
              type: integer
              x-example: 1
            X-Page-Size:
              type: integer
              x-example: 25
            X-Total-Count:
              type: integer
              x-example: 50
        '401':
          description: Unauthorized request
        '500':
          description: Internal Server Error
  '/polls/poller/{pollKey}':
    get:
      tags:
        - "poller-polls"
      summary: PollerDetails
      
      operationId: getPollerPollDetails
      produces:
        - application/json
      description: Return the detailed information about a poll.
      parameters: []
      responses:
        '200':
          description: Detailed poll info returned.
          schema:
            $ref: '#/definitions/PollerDetail'
        '401':
          description: Unauthorized request.
        '404':
          description: Poll Key not found.
        '500':
          description: Internal Server Error
    parameters:
      - name: pollKey
        in: path
        required: true
        type: string
        description: The key assigned by the PollManager.
  /polls/voter:
    get:
      tags:
        - "voter-polls"
      summary: Get the list of recent voter only polls.
      description: >-
        Get the list of recent polls as voter from the poll queue. if size and
        page are passed in use those arguments to limit return data.
      operationId: getPollsAsVoter
      produces:
        - application/json
      parameters:
        - name: size
          in: query
          required: false
          type: integer
          format: int32
          description: Size of the page to retrieve.
          x-example: 10
        - name: page
          in: query
          required: false
          type: integer
          format: int32
          description: Number of the page to retrieve.
          x-example: 1
      responses:
        '200':
          description: A pagable list has been returned.
          schema:
            $ref: '#/definitions/VoterPager'
          headers:
            X-Page-Count:
              type: integer
              x-example: 1
            X-Page-Number:
              type: integer
              x-example: 1
            X-Page-Size:
              type: integer
              x-example: 25
            X-Total-Count:
              type: integer
              x-example: 50
        '401':
          description: Unauthorized request
        '500':
          description: Internal Server Error
  '/polls/voter/{pollKey}':
    get:
      tags:
        - "voter-polls"
      summary: VoterDetails
      operationId: getVoterPollDetails
      produces:
        - application/json
      description: Return the detailed information about a poll.
      parameters: []
      responses:
        '200':
          description: Detailed poll info returned.
          schema:
            $ref: '#/definitions/VoterDetail'
        '401':
          description: Unauthorized request
        '404':
          description: No such poll key.
        '500':
          description: Internal Server Error
    parameters:
      - name: pollKey
        in: path
        required: true
        type: string
        description: The key assigned by the PollManager.
  '/peers':
    get:
      tags:
        - "service"
      summary: Query for peer properties
      description: Query for peers that meet a set of specified conditions
      operationId: getPeers
      produces:
        - application/json
      parameters:
        - name: 'peerQuery'
          in: query
          description: The query that specifies the peers to be returned
          required: true
          type: string
      responses:
        '200':
          description: Information about the requested peers
          schema:
            type: array
            items:
              $ref: '#/definitions/peerWsResult'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
  '/votes':
    get:
      tags:
        - "service"
      summary: Query for vote properties
      description: Query for votes that meet a set of specified conditions
      operationId: getVotes
      produces:
        - application/json
      parameters:
        - name: 'voteQuery'
          in: query
          description: The query that specifies the votes to be returned
          required: true
          type: string
      responses:
        '200':
          description: Information about the requested votes
          schema:
            type: array
            items:
              $ref: '#/definitions/voteWsResult'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
  # TODO: Move the following endpoint to some other service. It is here only for
  # expediency.
  /aus/{auid}/export:
    get:
      tags:
        - export
      summary: "Export artifacts in an Archival Unit"
      description: "Export artifacts in an Archival Unit as a group of archives"
      operationId: getExportFiles
      consumes:
        - application/json
      produces:
        - multipart/form-data
      parameters:
        - name: "auid"
          in: "path"
          required: true
          type: "string"
          description: "Identifier of the Archival Unit containing the\
            \ artifacts"
        - name: "fileType"
          in: "query"
          required: false
          type: "string"
          enum: ["WARC_RESPONSE", "WARC_RESOURCE", "ARC_RESPONSE", "ARC_RESOURCE", "ZIP"]
          default: "WARC_RESPONSE"
          description: "The type of archive to create"
        - name: "isCompress"
          in: "query"
          required: false
          type: "boolean"
          default: "true"
          description: "Indication of whether contents should be compressed"
        - name: "isExcludeDirNodes"
          in: "query"
          required: false
          type: "boolean"
          default: "true"
          description: "Indication of whether directories should be excluded"
        - name: "xlateFilenames"
          in: "query"
          required: false
          type: "string"
          enum: ["XLATE_NONE", "XLATE_WINDOWS", "XLATE_MAC"]
          default: "XLATE_NONE"
          description: "Type of filename translation to be done"
        - name: "filePrefix"
          in: "query"
          required: false
          type: "string"
          default: "lockss_export"
          description: "The prefix to be used to name the exported file"
        - name: "maxSize"
          in: "query"
          required: false
          type: "integer"
          format: "int64"
          default: -1
          description: "The maximum size of the exported file"
        - name: "maxVersions"
          in: "query"
          required: false
          type: "integer"
          default: -1
          description: "The maximum number of versions of an artifact to be\
            \ exported"
      responses:
        200:
          description: The archives with the requested artifacts
          schema:
            type: file
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        404:
          description: Not found
        406:
          description: Not Acceptable
        500:
          description: Internal Server Error
  # TODO: Move the following endpoint to some other service. It is here only for
  # expediency.
  /aus/import:
    put:
      tags:
        - import
      summary: "Import a file into an Archival Unit"
      description: "Import a file as an artifact in an Archival Unit"
      operationId: putImportFile
      consumes:
        - multipart/form-data
      produces:
        - application/json
      parameters:
        - name: "targetBaseUrlPath"
          in: "formData"
          required: true
          type: "string"
          description: "The base URL path of the target AU"
        - name: "targetUrl"
          in: "formData"
          required: true
          type: "string"
          description: "The target AU URL"
        - name: "userProperties"
          in: "formData"
          required: false
          type: array
          items:
            type: string
          description: "The user-specified properties"
        - name: "file"
          in: "formData"
          required: true
          type: "file"
          description: "The content of the file to be imported"
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        415:
          description: Unsupported Media Type
        500:
          description: Internal Server Error
  # TODO: Move the following endpoint to some other service. It is here only for
  # expediency.
  '/hashes':
    get:
      tags:
        - "hash"
      summary: Get the results of all the asynchronous hashing operations
      description: Get the results of all the asynchronous hashing operations
      operationId: getAllHashes
      produces:
        - multipart/form-data
      responses:
        '200':
          description: Information about all the asynchronous hashing operations
          schema:
            type: file
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
    put:
      tags:
        - "hash"
      summary: Perform a hashing operation
      description: Perform the hashing of an AU or a URL
      operationId: putHash
      produces:
        - multipart/form-data
      parameters:
        - name: hasherWsParams
          in: body
          required: true
          schema:
            $ref: '#/definitions/hasherWsParams'
        - name: "isAsynchronous"
          in: "query"
          required: false
          type: "boolean"
          default: "true"
          description: "Indication of whether the operation should be done \
            \asynchronously"
      responses:
        '200':
          description: Information about the performed hashing operation
          schema:
            type: file
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
  # TODO: Move the following endpoint to some other service. It is here only for
  # expediency.
  '/hashes/requests/{requestId}':
    delete:
      tags:
        - "hash"
      summary: Remove an asynchronous hashing operation
      description: Remove from the system an asynchronous hashing operation,\
        \ terminating it if it's still running
      operationId: deleteHash
      produces:
        - application/json
      parameters:
        - name: "requestId"
          in: "path"
          required: true
          type: "string"
          description: "Identifier of the asynchronous hashing operation"
      responses:
        '200':
          description: Asynchronous hashing operation successfully removed
          schema:
            type: string
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: No asynchronous hashing operation found with that id
        '500':
          description: Internal Server Error
    get:
      tags:
        - "hash"
      summary: Get the result of an asynchronous hashing operation
      description: Get the result of an asynchronous hashing operation
      operationId: getHash
      produces:
        - multipart/form-data
      parameters:
        - name: "requestId"
          in: "path"
          required: true
          type: "string"
          description: Identifier of the asynchronous hashing operation
      responses:
        '200':
          description: Information about the asynchronous hashing operation
          schema:
            type: file
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: No asynchronous hashing operation found with that id
        '500':
          description: Internal Server Error
  # TODO: Move the following endpoint to some other service. It is here only for
  # expediency.
  '/repositories':
    get:
      tags:
        - repo
      summary: Query the properties of repositories
      description: Query the system for selected repository properties
      operationId: getRepositories
      produces:
        - application/json
      parameters:
        - name: 'repositoryQuery'
          in: query
          description: The query that specifies the repository properties to be returned
          required: true
          type: string
      responses:
        '200':
          description: Information about the requested TDB AUs
          schema:
            type: array
            items:
              $ref: '#/definitions/repositoryWsResult'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
  # TODO: Move the following endpoint to some other service. It is here only for
  # expediency.
  '/repositoryspaces':
    get:
      tags:
        - repo
      summary: Query the properties of repository spaces
      description: Query the system for selected repository space properties
      operationId: getRepositorySpaces
      produces:
        - application/json
      parameters:
        - name: 'repositorySpaceQuery'
          in: query
          description: The query that specifies the repository space properties to be returned
          required: true
          type: string
      responses:
        '200':
          description: Information about the requested TDB AUs
          schema:
            type: array
            items:
              $ref: '#/definitions/repositorySpaceWsResult'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
securityDefinitions:
  basicAuth:
    description: HTTP Basic Authentication. Works over `HTTP` and `HTTPS`
    type: basic
definitions:
  PollerDetail:
    type: object
    required:
      - pollDesc
      - pollerId
      - status
    properties:
      pollDesc:
        $ref: '#/definitions/PollDesc'
      pollerId:
        type: string
        description: The id of the poller who called the poll
      status:
        type: string
        description: The current status of the poll.
      pollKey:
        type: string
        description: Key generated by poll manager when poll is created.
      createTime:
        type: integer
        format: int64
        description: The timestamp  at which the poll was created.
      duration:
        type: integer
        format: int64
        description: The estimated duration for the poll.
      deadline:
        type: integer
        format: int64
        description: The time by which the poll must have completed
      outerCircleTarget:
        type: integer
        format: int32
        description: The number of peers from the poller outer circle to taget.
      hashAlgorithm:
        type: string
        description: The algorithm used by the hasher for this poll.
      voteMargin:
        type: integer
        format: int32
        description: >-
          The required agreement need to decide landslide agreement or
          disagreement.
      voteDeadline:
        type: integer
        format: int64
        description: The  time by which all voters must have voted.
      voteDuration:
        type: integer
        format: int64
        description: The  estimated duration for voters.
      pollEnd:
        type: integer
        format: int64
        description: the time at which the poll ended or -1 if still running.
      quorum:
        type: integer
        format: int32
        description: The minimum required for a quroum
      errorDetails:
        type: string
        description: The error which caused the poll to fail.
      votedPeers:
        type: array
        description: The data from peers whom voted.
        items:
          $ref: '#/definitions/PeerData'
      noAuPeers:
        type: array
        description: The peers who do not have the au.
        items:
          type: string
      tally:
        $ref: '#/definitions/TallyData'
      repairQueue:
        $ref: '#/definitions/RepairQueue'
    description: The details of a poll being performed or queued by the Poller
  VoterDetail:
    type: object
    required:
      - pollDesc
      - pollerId
      - status
    properties:
      pollDesc:
        $ref: '#/definitions/PollDesc'
      pollerId:
        type: string
        description: The id of the voter in the poll
      callerId:
         type: string
         description: The id of the poller who called the poll
      status:
        type: string
        description: The current status of the poll.
      pollKey:
        type: string
        description: Key generated by poll manager when poll is created.
      createTime:
        type: integer
        format: int64
        description: The timestamp  at which the poll was created.
      duration:
        type: integer
        format: int64
        description: The estimated duration for the poll.
      deadline:
        type: integer
        format: int64
        description: The time by which the poll must have completed
      hashAlgorithm:
        type: string
        description: The algorithm used by the hasher for this poll.
      agreement:
        type: number
        format: double
        description: The percentage agreement.
      wtAgreement:
        type: number
        format: double
        description: The weighted percentage agreement.
      symmetricAgreement:
        type: number
        format: double
        description: The percentage of symmetric agreement.
      wtSymmetricAgreement:
        type: number
        format: double
        description: The weighted percentage of symmetric agreement.
      pollerNonce:
        type: string
        description: the poller nonce
      voterNonce:
        type: string
        description: the voter nonce
      voter2Nonce:
        type: string
        description: the voter2 nonce
      voteDeadline:
        type: integer
        format: int64
        description: The  time by which all voters must have voted.
      numAgree:
        type: integer
        format: int32
        description: The number of urls with agreement.
      numDisagree:
        type: integer
        format: int32
        description: The number of urls with disagreement.
      numPollerOnly:
        type: integer
        format: int32
        description: The number of urls found by only the poller.
      numVoterOnly:
        type: integer
        format: int32
        description: The number of urls found by only a voter.
      errorDetails:
        type: string
        description: The error which caused the poll to fail.
    description: The details of a poll being performed or queued as the Voter.
  PeerData:
    type: object
    required:
      - peerId
      - status
    properties:
      peerId:
        type: string
        description: the peer id for this participant
      status:
        type: string
        description: the status of this peer
      agreement:
        type: number
        format: float
        description: the percentage of vote agreement.
      numAgree:
        type: integer
        format: int64
      agreeLink:
        $ref: '#/definitions/LinkDesc'
      numDisagree:
        type: integer
        format: int64
      disagreeLink:
        $ref: '#/definitions/LinkDesc'
      numPollerOnly:
        type: integer
        format: int64
      pollerOnlyLink:
        $ref: '#/definitions/LinkDesc'
      numVoterOnly:
        type: integer
        format: int64
      voterOnlyLink:
        $ref: '#/definitions/LinkDesc'
      bytesHashed:
        type: integer
        format: int64
        description: the number of bytes hashed.
      bytesRead:
        type: integer
        format: int64
        description: the number of bytes read.
      wtAgreement:
        type: number
        format: float
        description: the weight of vote percentage agreement.
      wtNumAgree:
        type: number
        format: float
        description: the weight of number agree votes.
      wtNumDisagree:
        type: number
        format: float
        description: the weight of number of disagree votes.
      wtNumPollerOnly:
        type: number
        format: float
        description: the weight of number of poller only votes.
      wtNumVoterOnly:
        type: number
        format: float
        description: the weight of number of voter only votes.
      state:
        type: string
        description: the state machine state.
      lastStateChange:
        type: integer
        format: int64
        description: the time of last state change.
    description: Detail for a single voter in a poll.
  TallyData:
    type: object
    required:
      - numAgree
      - numDisagree
      - numError
      - numNoQuorum
      - numTooClose
    properties:
      numAgree:
        type: integer
        format: int32
        description: The number of urls with agreement.
      agreeLink:
        $ref: '#/definitions/LinkDesc'
      numDisagree:
        type: integer
        format: int32
        description: The number of urls with disagreement.
      disagreeLink:
        $ref: '#/definitions/LinkDesc'
      numTooClose:
        type: integer
        format: int32
        description: The number of urls too close.
      tooCloseLink:
        $ref: '#/definitions/LinkDesc'
      numNoQuorum:
        type: integer
        format: int32
        description: The number of urls without enough voters.
      noQuorumLink:
        $ref: '#/definitions/LinkDesc'
      numError:
        type: integer
        format: int32
        description: The number of urls without errors.
      errorLink:
        $ref: '#/definitions/LinkDesc'
      wtAgreed:
        type: number
        format: float
        description: The weighted sum agreed uris.
        default: 0
      wtDisagreed:
        type: number
        format: float
        description: The weighted sum of disagree uris.
        default: 0
      wtTooClose:
        type: number
        format: float
        description: The sum of the tooClose uris.
        default: 0
      wtNoQuorum:
        type: number
        format: float
        description: The weighted sum of NoQuorum uris.
        default: 0
    description: The tally for the current poll.
  RepairQueue:
    type: object
    required:
      - numActive
      - numCompleted
      - numPending
    properties:
      numPending:
        type: integer
        format: int32
        description: The number of pending repairs
      pendingLink:
        $ref: '#/definitions/LinkDesc'
      numActive:
        type: integer
        format: int32
        description: The number of active repairs
      activeLink:
        $ref: '#/definitions/LinkDesc'
      numCompleted:
        type: integer
        format: int32
        description: The number of completed repairs
      completedLink:
        $ref: '#/definitions/LinkDesc'
    description: Description of the RepairQueue.
  RepairData:
    type: object
    required:
      - repairFrom
      - repairUrl
    properties:
      repairUrl:
        type: string
        description: The url to repair
      repairFrom:
        type: string
        description: The peer to repair from
      result:
        type: string
        description: The status of this repair
        enum:
          - "NoQuorum"
          - "TooClose"
          - "Lost"
          - "LostPollerOnly"
          - "LostVoterOnly"
          - "Won"
    description: >-
      structure used to define a repair source for url. if the source is null
      than repair from publisher
  RepairPager:
    type: object
    required:
      - pageDesc
    properties:
      pageDesc:
        $ref: '#/definitions/PageDesc'
      repairs:
        type: array
        description: The list of repair data on this page or null.
        items:
          $ref: '#/definitions/RepairData'
    description: A Pager for a list of urls found in poll details.
  UrlPager:
    type: object
    required:
      - pageDesc
    properties:
      pageDesc:
        $ref: '#/definitions/PageDesc'
      urls:
        type: array
        description: The urls on this page.
        items:
          type: "string"
    description: A Pager for a list of urls found in poll details.
  PollerPager:
    type: object
    required:
      - pageDesc
    properties:
      pageDesc:
        $ref: '#/definitions/PageDesc'
      polls:
        type: array
        description: The list of polls for the current page or null
        items:
          $ref: '#/definitions/PollerSummary'
    description: A page of poller poll summaries.
  PollerSummary:
    type: object
    required:
      - auId
      - deadline
      - pollKey
      - start
      - status
      - variant
    properties:
      auId:
        type: string
        description: The id for the au being polled.
      variant:
        type: string
        description: The V3 Poll variant.
      status:
        type: string
        description: The current status of the poll.
      participants:
        type: integer
        format: int32
        description: The number of participants voting.
      numTalliedUrls:
        type: integer
        format: int32
        description: The number of tallied urls.
      numHashErrors:
        type: integer
        format: int32
        description: The number of hash errors.
      numCompletedRepairs:
        type: integer
        format: int32
        description: The number of completed repairs.
      numAgreeUrls:
        type: integer
        format: int32
        description: The number of urls with agreement.
      start:
        type: integer
        format: int64
        description: The timestamp for when the poll started.
      deadline:
        type: integer
        format: int64
        description: The deadline for voting in this poll.
      pollEnd:
        type: integer
        format: int64
        description: The time at which the poll ended.
      pollKey:
        type: string
        description: Key generated by poll manager when poll was created.
      detailLink:
        $ref: '#/definitions/LinkDesc'
    description: A summary of a poll in which we are the poller.
  VoterSummary:
    type: object
    required:
      - auId
      - caller
      - deadline
      - pollKey
      - start
      - status
    properties:
      auId:
        type: string
        description: The id for the au being polled.
      caller:
        type: string
        description: The id of who called the poll.
      start:
        type: integer
        format: int64
        description: The timestamp for when the poll started.
      status:
        type: string
        description: The current status of the poll.
      deadline:
        type: integer
        format: int64
        description: The deadline for voting in this poll.
      pollKey:
        type: string
        description: Key generated by poll manager when poll was created.
      detailLink:
        $ref: '#/definitions/LinkDesc'
    description: A summary of a poll in which we are acting just as a voter.
  VoterPager:
    type: object
    required:
      - pageDesc
    properties:
      pageDesc:
        $ref: '#/definitions/PageDesc'
      polls:
        type: array
        description: The list of polls for the current page or null
        items:
          $ref: '#/definitions/VoterSummary'
    description: A page of voter poll summary.
  PollDesc:
    type: object
    required:
      - auId
    properties:
      auId:
        type: string
        description: The id which defines the poll
      cuSetSpec:
        $ref: '#/definitions/CachedUriSetSpec'
      pollType:
        type: integer
        description: The type of poll to run. Only V3 is supported.
        minimum: 3
      protocol:
        type: integer
        description: The version of polling protocol.
      pluginPollVersion:
        type: string
        description: The version of the polling features needed by the plugin.
      variant:
        type: string
        description: The V3 poll variation.
        enum:
          - "PoR"
          - "PoP"
          - "Local"
          - "NoPoll"
      modulus:
        type: integer
        description: Poll on every 'n'th url.
    description: The Poller Services poll spec used to define a poll.
  CachedUriSetSpec:
    type: object
    required:
      - urlPrefix
    properties:
      urlPrefix:
        type: string
        description: The base which roots the lower and upper bound
      lowerBound:
        type: string
        description: 'lower bound of the prefix range, inclusive.'
      upperBound:
        type: string
        description: 'upper bound of prefix range, inclusive.'
    description: >-
      A set of urls bounded by  upper and lower restraints.  If lower = "." this
      is a singleContentNode. If lower is null then start at the root url, if
      upper is null end with the last.
  PageDesc:
    type: object
    required:
      - page
      - size
      - total
    properties:
      page:
        type: integer
        description: The page number
        example: 10
      size:
        type: integer
        description: The size or number of elements on a page
        example: 5
      total:
        type: integer
        description: The mTotal number of elements.
        example: 150
      prevPage:
        type: string
        description: The url of the prev page of results or null
      nextPage:
        type: string
        description: The url to the next page of results or null.
    description: The information needed to page in a long list of data
  LinkDesc:
    type: object
    required:
      - link
    properties:
      link:
        type: string
        description: The actual link suitable for a standard GET request
        example: 'http:www.example.com/v1/element'
      desc:
        type: string
        description: A description of this link
        example: pollerOnly
  pollWsResult:
    type: "object"
    required:
      - "auId"
      - "auName"
    properties:
      auId:
        type: "string"
        description: "The identifier of the Archival Unit"
      auName:
        type: "string"
        description: "The name of the Archival Unit"
    description: "The properties of a poll"
  peerWsResult:
    type: "object"
    required:
      - "peerId"
    properties:
      peerId:
        type: "string"
        description: "The identifier of the Archival Unit"
    description: "The properties of a peer"
  voteWsResult:
    type: "object"
    required:
      - "auId"
      - "auName"
    properties:
      auId:
        type: "string"
        description: "The identifier of the Archival Unit"
      auName:
        type: "string"
        description: "The name of the Archival Unit"
    description: "The properties of a vote"
  hasherWsParams:
    type: "object"
    required:
      - auId
      - url
      - lower
      - upper
      - recordFilteredStream
      - excludeSuspectVersions
      - includeWeight
      - algorithm
      - hashType
      - resultEncoding
      - challenge
      - verifier
    properties:
      auId:
        type: "string"
        description: "The identifier of the Archival Unit content to be hashed"
      url:
        type: "string"
        description: "The identifier of the URL content to be hashed"
      lower:
        type: "string"
        description: "The lower boundary URL"
      upper:
        type: "string"
        description: "The upper boundary URL"
      recordFilteredStream:
        type: "boolean"
        description: "An indication of whether the filtered stream should be\
          \ recorded"
      excludeSuspectVersions:
        type: "boolean"
        description: "An indication of whether to exclude suspect versions"
      includeWeight:
        type: "boolean"
        description: "An indication of whether to include hash weight"
      algorithm:
        type: "string"
        description: "The name of the hashing algorithm to be used [SHA-1 (or\
          \ SHA1), MD5 or SHA-256]"
      hashType:
        type: "string"
        description: "The type of hashing to be performed [V1Content, V1Name,\
          \ V1File, V3Tree or V3File]"
      resultEncoding:
        type: "string"
        description: "The result encoding to be used [Base64 or Hex]"
      challenge:
        type: "string"
        description: "The encoded challenge"
      verifier:
        type: "string"
        description: "The encoded verifier"
    description: "The parameters of a hash operation"
  repositoryWsResult:
    type: "object"
    required:
      - "repositorySpaceId"
    properties:
      repositorySpaceId:
        type: "string"
        description: "The Repository Space identifier"
    description: "Information about the requested repositories"
  repositorySpaceWsResult:
    type: "object"
    required:
      - "repositorySpaceId"
    properties:
      repositorySpaceId:
        type: "string"
        description: "The Repository Space identifier"
    description: "Information about the requested repository spaces"
  apiStatus:
    type: "object"
    required:
    - "version"
    - "ready"
    properties:
      version:
        type: "string"
        description: "The version of the service"
      ready:
        type: "boolean"
        description: "The indication of whether the service is available"
    description: "The status information of the service"




© 2015 - 2025 Weber Informatics LLC | Privacy Policy