github.com/m3db/m3@v1.5.1-0.20231129193456-75a402aa583b/src/ctl/public/r2/v1/swagger/swagger.json (about)

     1  {
     2      "swagger": "2.0",
     3      "info": {
     4          "description": "R2 client API",
     5          "version": "v1",
     6          "title": "R2 API",
     7          "license": {
     8              "name": "MIT",
     9              "url": "https://github.com/m3db/m3/blob/master/LICENSE.md"
    10          }
    11      },
    12      "host": "localhost:9000",
    13      "basePath": "/r2/v1/",
    14      "tags": [
    15          {
    16              "name": "namespaces",
    17              "description": "Operations at the namespace level"
    18          },
    19          {
    20              "name": "mapping-rules",
    21              "description": "Operations on mapping rules"
    22          },
    23          {
    24              "name": "rollup-rules",
    25              "description": "Operations on rollup rules"
    26          }
    27      ],
    28      "schemes": [
    29          "http"
    30      ],
    31      "paths": {
    32          "/namespaces": {
    33              "get": {
    34                  "tags": [
    35                      "namespaces"
    36                  ],
    37                  "summary": "Get all of the known namespaces",
    38                  "description": "",
    39                  "operationId": "getNamespaces",
    40                  "consumes": [
    41                      "application/json"
    42                  ],
    43                  "produces": [
    44                      "application/json"
    45                  ],
    46                  "parameters": [],
    47                  "responses": {
    48                      "200": {
    49                          "description": "Got all namespaces successfully",
    50                          "schema": {
    51                              "$ref": "#/definitions/Namespaces"
    52                          }
    53                      }
    54                  }
    55              },
    56              "post": {
    57                  "tags": [
    58                      "namespaces"
    59                  ],
    60                  "summary": "Creates a namespace with a given name.",
    61                  "operationId": "createNamespace",
    62                  "consumes": [
    63                      "application/json"
    64                  ],
    65                  "produces": [
    66                      "application/json"
    67                  ],
    68                  "parameters": [
    69                      {
    70                          "in": "body",
    71                          "name": "namespace-data",
    72                          "description": "The data associated with the namespace being created.",
    73                          "required": true,
    74                          "schema": {
    75                             "$ref": "#/definitions/Namespace"
    76                          }
    77                      }
    78                  ],
    79                  "responses": {
    80                      "201": {
    81                          "description": "Succesfully created the namespace",
    82                          "schema": {
    83                              "$ref": "#/definitions/ApiResponse"
    84                          }
    85                      },
    86                      "409": {
    87                          "description": "Namespace already exists",
    88                          "schema": {
    89                              "$ref": "#/definitions/ApiResponse"
    90                          }
    91                      },
    92                      "500": {
    93                          "description": "Something went horribly wrong",
    94                          "schema": {
    95                              "$ref": "#/definitions/ApiResponse"
    96                          }
    97                      }
    98                  }
    99              }
   100          },
   101          "/namespaces/{namespaceID}": {
   102              "get": {
   103                  "tags": [
   104                      "namespaces"
   105                  ],
   106                  "summary": "Get the current view of the rule set belonging to a given namespace",
   107                  "operationId": "getNamespace",
   108                  "consumes": [
   109                      "application/json"
   110                  ],
   111                  "produces": [
   112                      "application/json"
   113                  ],
   114                  "parameters": [
   115                      {
   116                          "in": "path",
   117                          "name": "namespaceID",
   118                          "description": "The name of the namespace",
   119                          "type": "string",
   120                          "required": true
   121                      }
   122                  ],
   123                  "responses": {
   124                      "200": {
   125                          "description": "blah",
   126                          "schema": {
   127                              "$ref": "#/definitions/RuleSet"
   128                          }
   129                      },
   130                      "404": {
   131                          "description": "No such namespace",
   132                          "schema": {
   133                              "$ref": "#/definitions/ApiResponse"
   134                          }
   135                      },
   136                      "500": {
   137                          "description": "Something went horribly wrong",
   138                          "schema": {
   139                              "$ref": "#/definitions/ApiResponse"
   140                          }
   141                      }
   142                  }
   143              },
   144              "delete": {
   145                  "tags": [
   146                      "namespaces"
   147                  ],
   148                  "summary": "Deletes the namespace with a given name.",
   149                  "operationId": "deleteNamespace",
   150                  "consumes": [
   151                      "application/json"
   152                  ],
   153                  "produces": [
   154                      "application/json"
   155                  ],
   156                  "parameters": [
   157                      {
   158                          "in": "path",
   159                          "name": "namespaceID",
   160                          "description": "The name of the namespace",
   161                          "type": "string",
   162                          "required": true
   163                      }
   164                  ],
   165                  "responses": {
   166                      "200": {
   167                          "description": "Succesfully deleted the namespace",
   168                          "schema": {
   169                              "$ref": "#/definitions/ApiResponse"
   170                          }
   171                      },
   172                      "404": {
   173                          "description": "No such namespace",
   174                          "schema": {
   175                              "$ref": "#/definitions/ApiResponse"
   176                          }
   177                      },
   178                      "500": {
   179                          "description": "Something went horribly wrong",
   180                          "schema": {
   181                              "$ref": "#/definitions/ApiResponse"
   182                          }
   183                      }
   184                  }
   185              }
   186          },
   187          "/namespaces/{namespaceID}/ruleset/update": {
   188              "post": {
   189                  "tags":[
   190                      "namespaces"
   191                  ],
   192                  "summary": "Update endpoint for a ruleset, allowing for atomic changes to an entire ruleset.",
   193                  "operationId": "updateRuleSet",
   194                  "consumes": [
   195                      "application/json"
   196                  ],
   197                  "produces": [
   198                      "application/json"
   199                  ],
   200                  "parameters": [
   201                      {
   202                          "in": "body",
   203                          "description": "The updates to the ruleset",
   204                          "required": true,
   205                          "schema": {
   206                              "type": "object",
   207                              "properties": {
   208                                  "rulesetChanges": {
   209                                      "$ref": "#/definitions/RuleSetChanges"
   210                                  },
   211                                  "rulesetVersion": {
   212                                      "type": "integer"
   213                                  }
   214                              }
   215                          }
   216                      },
   217                      {
   218                          "in": "path",
   219                          "name": "namespaceID",
   220                          "description": "The name of the namespace",
   221                          "type": "string",
   222                          "required": true
   223                      }
   224                  ],
   225                  "responses": {
   226                      "200": {
   227                          "description": "The ruleset updates have been applied",
   228                          "schema": {
   229                              "$ref": "#/definitions/RuleSet"
   230                          }
   231                      },
   232                      "404": {
   233                          "description": "No such namespace",
   234                          "schema": {
   235                              "$ref": "#/definitions/ApiResponse"
   236                          }
   237                      },
   238                      "409": {
   239                          "description": "Namespace already exists",
   240                          "schema": {
   241                              "$ref": "#/definitions/ApiResponse"
   242                          }
   243                      },
   244                      "500": {
   245                          "description": "Something went horribly wrong",
   246                          "schema": {
   247                              "$ref": "#/definitions/ApiResponse"
   248                          }
   249                      }
   250                  }
   251              }
   252          },
   253          "/namespaces/{namespaceID}/ruleset/validate": {
   254              "post": {
   255                  "tags": [
   256                      "namespaces"
   257                  ],
   258                  "summary": "Performs validation for a namespace's ruleset.",
   259                  "operationId": "validateRuleSet",
   260                  "consumes": [
   261                      "application/json"
   262                  ],
   263                  "produces": [
   264                      "application/json"
   265                  ],
   266                  "parameters": [
   267                      {
   268                          "in": "path",
   269                          "name": "namespaceID",
   270                          "description": "The name of the namespace",
   271                          "type": "string",
   272                          "required": true
   273                      },
   274                      {
   275                          "in": "body",
   276                          "name": "ruleset",
   277                          "description": "The ruleset to validate.",
   278                          "required": true,
   279                          "schema": {
   280                             "$ref": "#/definitions/RuleSet"
   281                          }
   282                      }
   283                  ],
   284                  "responses": {
   285                      "200": {
   286                          "description": "The ruleset is valid.",
   287                          "schema": {
   288                              "$ref": "#/definitions/ApiResponse"
   289                          }
   290                      },
   291                      "400": {
   292                          "description": "The ruleset is invalid.",
   293                          "schema": {
   294                              "$ref": "#/definitions/ApiResponse"
   295                          }
   296                      },
   297                      "500": {
   298                          "description": "Something went horribly wrong",
   299                          "schema": {
   300                              "$ref": "#/definitions/ApiResponse"
   301                          }
   302                      }
   303                  }
   304              }
   305          },
   306          "/namespaces/{namespaceID}/mapping-rules": {
   307              "post": {
   308                  "tags": [
   309                      "mapping-rules"
   310                  ],
   311                  "summary": "Update a mapping rule with the given state",
   312                  "operationId": "createMappingRule",
   313                  "consumes": [
   314                      "application/json"
   315                  ],
   316                  "produces": [
   317                      "application/json"
   318                  ],
   319                  "parameters": [
   320                      {
   321                          "in": "body",
   322                          "name": "mapping-rule",
   323                          "description": "the new state of the ruleset",
   324                          "required": true,
   325                          "schema": {
   326                              "$ref": "#/definitions/MappingRule"
   327                          }
   328                      },
   329                      {
   330                          "in": "path",
   331                          "name": "namespaceID",
   332                          "description": "The id of the namespace you are modifying",
   333                          "type": "string",
   334                          "required": true
   335                      }
   336                  ],
   337                  "responses": {
   338                      "201": {
   339                          "description": "Mapping Rule created",
   340                          "schema": {
   341                              "$ref": "#/definitions/MappingRule"
   342                          }
   343                      },
   344                      "404": {
   345                          "description": "No such namespace",
   346                          "schema": {
   347                              "$ref": "#/definitions/ApiResponse"
   348                          }
   349                      },
   350                      "409": {
   351                          "description": "The ruleset got updated while you were looking at it.",
   352                          "schema": {
   353                              "$ref": "#/definitions/ApiResponse"
   354                          }
   355                      },
   356                      "500": {
   357                          "description": "Something went horribly wrong",
   358                          "schema": {
   359                              "$ref": "#/definitions/ApiResponse"
   360                          }
   361                      }
   362                  }
   363              }
   364          },
   365          "/namespaces/{namespaceID}/mapping-rules/{ruleID}": {
   366              "get": {
   367                  "tags": [
   368                      "mapping-rules"
   369                  ],
   370                  "summary": "Gets the current state for a given mapping rule in a given  namespace\n",
   371                  "operationId": "getMappingRule",
   372                  "consumes": [
   373                      "application/json"
   374                  ],
   375                  "produces": [
   376                      "application/json"
   377                  ],
   378                  "parameters": [
   379                      {
   380                          "in": "path",
   381                          "name": "namespaceID",
   382                          "description": "The name of the namespace",
   383                          "type": "string",
   384                          "required": true
   385                      },
   386                      {
   387                          "in": "path",
   388                          "name": "ruleID",
   389                          "description": "The id of the rule",
   390                          "type": "string",
   391                          "required": true
   392                      }
   393                  ],
   394                  "responses": {
   395                      "200": {
   396                          "description": "rule state sorted latest first",
   397                          "schema": {
   398                              "$ref": "#/definitions/MappingRule"
   399                          }
   400                      },
   401                      "404": {
   402                          "description": "no such namespace or no such rule",
   403                          "schema": {
   404                              "$ref": "#/definitions/ApiResponse"
   405                          }
   406                      },
   407                      "500": {
   408                          "description": "Something went horribly wrong",
   409                          "schema": {
   410                              "$ref": "#/definitions/ApiResponse"
   411                          }
   412                      }
   413                  }
   414              },
   415              "put": {
   416                  "tags": [
   417                      "mapping-rules"
   418                  ],
   419                  "summary": "Update the mapping rule to the provided state",
   420                  "operationId": "updateMappingRule",
   421                  "consumes": [
   422                      "application/json"
   423                  ],
   424                  "produces": [
   425                      "application/json"
   426                  ],
   427                  "parameters": [
   428                      {
   429                          "in": "body",
   430                          "name": "mapping-rules",
   431                          "description": "the new state of the ruleset",
   432                          "required": true,
   433                          "schema": {
   434                              "$ref": "#/definitions/MappingRule"
   435                          }
   436                      },
   437                      {
   438                          "in": "path",
   439                          "name": "namespaceID",
   440                          "description": "The id of the namespace you are modifying",
   441                          "type": "string",
   442                          "required": true
   443                      },
   444                      {
   445                          "in": "path",
   446                          "name": "ruleID",
   447                          "description": "The id of the rule",
   448                          "type": "string",
   449                          "required": true
   450                      }
   451                  ],
   452                  "responses": {
   453                      "200": {
   454                          "description": "Rule updated",
   455                          "schema": {
   456                              "$ref": "#/definitions/MappingRule"
   457                          }
   458                      },
   459                      "404": {
   460                          "description": "No such Rule",
   461                          "schema": {
   462                              "$ref": "#/definitions/ApiResponse"
   463                          }
   464                      },
   465                      "409": {
   466                          "description": "The ruleset got updated while you were looking at it.",
   467                          "schema": {
   468                              "$ref": "#/definitions/ApiResponse"
   469                          }
   470                      },
   471                      "500": {
   472                          "description": "Something went horribly wrong",
   473                          "schema": {
   474                              "$ref": "#/definitions/ApiResponse"
   475                          }
   476                      }
   477                  }
   478              },
   479              "delete": {
   480                  "tags": [
   481                      "mapping-rules"
   482                  ],
   483                  "summary": "Delete a mapping rule with the given state",
   484                  "operationId": "deleteMappingRule",
   485                  "consumes": [
   486                      "application/json"
   487                  ],
   488                  "produces": [
   489                      "application/json"
   490                  ],
   491                  "parameters": [
   492                      {
   493                          "in": "path",
   494                          "name": "namespaceID",
   495                          "description": "The id of the namespace you are modifying",
   496                          "type": "string",
   497                          "required": true
   498                      },
   499                      {
   500                          "in": "path",
   501                          "name": "ruleID",
   502                          "description": "The id of the rule",
   503                          "type": "string",
   504                          "required": true
   505                      }
   506                  ],
   507                  "responses": {
   508                      "200": {
   509                          "description": "Ruleset updated",
   510                          "schema": {
   511                              "$ref": "#/definitions/ApiResponse"
   512                          }
   513                      },
   514                      "404": {
   515                          "description": "No such namespace",
   516                          "schema": {
   517                              "$ref": "#/definitions/ApiResponse"
   518                          }
   519                      },
   520                      "409": {
   521                          "description": "The ruleset got updated while you were looking at it.",
   522                          "schema": {
   523                              "$ref": "#/definitions/ApiResponse"
   524                          }
   525                      },
   526                      "500": {
   527                          "description": "Something went horribly wrong",
   528                          "schema": {
   529                              "$ref": "#/definitions/ApiResponse"
   530                          }
   531                      }
   532                  }
   533              }
   534          },
   535          "/namespaces/{namespaceID}/mapping-rules/{ruleID}/history": {
   536              "get": {
   537                  "tags": [
   538                      "mapping-rules"
   539                  ],
   540                  "summary": "Gets the current state and all history for a given mapping rule a given namespace\n",
   541                  "operationId": "getMappingRuleHistory",
   542                  "consumes": [
   543                      "application/json"
   544                  ],
   545                  "produces": [
   546                      "application/json"
   547                  ],
   548                  "parameters": [
   549                      {
   550                          "in": "path",
   551                          "name": "namespaceID",
   552                          "description": "The name of the namespace",
   553                          "type": "string",
   554                          "required": true
   555                      },
   556                      {
   557                          "in": "path",
   558                          "name": "ruleID",
   559                          "description": "The id of the rule",
   560                          "type": "string",
   561                          "required": true
   562                      },
   563                      {
   564                          "in": "query",
   565                          "name": "limit",
   566                          "description": "The size of the history page to retrieve",
   567                          "type": "string",
   568                          "required": true
   569                      },
   570                      {
   571                          "in": "query",
   572                          "name": "page",
   573                          "description": "The page to show",
   574                          "type": "string",
   575                          "required": true
   576                      }
   577                  ],
   578                  "responses": {
   579                      "200": {
   580                          "description": "rule state sorted latest first",
   581                          "schema": {
   582                              "$ref": "#/definitions/MappingRuleHistory"
   583                          }
   584                      },
   585                      "404": {
   586                          "description": "no such namespace or no such rule",
   587                          "schema": {
   588                              "$ref": "#/definitions/ApiResponse"
   589                          }
   590                      },
   591                      "500": {
   592                          "description": "Something went horribly wrong",
   593                          "schema": {
   594                              "$ref": "#/definitions/ApiResponse"
   595                          }
   596                      }
   597                  }
   598              }
   599          },
   600          "/namespaces/{namespaceID}/rollup-rules": {
   601              "post": {
   602                  "tags": [
   603                      "rollup-rules"
   604                  ],
   605                  "summary": "Create a rollup rule with the given state",
   606                  "operationId": "createRollupRule",
   607                  "consumes": [
   608                      "application/json"
   609                  ],
   610                  "produces": [
   611                      "application/json"
   612                  ],
   613                  "parameters": [
   614                      {
   615                          "in": "body",
   616                          "name": "rollup-rule",
   617                          "description": "the new state of the ruleset",
   618                          "required": true,
   619                          "schema": {
   620                              "$ref": "#/definitions/RollupRule"
   621                          }
   622                      },
   623                      {
   624                          "in": "path",
   625                          "name": "namespaceID",
   626                          "description": "The id of the namespace you are modifying",
   627                          "type": "string",
   628                          "required": true
   629                      }
   630                 ],
   631                  "responses": {
   632                      "201": {
   633                          "description": "Ruleset updated",
   634                          "schema": {
   635                              "$ref": "#/definitions/RollupRule"
   636                          }
   637                      },
   638                      "404": {
   639                          "description": "No such namespace or no such rule",
   640                          "schema": {
   641                              "$ref": "#/definitions/ApiResponse"
   642                          }
   643                      },
   644                      "409": {
   645                          "description": "The ruleset got updated while you were looking at it.",
   646                          "schema": {
   647                              "$ref": "#/definitions/ApiResponse"
   648                          }
   649                      },
   650                      "500": {
   651                          "description": "Something went horribly wrong",
   652                          "schema": {
   653                              "$ref": "#/definitions/ApiResponse"
   654                          }
   655                      }
   656                  }
   657              }
   658          },
   659          "/namespaces/{namespaceID}/rollup-rules/{ruleID}": {
   660              "get": {
   661                  "tags": [
   662                      "rollup-rules"
   663                  ],
   664                  "summary": "Gets the current state for a given rollup rule in a given namespace",
   665                  "operationId": "getRollupRule",
   666                  "consumes": [
   667                      "application/json"
   668                  ],
   669                  "produces": [
   670                      "application/json"
   671                  ],
   672                  "parameters": [
   673                      {
   674                          "in": "path",
   675                          "name": "namespaceID",
   676                          "description": "The name of the namespace",
   677                          "type": "string",
   678                          "required": true
   679                      },
   680                      {
   681                          "in": "path",
   682                          "name": "ruleID",
   683                          "description": "The id of the rule",
   684                          "type": "string",
   685                          "required": true
   686                      }
   687                  ],
   688                  "responses": {
   689                      "200": {
   690                          "description": "rule state sorted latest first",
   691                          "schema": {
   692                              "$ref": "#/definitions/RollupRule"
   693                          }
   694                      },
   695                      "404": {
   696                          "description": "no such namespace or no such rule",
   697                          "schema": {
   698                              "$ref": "#/definitions/ApiResponse"
   699                          }
   700                      },
   701                      "500": {
   702                          "description": "Something went horribly wrong",
   703                          "schema": {
   704                              "$ref": "#/definitions/ApiResponse"
   705                          }
   706                      }
   707                  }
   708              },
   709              "put": {
   710                  "tags": [
   711                      "rollup-rules"
   712                  ],
   713                  "summary": "Update the rollup rule to the provided state",
   714                  "operationId": "updateRollupRule",
   715                  "consumes": [
   716                      "application/json"
   717                  ],
   718                  "produces": [
   719                      "application/json"
   720                  ],
   721                  "parameters": [
   722                      {
   723                          "in": "body",
   724                          "name": "rollup-rule",
   725                          "description": "the new state of the ruleset",
   726                          "required": true,
   727                          "schema": {
   728                              "$ref": "#/definitions/RollupRule"
   729                          }
   730                      },
   731                      {
   732                          "in": "path",
   733                          "name": "namespaceID",
   734                          "description": "The name of the namespace",
   735                          "type": "string",
   736                          "required": true
   737                      },
   738                      {
   739                          "in": "path",
   740                          "name": "ruleID",
   741                          "description": "The id of the rule",
   742                          "type": "string",
   743                          "required": true
   744                      }
   745                  ],
   746                  "responses": {
   747                      "200": {
   748                          "description": "Rule updated",
   749                          "schema": {
   750                              "$ref": "#/definitions/RollupRule"
   751                          }
   752                      },
   753                      "404": {
   754                          "description": "No such Rule",
   755                          "schema": {
   756                              "$ref": "#/definitions/ApiResponse"
   757                          }
   758                      },
   759                      "409": {
   760                          "description": "The ruleset got updated while you were looking at it",
   761                          "schema": {
   762                              "$ref": "#/definitions/ApiResponse"
   763                          }
   764                      },
   765                      "500": {
   766                          "description": "Something went horribly wrong",
   767                          "schema": {
   768                              "$ref": "#/definitions/ApiResponse"
   769                          }
   770                      }
   771                  }
   772              },
   773              "delete": {
   774                  "tags": [
   775                      "rollup-rules"
   776                  ],
   777                  "summary": "Delete a rollup rule with the given id",
   778                  "operationId": "deleteRollupRule",
   779                  "consumes": [
   780                      "application/json"
   781                  ],
   782                  "produces": [
   783                      "application/json"
   784                  ],
   785                  "parameters": [
   786                      {
   787                          "in": "path",
   788                          "name": "namespaceID",
   789                          "description": "The id of the namespace you are modifying",
   790                          "type": "string",
   791                          "required": true
   792                      },
   793                      {
   794                          "in": "path",
   795                          "name": "ruleID",
   796                          "description": "The id of the rule",
   797                          "type": "string",
   798                          "required": true
   799                      }
   800                  ],
   801                  "responses": {
   802                      "200": {
   803                          "description": "Ruleset updated",
   804                          "schema": {
   805                              "$ref": "#/definitions/ApiResponse"
   806                          }
   807                      },
   808                      "404": {
   809                          "description": "No such namespace",
   810                          "schema": {
   811                              "$ref": "#/definitions/ApiResponse"
   812                          }
   813                      },
   814                      "409": {
   815                          "description": "The ruleset got updated while you were looking at it.",
   816                          "schema": {
   817                              "$ref": "#/definitions/ApiResponse"
   818                          }
   819                      },
   820                      "500": {
   821                          "description": "Something went horribly wrong",
   822                          "schema": {
   823                              "$ref": "#/definitions/ApiResponse"
   824                          }
   825                      }
   826                  }
   827              }
   828          },
   829          "/namespaces/{namespaceID}/rollup-rules/{ruleId}/history": {
   830              "get": {
   831                  "tags": [
   832                      "rollup-rules"
   833                  ],
   834                  "summary": "Gets the current state and all history for a given rollup rule in a given namespace\n",
   835                  "operationId": "getRollupRuleHistory",
   836                  "consumes": [
   837                      "application/json"
   838                  ],
   839                  "produces": [
   840                      "application/json"
   841                  ],
   842                  "parameters": [
   843                      {
   844                          "in": "path",
   845                          "name": "namespaceID",
   846                          "description": "The name of the namespace",
   847                          "type": "string",
   848                          "required": true
   849                      },
   850                      {
   851                          "in": "path",
   852                          "name": "ruleId",
   853                          "description": "The id of the rule",
   854                          "type": "string",
   855                          "required": true
   856                      },
   857                      {
   858                          "in": "query",
   859                          "name": "limit",
   860                          "description": "The size of the history page to retrieve",
   861                          "type": "string",
   862                          "required": true
   863                      },
   864                      {
   865                          "in": "query",
   866                          "name": "page",
   867                          "description": "The page.",
   868                          "type": "string",
   869                          "required": true
   870                      }
   871                  ],
   872                  "responses": {
   873                      "200": {
   874                          "description": "rule state sorted latest first",
   875                          "schema": {
   876                              "$ref": "#/definitions/RollupRuleHistory"
   877                          }
   878                      },
   879                      "404": {
   880                          "description": "no such namespace or no such rule",
   881                          "schema": {
   882                              "$ref": "#/definitions/ApiResponse"
   883                          }
   884                      },
   885                      "500": {
   886                          "description": "Something went horribly wrong",
   887                          "schema": {
   888                              "$ref": "#/definitions/ApiResponse"
   889                          }
   890                      }
   891                  }
   892              }
   893          }
   894      },
   895      "definitions": {
   896          "Namespaces": {
   897              "type": "object",
   898              "properties": {
   899                  "version" : {
   900                      "type": "integer"
   901                  },
   902                  "namespaces" : {
   903                      "type": "array",
   904                      "items": {
   905                          "$ref": "#/definitions/Namespace"
   906                      }
   907                  }
   908              }
   909          },
   910          "Namespace": {
   911              "type": "object",
   912              "properties": {
   913                  "id": {
   914                      "type": "string"
   915                  }
   916              }
   917          },
   918          "RuleSet": {
   919              "type": "object",
   920              "properties": {
   921                  "id": {
   922                      "type": "string",
   923                      "description": "The id of the namespace this ruleset belongs to."
   924                  },
   925                  "version": {
   926                      "type": "integer"
   927                  },
   928                  "cutoverMillis": {
   929                      "type": "integer",
   930                      "format": "unixMillis"
   931                  },
   932                  "mappingRules": {
   933                      "type": "array",
   934                      "items": {
   935                          "$ref": "#/definitions/MappingRule"
   936                      }
   937                  },
   938                  "rollupRules": {
   939                      "type": "array",
   940                      "items": {
   941                          "$ref": "#/definitions/RollupRule"
   942                      }
   943                  }
   944              }
   945          },
   946          "RuleSetChanges": {
   947              "type": "object",
   948              "properties": {
   949                  "mappingRuleChanges": {
   950                      "type": "array",
   951                      "items": {
   952                          "$ref": "#/definitions/MappingRuleChange"
   953                      },
   954                      "description": "list of mapping rule changes"
   955                  },
   956                  "rollupRuleChanges": {
   957                      "type": "array",
   958                      "items": {
   959                          "$ref": "#/definitions/RollupRuleChange"
   960                      },
   961                      "description": "list of rollup rule changes"
   962                  }
   963              }
   964          },
   965          "MappingRuleChange": {
   966              "type": "object",
   967              "properties": {
   968                  "op": {
   969                      "type": "string",
   970                      "enum": ["add", "delete", "change"],
   971                      "description": "type of operation on rule"
   972                  },
   973                  "ruleID": {
   974                      "type": "string",
   975                      "description": "ID of the rule, should be omitted for adds"
   976                  },
   977                  "ruleData": {
   978                      "$ref": "#/definitions/MappingRule",
   979                      "description": "new rule data, can be left empty for deletes"
   980                  }
   981              }
   982          },
   983          "RollupRuleChange": {
   984              "type": "object",
   985              "properties": {
   986                  "op": {
   987                      "type": "string",
   988                      "enum": ["add", "delete", "change"],
   989                      "description": "type of operation on rule"
   990                  },
   991                  "ruleID": {
   992                      "type": "string",
   993                      "description": "ID of the rule, should be omitted for adds"
   994                  },
   995                  "ruleData": {
   996                      "$ref": "#/definitions/RollupRule",
   997                      "description": "new rule data, can be omitted for deletes"
   998                  }
   999              }
  1000          },
  1001          "MappingRuleHistory": {
  1002              "type": "array",
  1003              "items": {
  1004                  "$ref": "#/definitions/MappingRule"
  1005              }
  1006          },
  1007          "MappingRule": {
  1008              "type": "object",
  1009              "properties": {
  1010                  "id": {
  1011                      "type": "string"
  1012                  },
  1013                  "name": {
  1014                      "type": "string"
  1015                  },
  1016                  "filter": {
  1017                      "type": "string"
  1018                  },
  1019                  "aggregation": {
  1020                      "type": "array",
  1021                      "items": {
  1022                          "type": "string"
  1023                      }
  1024                  },
  1025                  "storagePolicies": {
  1026                      "$ref": "#/definitions/StoragePolicies"
  1027                  },
  1028                  "dropPolicy": {
  1029                      "type": "integer"
  1030                  },
  1031                  "cutoverMillis": {
  1032                      "type": "integer"
  1033                  },
  1034                  "lastUpdatedBy": {
  1035                      "type": "string"
  1036                  },
  1037                  "lastUpdatedAtMillis": {
  1038                      "type": "integer"
  1039                  }
  1040              }
  1041          },
  1042          "RollupRuleHistory": {
  1043              "type": "array",
  1044              "items": {
  1045                  "$ref": "#/definitions/RollupRule"
  1046              }
  1047          },
  1048          "RollupRule": {
  1049              "type": "object",
  1050              "properties": {
  1051                  "id": {
  1052                      "type": "string"
  1053                  },
  1054                  "name": {
  1055                      "type": "string"
  1056                  },
  1057                  "filter": {
  1058                      "type": "string"
  1059                  },
  1060                  "cutoverMillis": {
  1061                      "type": "integer"
  1062                  },
  1063                  "targets": {
  1064                      "type": "array",
  1065                      "items": {
  1066                          "$ref": "#/definitions/RollupTarget"
  1067                      }
  1068                  },
  1069                  "lastUpdatedBy": {
  1070                      "type": "string"
  1071                  },
  1072                  "lastUpdatedAtMillis": {
  1073                      "type": "integer"
  1074                  }
  1075             }
  1076          },
  1077          "RollupTarget": {
  1078              "type": "object",
  1079              "properties": {
  1080                  "pipeline": {
  1081                      "$ref": "#/definitions/Pipeline"
  1082                  },
  1083                  "storagePolicies": {
  1084                      "$ref": "#/definitions/StoragePolicies"
  1085                  }
  1086              }
  1087          },
  1088          "Pipeline": {
  1089              "type": "array",
  1090              "items": {}
  1091          },
  1092          "StoragePolicies": {
  1093              "type": "array",
  1094              "items": {
  1095                  "type": "string"
  1096              }
  1097          },
  1098          "ApiResponse": {
  1099              "type": "object",
  1100              "properties": {
  1101                  "code": {
  1102                      "type": "string"
  1103                  },
  1104                  "message": {
  1105                      "type": "string"
  1106                  }
  1107              }
  1108          }
  1109      }
  1110  }