github.com/openshift-online/ocm-sdk-go@v0.1.473/openapi/job_queue/v1/openapi.json (about)

     1  {
     2    "openapi": "3.0.0",
     3    "info": {
     4      "version": "v1",
     5      "title": "job_queue",
     6      "license": {
     7        "name": "Apache 2.0",
     8        "url": "http://www.apache.org/licenses/LICENSE-2.0"
     9      },
    10      "contact": {
    11        "name": "OCM Feedback",
    12        "email": "ocm-feedback@redhat.com"
    13      }
    14    },
    15    "servers": [
    16      {
    17        "description": "Production",
    18        "url": "https://api.openshift.com"
    19      },
    20      {
    21        "description": "Stage",
    22        "url": "https://api.stage.openshift.com"
    23      }
    24    ],
    25    "paths": {
    26      "/api/job_queue/v1": {
    27        "get": {
    28          "description": "Retrieves the version metadata.",
    29          "responses": {
    30            "200": {
    31              "description": "Success.",
    32              "content": {
    33                "application/json": {
    34                  "schema": {
    35                    "$ref": "#/components/schemas/Metadata"
    36                  }
    37                }
    38              }
    39            },
    40            "default": {
    41              "description": "Error.",
    42              "content": {
    43                "application/json": {
    44                  "schema": {
    45                    "$ref": "#/components/schemas/Error"
    46                  }
    47                }
    48              }
    49            }
    50          }
    51        }
    52      },
    53      "/api/job_queue/v1/queues": {
    54        "get": {
    55          "description": "Retrieves a list of job queues.",
    56          "parameters": [
    57            {
    58              "name": "page",
    59              "description": "Index of the requested page, where one corresponds to the first page.\nPage may be a token to the next page",
    60              "in": "query",
    61              "schema": {
    62                "type": "integer",
    63                "format": "int32"
    64              }
    65            },
    66            {
    67              "name": "size",
    68              "description": "Maximum number of items that will be contained in the returned page.",
    69              "in": "query",
    70              "schema": {
    71                "type": "integer",
    72                "format": "int32"
    73              }
    74            }
    75          ],
    76          "responses": {
    77            "200": {
    78              "description": "Success.",
    79              "content": {
    80                "application/json": {
    81                  "schema": {
    82                    "type": "object",
    83                    "properties": {
    84                      "items": {
    85                        "description": "Retrieved list of job queues.",
    86                        "type": "array",
    87                        "items": {
    88                          "$ref": "#/components/schemas/Queue"
    89                        }
    90                      },
    91                      "page": {
    92                        "description": "Index of the requested page, where one corresponds to the first page.\nPage may be a token to the next page",
    93                        "type": "integer",
    94                        "format": "int32"
    95                      },
    96                      "size": {
    97                        "description": "Maximum number of items that will be contained in the returned page.",
    98                        "type": "integer",
    99                        "format": "int32"
   100                      },
   101                      "total": {
   102                        "description": "Total number of items of the collection regardless of the size of the page.",
   103                        "type": "integer",
   104                        "format": "int32"
   105                      }
   106                    }
   107                  }
   108                }
   109              }
   110            },
   111            "default": {
   112              "description": "Error.",
   113              "content": {
   114                "application/json": {
   115                  "schema": {
   116                    "$ref": "#/components/schemas/Error"
   117                  }
   118                }
   119              }
   120            }
   121          }
   122        }
   123      },
   124      "/api/job_queue/v1/queues/{queue_id}": {
   125        "get": {
   126          "description": "Retrieves the details of a job queue by ID.",
   127          "parameters": [
   128            {
   129              "name": "queue_id",
   130              "in": "path",
   131              "schema": {
   132                "type": "string"
   133              },
   134              "required": true
   135            }
   136          ],
   137          "responses": {
   138            "200": {
   139              "description": "Success.",
   140              "content": {
   141                "application/json": {
   142                  "schema": {
   143                    "$ref": "#/components/schemas/Queue"
   144                  }
   145                }
   146              }
   147            },
   148            "default": {
   149              "description": "Error.",
   150              "content": {
   151                "application/json": {
   152                  "schema": {
   153                    "$ref": "#/components/schemas/Error"
   154                  }
   155                }
   156              }
   157            }
   158          }
   159        }
   160      },
   161      "/api/job_queue/v1/queues/{queue_id}/pop": {
   162        "post": {
   163          "description": "POP new job from a job queue",
   164          "parameters": [
   165            {
   166              "name": "queue_id",
   167              "in": "path",
   168              "schema": {
   169                "type": "string"
   170              },
   171              "required": true
   172            }
   173          ],
   174          "responses": {
   175            "200": {
   176              "description": "Success.",
   177              "content": {
   178                "application/json": {
   179                  "schema": {
   180                    "type": "object",
   181                    "properties": {
   182                      "href": {
   183                        "type": "string"
   184                      },
   185                      "id": {
   186                        "type": "string"
   187                      },
   188                      "abandoned_at": {
   189                        "type": "string",
   190                        "format": "date-time"
   191                      },
   192                      "arguments": {
   193                        "type": "string"
   194                      },
   195                      "attempts": {
   196                        "type": "integer",
   197                        "format": "int32"
   198                      },
   199                      "created_at": {
   200                        "type": "string",
   201                        "format": "date-time"
   202                      },
   203                      "kind": {
   204                        "type": "string"
   205                      },
   206                      "receipt_id": {
   207                        "type": "string"
   208                      },
   209                      "updated_at": {
   210                        "type": "string",
   211                        "format": "date-time"
   212                      }
   213                    }
   214                  }
   215                }
   216              }
   217            },
   218            "default": {
   219              "description": "Error.",
   220              "content": {
   221                "application/json": {
   222                  "schema": {
   223                    "$ref": "#/components/schemas/Error"
   224                  }
   225                }
   226              }
   227            }
   228          }
   229        }
   230      },
   231      "/api/job_queue/v1/queues/{queue_id}/push": {
   232        "post": {
   233          "description": "PUSH a new job into job queue",
   234          "parameters": [
   235            {
   236              "name": "queue_id",
   237              "in": "path",
   238              "schema": {
   239                "type": "string"
   240              },
   241              "required": true
   242            }
   243          ],
   244          "requestBody": {
   245            "content": {
   246              "application/json": {
   247                "schema": {
   248                  "type": "object",
   249                  "properties": {
   250                    "abandoned_at": {
   251                      "type": "string",
   252                      "format": "date-time"
   253                    },
   254                    "arguments": {
   255                      "type": "string"
   256                    },
   257                    "attempts": {
   258                      "type": "integer",
   259                      "format": "int32"
   260                    },
   261                    "created_at": {
   262                      "type": "string",
   263                      "format": "date-time"
   264                    }
   265                  }
   266                }
   267              }
   268            }
   269          },
   270          "responses": {
   271            "200": {
   272              "description": "Success.",
   273              "content": {
   274                "application/json": {
   275                  "schema": {
   276                    "type": "object",
   277                    "properties": {
   278                      "href": {
   279                        "type": "string"
   280                      },
   281                      "id": {
   282                        "type": "string"
   283                      },
   284                      "abandoned_at": {
   285                        "type": "string",
   286                        "format": "date-time"
   287                      },
   288                      "arguments": {
   289                        "type": "string"
   290                      },
   291                      "attempts": {
   292                        "type": "integer",
   293                        "format": "int32"
   294                      },
   295                      "created_at": {
   296                        "type": "string",
   297                        "format": "date-time"
   298                      },
   299                      "kind": {
   300                        "type": "string"
   301                      },
   302                      "receipt_id": {
   303                        "type": "string"
   304                      },
   305                      "updated_at": {
   306                        "type": "string",
   307                        "format": "date-time"
   308                      }
   309                    }
   310                  }
   311                }
   312              }
   313            },
   314            "default": {
   315              "description": "Error.",
   316              "content": {
   317                "application/json": {
   318                  "schema": {
   319                    "$ref": "#/components/schemas/Error"
   320                  }
   321                }
   322              }
   323            }
   324          }
   325        }
   326      },
   327      "/api/job_queue/v1/queues/{queue_id}/jobs/{job_id}/failure": {
   328        "post": {
   329          "description": "Mark a job as Failed. This method returns '204 No Content'",
   330          "parameters": [
   331            {
   332              "name": "queue_id",
   333              "in": "path",
   334              "schema": {
   335                "type": "string"
   336              },
   337              "required": true
   338            },
   339            {
   340              "name": "job_id",
   341              "in": "path",
   342              "schema": {
   343                "type": "string"
   344              },
   345              "required": true
   346            }
   347          ],
   348          "requestBody": {
   349            "content": {
   350              "application/json": {
   351                "schema": {
   352                  "type": "object",
   353                  "properties": {
   354                    "failure_reason": {
   355                      "type": "string"
   356                    },
   357                    "receipt_id": {
   358                      "description": "A unique ID of a pop'ed job",
   359                      "type": "string"
   360                    }
   361                  }
   362                }
   363              }
   364            }
   365          },
   366          "responses": {
   367            "200": {
   368              "description": "Success."
   369            },
   370            "default": {
   371              "description": "Error.",
   372              "content": {
   373                "application/json": {
   374                  "schema": {
   375                    "$ref": "#/components/schemas/Error"
   376                  }
   377                }
   378              }
   379            }
   380          }
   381        }
   382      },
   383      "/api/job_queue/v1/queues/{queue_id}/jobs/{job_id}/success": {
   384        "post": {
   385          "description": "Mark a job as Successful. This method returns '204 No Content'",
   386          "parameters": [
   387            {
   388              "name": "queue_id",
   389              "in": "path",
   390              "schema": {
   391                "type": "string"
   392              },
   393              "required": true
   394            },
   395            {
   396              "name": "job_id",
   397              "in": "path",
   398              "schema": {
   399                "type": "string"
   400              },
   401              "required": true
   402            }
   403          ],
   404          "requestBody": {
   405            "content": {
   406              "application/json": {
   407                "schema": {
   408                  "type": "object",
   409                  "properties": {
   410                    "receipt_id": {
   411                      "description": "A unique ID of a pop'ed job",
   412                      "type": "string"
   413                    }
   414                  }
   415                }
   416              }
   417            }
   418          },
   419          "responses": {
   420            "200": {
   421              "description": "Success."
   422            },
   423            "default": {
   424              "description": "Error.",
   425              "content": {
   426                "application/json": {
   427                  "schema": {
   428                    "$ref": "#/components/schemas/Error"
   429                  }
   430                }
   431              }
   432            }
   433          }
   434        }
   435      }
   436    },
   437    "components": {
   438      "schemas": {
   439        "Metadata": {
   440          "description": "Version metadata.",
   441          "properties": {
   442            "server_version": {
   443              "description": "Version of the server.",
   444              "type": "string"
   445            }
   446          }
   447        },
   448        "Job": {
   449          "description": "This struct is a job in a Job Queue.",
   450          "properties": {
   451            "kind": {
   452              "description": "Indicates the type of this object. Will be 'Job' if this is a complete object or 'JobLink' if it is just a link.",
   453              "type": "string"
   454            },
   455            "id": {
   456              "description": "Unique identifier of the object.",
   457              "type": "string"
   458            },
   459            "href": {
   460              "description": "Self link.",
   461              "type": "string"
   462            },
   463            "abandoned_at": {
   464              "description": "DLQ sent timestamp",
   465              "type": "string",
   466              "format": "date-time"
   467            },
   468            "arguments": {
   469              "description": "Arguments to run Job with.",
   470              "type": "string"
   471            },
   472            "attempts": {
   473              "description": "Number of retries.",
   474              "type": "integer",
   475              "format": "int32"
   476            },
   477            "created_at": {
   478              "type": "string",
   479              "format": "date-time"
   480            },
   481            "receipt_id": {
   482              "description": "Each time a specific job is pop'd, the receiptId will change, while the ID stays the same.",
   483              "type": "string"
   484            },
   485            "updated_at": {
   486              "type": "string",
   487              "format": "date-time"
   488            }
   489          }
   490        },
   491        "Queue": {
   492          "properties": {
   493            "kind": {
   494              "description": "Indicates the type of this object. Will be 'Queue' if this is a complete object or 'QueueLink' if it is just a link.",
   495              "type": "string"
   496            },
   497            "id": {
   498              "description": "Unique identifier of the object.",
   499              "type": "string"
   500            },
   501            "href": {
   502              "description": "Self link.",
   503              "type": "string"
   504            },
   505            "created_at": {
   506              "type": "string",
   507              "format": "date-time"
   508            },
   509            "max_attempts": {
   510              "description": "SQS Visibility Timeout",
   511              "type": "integer",
   512              "format": "int32"
   513            },
   514            "max_run_time": {
   515              "type": "integer",
   516              "format": "int32"
   517            },
   518            "name": {
   519              "type": "string"
   520            },
   521            "updated_at": {
   522              "type": "string",
   523              "format": "date-time"
   524            }
   525          }
   526        },
   527        "Error": {
   528          "type": "object",
   529          "properties": {
   530            "kind": {
   531              "description": "Indicates the type of this object. Will always be 'Error'",
   532              "type": "string"
   533            },
   534            "id": {
   535              "description": "Numeric identifier of the error.",
   536              "type": "integer",
   537              "format": "int32"
   538            },
   539            "href": {
   540              "description": "Self link.",
   541              "type": "string"
   542            },
   543            "code": {
   544              "description": "Globally unique code of the error, composed of the unique identifier of the API and the numeric identifier of the error. For example, for if the numeric identifier of the error is `93` and the identifier of the API is `clusters_mgmt` then the code will be `CLUSTERS-MGMT-93`.",
   545              "type": "string"
   546            },
   547            "reason": {
   548              "description": "Human readable description of the error.",
   549              "type": "string"
   550            },
   551            "details": {
   552              "description": "Extra information about the error.",
   553              "type": "object",
   554              "additionalProperties": true
   555            }
   556          }
   557        }
   558      },
   559      "securitySchemes": {
   560        "bearer": {
   561          "type": "http",
   562          "scheme": "bearer",
   563          "bearerFormat": "JWT"
   564        }
   565      }
   566    },
   567    "security": [
   568      {
   569        "bearer": [
   570          
   571        ]
   572      }
   573    ]
   574  }