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

s-core.2.8.1.source-code.rest-core-services.yaml Maven / Gradle / Ivy

The newest version!
openapi: "3.0.0"
info:
  version: 7.11.0
  title: UNICORE Core Services
  license:
    name: BSD
servers:
  - url: https://gateway_url/SITE_NAME/rest/core
paths:
  /jobs:
    description: Accesses a user's list of jobs, and allows to 
                 submit new jobs.
    
    get:
      summary: List all jobs of the current user
      parameters:
        - name: num
          in: query
          description: How many jobs to return
          required: false
          schema:
            type: integer
      responses:
        200:
          description: An paged array of jobs
          content:
            application/json:    
              schema:
                $ref: "#/components/schemas/JobList"
        401:
          description: Unauthorized
        500:
          description: Internal server error

    post:
      summary: Submit a new job
      requestBody: 
        required: true
        description: Job description
        content:
          application/json:
            schema:  
              $ref: "#/components/schemas/JobDescription"
      parameters:
        - name: X-UNICORE-User-Preferences
          in: header
          required: false
          description: allows to select one of the user's available 
                       Unix user IDs, group IDs or UNICORE roles
          schema:
            example: "uid:some_id"
      responses:
        201:
          description: Job was created
          headers:
            Location:
              description: contains the URL of the new job
              schema:
                type: string     
        401:
          description: Unauthorized
        500:
          description: Server error on submissionAccesses a single job. A job has properties such
                 as the execution status. The properties contain a "_links" object
                 containing URLs to the working directory resource, and to various "actions"
                 that allow to abort or restart a job.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
                
  /jobs/{jobId}:
    description: Accesses a single job. A job has properties such
                 as the execution status. The properties contain a "_links" object
                 containing URLs to the working directory resource, and to various "actions"
                 that allow to abort or restart a job.
 
    get:
      summary: Properties of a specific job
      parameters:
        - name: jobId
          in: path
          required: true
          description: The id of the job to retrieve
          schema:
            type: string
      responses:
        200:
          description: Expected response to a valid request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/JobProperties"
        401:
          description: Unauthorized
        404:
          description: Not found, no such job
        500:
          description: internal server error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
                
components:
  schemas:

    JobList:
      type: object
      required:
        - jobs
        - _links
      properties:
        jobs:
          type: array
          items:
            description: URL of a job
            type: string
        _links:
          description: URLs to next/previous pages of jobs in the job list 
          type: array
          items:
            type: object

    JobDescription:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          
    JobProperties:
      type: object
      required:
        - status
        - name
        - submissionTime
        - log
        - queue
        - currentTime
        - terminationTime
        - owner
        - acl
      properties:
        status:
          type: string
          enum: [UNKNOWN, STAGINGIN, READY, QUEUED, STAGINGOUT, FAILED, SUCCESSFUL]
        name:
          description: job name as submitted (or 'N/A' if not applicable)
          type: string
        log:
          description: processing log
          type: string
        exitCode:
          description: application exit code (if available)
          type: integer
        submissionTime:
          description: date-time of job submission
          type: string
        queue:
          description: processing queue (or 'N/A' if not applicable)
          type: string
        submissionPreferences:
          description: if X-UNICORE-User-Preferences were used on submission, the results are given here
          type: object
        terminationTime:
          description: date-time of automated job cleanup by the server
          type: string
        currentTime:
          description: date-time on the server
          type: string
        owner:
          description: the identity (x.500 DN) of the job's owner
          type: string
        acl:
          description: the ACl for this job
          type: string

    Error:
      type: object
      required:
        - status
        - errorMessage
      properties:
        status:
          description: HTTP error code
          type: integer
        errorMessage:
          type: string




© 2015 - 2025 Weber Informatics LLC | Privacy Policy