diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 51611b285..3ba8adce9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,6 +37,7 @@ We warmly welcome and appreciate contributions from the community. * [Future Composition](#future-composition) * [Failure Handling](#failure-handling) * [Cassandra Adapters](#cassandra-adapters) + * [REST APIs](#rest-apis) * [Source Code Style](#source-code-style) ## How to Contribute @@ -336,6 +337,21 @@ When adding shims, implement the minimum necessary changes in the new package an For example, if `base`'s minimum version is moved to 5.0, a Cassandra40 adapter package/subproject should be added, with a minimum version of 4.0.0. Within that project, the classes should all be named `Cassandra40*`, so `Cassandra40Adapter`, `Cassandra40Factory`, etc. +### REST APIs +The project maintains an Open API documentation of all the provided REST APIs, located in `server/src/main/resources/openAPI`. +When an API is modified or updated, this documentation needs to be maintained accordingly. For that, please take a look at the folder structure +for the openAPI specification. The main file is called `sidecarApi.yaml`. There, all the endpoints are referenced. Let's take the health endpoint +as an example: +```yaml +paths: + /__health: + $ref: paths/__health.yaml +``` + +That references the definition of the health endpoint, which can be found on the `paths` folder. On those references, we can find further references +to their specific object schemas (which can be found under the `components/schemas` folder). For any common or shared parameters, please use +the `components/parameters folder`. + ## Source Code Style The project provides an diff --git a/server/build.gradle b/server/build.gradle index 54c4c7bb4..b7ce0ad4a 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -30,6 +30,8 @@ plugins { id('maven-publish') // and produces a docker image id('com.google.cloud.tools.jib') version '3.4.4' + // openAPI + id "org.openapi.generator" version "7.11.0" } sourceCompatibility = JavaVersion.VERSION_11 @@ -254,3 +256,15 @@ checkstyleContainerTest.onlyIf { "true" != System.getenv("skipContainerTest") } spotbugsContainerTest.onlyIf { "true" != System.getenv("skipContainerTest") } check.dependsOn containerTest, integrationTest, jacocoTestReport + +// openAPI +openApiValidate { + inputSpec.set("$rootDir/server/src/main/resources/openAPI/sidecarApi.yaml") + recommend.set(true) +} +openApiGenerate { + generatorName.set("html2") + inputSpec.set("$rootDir/server/src/main/resources/openAPI/sidecarApi.yaml") + outputDir.set("$buildDir/apiDocs") +} +compileJava.dependsOn tasks.openApiGenerate \ No newline at end of file diff --git a/server/src/main/resources/openAPI/components/parameters/cdcSegment.yaml b/server/src/main/resources/openAPI/components/parameters/cdcSegment.yaml new file mode 100644 index 000000000..b170064f3 --- /dev/null +++ b/server/src/main/resources/openAPI/components/parameters/cdcSegment.yaml @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +in: path +name: cdcSegment +required: true +schema: + type: string +description: The id of a Cdc segment diff --git a/server/src/main/resources/openAPI/components/parameters/component.yaml b/server/src/main/resources/openAPI/components/parameters/component.yaml new file mode 100644 index 000000000..b92e1dee6 --- /dev/null +++ b/server/src/main/resources/openAPI/components/parameters/component.yaml @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +in: path +name: component +required: true +schema: + type: string +description: Component ID diff --git a/server/src/main/resources/openAPI/components/parameters/index.yaml b/server/src/main/resources/openAPI/components/parameters/index.yaml new file mode 100644 index 000000000..607edc2c7 --- /dev/null +++ b/server/src/main/resources/openAPI/components/parameters/index.yaml @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +in: path +name: index +required: true +schema: + type: string +description: An index to retrieve components from diff --git a/server/src/main/resources/openAPI/components/parameters/jobId.yaml b/server/src/main/resources/openAPI/components/parameters/jobId.yaml new file mode 100644 index 000000000..b6f2480a6 --- /dev/null +++ b/server/src/main/resources/openAPI/components/parameters/jobId.yaml @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +in: path +name: jobId +required: true +schema: + type: string +description: Id of a job diff --git a/server/src/main/resources/openAPI/components/parameters/keyspace.yaml b/server/src/main/resources/openAPI/components/parameters/keyspace.yaml new file mode 100644 index 000000000..a530c1d2f --- /dev/null +++ b/server/src/main/resources/openAPI/components/parameters/keyspace.yaml @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +in: path +required: true +name: keyspace +schema: + type: string +description: Keyspace name diff --git a/server/src/main/resources/openAPI/components/parameters/snapshot.yaml b/server/src/main/resources/openAPI/components/parameters/snapshot.yaml new file mode 100644 index 000000000..531cc9fdf --- /dev/null +++ b/server/src/main/resources/openAPI/components/parameters/snapshot.yaml @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +in: path +name: snapshot +required: true +schema: + type: string +description: The snapshot ID diff --git a/server/src/main/resources/openAPI/components/parameters/table.yaml b/server/src/main/resources/openAPI/components/parameters/table.yaml new file mode 100644 index 000000000..d68c800d4 --- /dev/null +++ b/server/src/main/resources/openAPI/components/parameters/table.yaml @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +in: path +name: table +required: true +schema: + type: string +description: Table name diff --git a/server/src/main/resources/openAPI/components/parameters/uploadId.yaml b/server/src/main/resources/openAPI/components/parameters/uploadId.yaml new file mode 100644 index 000000000..adc611cc8 --- /dev/null +++ b/server/src/main/resources/openAPI/components/parameters/uploadId.yaml @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +in: path +name: uploadId +required: true +schema: + type: string +description: The id of a SSTable upload diff --git a/server/src/main/resources/openAPI/components/schemas/cdcSegmentInfo.yaml b/server/src/main/resources/openAPI/components/schemas/cdcSegmentInfo.yaml new file mode 100644 index 000000000..d10769ed1 --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/cdcSegmentInfo.yaml @@ -0,0 +1,40 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +description: The information of a cdc segment +properties: + name: + type: string + description: Cdc segment name + example: someName + size: + type: number + description: Cdc segment size + example: 1000 + idx: + type: number + description: Cdc segment index + example: 1 + completed: + type: boolean + description: Flag indicating if the segment has been completed + example: true + lastModifiedTimestamp: + type: number + description: When was the cdc segment last modified + example: 1234 diff --git a/server/src/main/resources/openAPI/components/schemas/cdcSegmentsResponse.yaml b/server/src/main/resources/openAPI/components/schemas/cdcSegmentsResponse.yaml new file mode 100644 index 000000000..d5803cc76 --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/cdcSegmentsResponse.yaml @@ -0,0 +1,32 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +description: The response for list cdc segments call +properties: + host: + type: string + description: The host containing the segment + example: someName + port: + type: integer + description: The port of the host containing the segment + example: 80 + segmentInfos: + type: array + items: + $ref: ./cdcSegmentInfo.yaml diff --git a/server/src/main/resources/openAPI/components/schemas/clientConnectionEntry.yaml b/server/src/main/resources/openAPI/components/schemas/clientConnectionEntry.yaml new file mode 100644 index 000000000..296b7573a --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/clientConnectionEntry.yaml @@ -0,0 +1,82 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +description: Details of a client connection +properties: + address: + type: string + description: The client address + example: 127.0.0.1 + port: + type: integer + description: The client port + example: 8080 + sslEnabled: + type: boolean + description: Flag of enabled ssl + example: true + sslCipherSuite: + type: string + description: The name of the ssl cipher suite used + example: ECDHE-ECDSA-AES256-GCM-SHA384 + sslProtocol: + type: string + description: SSL protocol being used by the client + example: SSL + protocolVersion: + type: string + description: SSL protocol version being used by the client + example: 1.2 + username: + type: string + description: User used by the client + example: someUser + requestCount: + type: number + description: Number of requests performed by the client + example: 1000 + driverName: + type: string + description: The name of the client driver + example: someDriver + driverVersion: + type: string + description: The version of the client driver + example: 2 + clientOptions: + type: object + description: Extra options used by the client + additionalProperties: true + example: + foo: bar + baz: bam + keyspaceName: + type: string + description: The client keyspace + example: someKeyspace + authenticationMode: + type: string + description: The client used authentication mode + example: basic + authenticationMetadata: + type: object + description: Extra authentication metadata used by the client + additionalProperties: true + example: + foo: bar + baz: bam diff --git a/server/src/main/resources/openAPI/components/schemas/connectedClientStatsResponse.yaml b/server/src/main/resources/openAPI/components/schemas/connectedClientStatsResponse.yaml new file mode 100644 index 000000000..679f88168 --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/connectedClientStatsResponse.yaml @@ -0,0 +1,35 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + clientConnections: + type: array + description: List of all the connected clients + items: + $ref: ./clientConnectionEntry.yaml + totalConnectedClients: + type: number + description: Number of connected clients + example: 1000 + connectionsByUser: + type: object + description: Map of number of connections by user + additionalProperties: true + example: + foo: 1000 + baz: 2000 diff --git a/server/src/main/resources/openAPI/components/schemas/consistencyConfig.yaml b/server/src/main/resources/openAPI/components/schemas/consistencyConfig.yaml new file mode 100644 index 000000000..2b4ad910f --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/consistencyConfig.yaml @@ -0,0 +1,34 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + consistencyLevel: + type: string + description: Cassandra consistency level + enum: + - ONE + - TWO + - LOCAL_ONE + - LOCAL_QUORUM + - EACH_QUORUM + - QUORUM + - ALL + localDatacenter: + type: string + description: The local datacenter + example: DC1 diff --git a/server/src/main/resources/openAPI/components/schemas/createRestoreJobRequest.yaml b/server/src/main/resources/openAPI/components/schemas/createRestoreJobRequest.yaml new file mode 100644 index 000000000..099487216 --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/createRestoreJobRequest.yaml @@ -0,0 +1,38 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + jobId: + type: string + format: uuid + description: Id of the job to be restored + example: 7bdaf3e4-27e6-4268-982e-79b3e450a1cb + jobAgent: + type: string + description: The agent of the job + example: someJobAgent + secrets: + $ref: ./restoreJobSecrets.yaml + importOptions: + $ref: ./ssTableImportRequest.yaml + expireAtInMillis: + type: number + description: When should the job expire + example: 1000 + consistencyConfig: + $ref: ./consistencyConfig.yaml diff --git a/server/src/main/resources/openAPI/components/schemas/createRestoreJobResponse.yaml b/server/src/main/resources/openAPI/components/schemas/createRestoreJobResponse.yaml new file mode 100644 index 000000000..f05bb792b --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/createRestoreJobResponse.yaml @@ -0,0 +1,28 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + jobId: + type: string + format: uuid + description: Id of the job to be restored + example: 7bdaf3e4-27e6-4268-982e-79b3e450a1cb + status: + type: string + description: Status of the job + example: OK diff --git a/server/src/main/resources/openAPI/components/schemas/createSliceRequest.yaml b/server/src/main/resources/openAPI/components/schemas/createSliceRequest.yaml new file mode 100644 index 000000000..ab28f276b --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/createSliceRequest.yaml @@ -0,0 +1,55 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + sliceId: + type: string + description: The id of the slice + example: someSliceId + bucketId: + type: integer + description: The bucket id for the slice + example: 1 + bucket: + type: string + description: Bucket name + example: someBuclet + key: + type: string + description: Key name + example: someKey + checksum: + type: string + description: Checksum of the slice + example: someChecksum + startToken: + type: number + description: Starting token + example: 1 + endToken: + type: number + description: End token + example: 100 + uncompressedSize: + type: number + description: Uncompressed size of the slice + example: 100 + compressedSize: + type: number + description: Compressed size of the slice + example: 50 diff --git a/server/src/main/resources/openAPI/components/schemas/createSnapshotRequest.yaml b/server/src/main/resources/openAPI/components/schemas/createSnapshotRequest.yaml new file mode 100644 index 000000000..175a519e3 --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/createSnapshotRequest.yaml @@ -0,0 +1,33 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + snapshotName: + type: string + description: Name for the snapshot + example: someSnapshot + includeSecondaryIndexFiles: + type: boolean + description: Whether or not to include the secondary index files in the snapshot + example: someSnapshot + qualifiedTableName: + $ref: ./qualifiedTableName.yaml + ttl: + type: string + description: Time to live for the snapshot + example: 123 diff --git a/server/src/main/resources/openAPI/components/schemas/healthCheckResponse.yaml b/server/src/main/resources/openAPI/components/schemas/healthCheckResponse.yaml new file mode 100644 index 000000000..dd80e2c3d --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/healthCheckResponse.yaml @@ -0,0 +1,24 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + status: + type: string + description: Health Status + examples: + - OK diff --git a/server/src/main/resources/openAPI/components/schemas/nodeSettings.yaml b/server/src/main/resources/openAPI/components/schemas/nodeSettings.yaml new file mode 100644 index 000000000..12b9365f0 --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/nodeSettings.yaml @@ -0,0 +1,54 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + releaseVersion: + type: string + description: Version of the release present in the node + example: 5 + partitioner: + type: string + description: Partitioner used in the node + example: partitioner + datacenter: + type: string + description: Node datacenter + example: DC1 + rpcAddress: + type: string + description: Node rpcAddress + example: 127.0.0.1 + rpcPort: + type: integer + description: Node port + example: 8080 + tokens: + type: array + description: Tokens present in the node + items: + type: string + example: + - a001 + - a002 + sidecar: + type: object + description: Node port + additionalProperties: true + example: + foo: bar + bam: baz diff --git a/server/src/main/resources/openAPI/components/schemas/qualifiedTableName.yaml b/server/src/main/resources/openAPI/components/schemas/qualifiedTableName.yaml new file mode 100644 index 000000000..a30d0bb2f --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/qualifiedTableName.yaml @@ -0,0 +1,25 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + keyspace: + type: string + example: someKeyspace + table: + type: string + example: someTable diff --git a/server/src/main/resources/openAPI/components/schemas/replicaInfo.yaml b/server/src/main/resources/openAPI/components/schemas/replicaInfo.yaml new file mode 100644 index 000000000..5a11d9bf3 --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/replicaInfo.yaml @@ -0,0 +1,38 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + start: + type: string + description: Token Range start + example: 1 + end: + type: string + description: Token Range end + example: 1000 + replicas: + type: object + additionalProperties: true + description: Map with all the replicas information + example: + replica1: + - foo + - bar + replica2: + - bam + - baz diff --git a/server/src/main/resources/openAPI/components/schemas/replicaInfoResponse.yaml b/server/src/main/resources/openAPI/components/schemas/replicaInfoResponse.yaml new file mode 100644 index 000000000..b61e422dc --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/replicaInfoResponse.yaml @@ -0,0 +1,48 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + readReplicas: + type: array + description: List of read replicas information + items: + $ref: ./replicaInfo.yaml + writeReplicas: + type: array + description: List of write replicas information + items: + $ref: ./replicaInfo.yaml + replicas: + type: object + additionalProperties: true + description: Map with all the replicas metadata + example: + replica1: + state: OK + status: UP + fqdn: somefqdn + address: 127.0.0.1 + port: 80 + datacenter: DC1 + replica2: + state: OK + status: UP + fqdn: somefqdn + address: 127.0.0.1 + port: 80 + datacenter: DC1 diff --git a/server/src/main/resources/openAPI/components/schemas/restoreJobProgressResponse.yaml b/server/src/main/resources/openAPI/components/schemas/restoreJobProgressResponse.yaml new file mode 100644 index 000000000..ac4494278 --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/restoreJobProgressResponse.yaml @@ -0,0 +1,58 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + message: + type: string + description: Message about the progress of the restore job + example: Some message + status: + type: string + description: Job status + enum: + - SATISFIED + - PENDING + - FAILED + failedRanges: + type: array + description: Failed ranges + items: + $ref: ./restoredRange.yaml + abortedRanges: + type: array + description: Aborted ranges + items: + $ref: ./restoredRange.yaml + pendingRanges: + type: array + description: Pending ranges + items: + $ref: ./restoredRange.yaml + succeededRanges: + type: array + description: Succeeded ranges + items: + $ref: ./restoredRange.yaml + expireAtInMillis: + type: number + description: When should the job expire + example: 1000 + sliceCount: + type: number + description: Number of slices + example: 100 diff --git a/server/src/main/resources/openAPI/components/schemas/restoreJobSecrets.yaml b/server/src/main/resources/openAPI/components/schemas/restoreJobSecrets.yaml new file mode 100644 index 000000000..1109a75a0 --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/restoreJobSecrets.yaml @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + writeCredentials: + $ref: ./storageCredentials.yaml + readCredentials: + $ref: ./storageCredentials.yaml diff --git a/server/src/main/resources/openAPI/components/schemas/restoreJobSummary.yaml b/server/src/main/resources/openAPI/components/schemas/restoreJobSummary.yaml new file mode 100644 index 000000000..db79f45a2 --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/restoreJobSummary.yaml @@ -0,0 +1,46 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + createdAt: + type: string + description: Time when the restore job was created + example: 1234 + jobId: + type: string + format: uuid + description: Id of the job to be restored + example: 7bdaf3e4-27e6-4268-982e-79b3e450a1cb + jobAgent: + type: string + description: The agent executing the job + example: someAgent + keyspace: + type: string + description: The job's keyspace + example: someKeyspace + table: + type: string + description: The job's table + example: someTable + secrets: + $ref: ./restoreJobSecrets.yaml + status: + type: string + description: Status of the job + example: OK diff --git a/server/src/main/resources/openAPI/components/schemas/restoredRange.yaml b/server/src/main/resources/openAPI/components/schemas/restoredRange.yaml new file mode 100644 index 000000000..1bf6d6202 --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/restoredRange.yaml @@ -0,0 +1,43 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + sliceId: + type: string + description: The id of the slice + example: someSliceId + bucketId: + type: integer + description: The id of the bucket + example: 1 + bucket: + type: string + description: The bucket name + example: somebucket + key: + type: string + description: The key of the range + example: someKey + startToken: + type: number + description: The first token of the range + example: 1 + endToken: + type: number + description: The last token of the range + example: 100 diff --git a/server/src/main/resources/openAPI/components/schemas/ringEntry.yaml b/server/src/main/resources/openAPI/components/schemas/ringEntry.yaml new file mode 100644 index 000000000..626a346de --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/ringEntry.yaml @@ -0,0 +1,63 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + datacenter: + type: string + description: The instance datacenter + example: DC1 + address: + type: string + description: The instance address + example: 127.0.0.1 + port: + type: integer + description: The instance port + example: 8080 + rack: + type: string + description: The instance rack + example: rack1 + status: + type: string + description: The instance status + example: OK + state: + type: string + description: The instance state + example: UP + load: + type: string + description: The instance load + example: 0 + owns: + type: string + description: The instance owner + example: ownerName + token: + type: string + description: The instance owned token + example: 1 + fdqn: + type: string + description: The instance fdqn + example: fdqn1 + hostId: + type: string + description: The instance hostId + example: hostId1 diff --git a/server/src/main/resources/openAPI/components/schemas/ringEntryList.yaml b/server/src/main/resources/openAPI/components/schemas/ringEntryList.yaml new file mode 100644 index 000000000..8841db486 --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/ringEntryList.yaml @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: array +items: + $ref: ./ringEntry.yaml diff --git a/server/src/main/resources/openAPI/components/schemas/schemaResponse.yaml b/server/src/main/resources/openAPI/components/schemas/schemaResponse.yaml new file mode 100644 index 000000000..e8414728a --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/schemaResponse.yaml @@ -0,0 +1,26 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + keyspace: + type: string + example: someKeyspace + schema: + type: string + description: CQL schema + example: diff --git a/server/src/main/resources/openAPI/components/schemas/snapshotFileInfo.yaml b/server/src/main/resources/openAPI/components/schemas/snapshotFileInfo.yaml new file mode 100644 index 000000000..c26abb538 --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/snapshotFileInfo.yaml @@ -0,0 +1,55 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + size: + type: number + description: The size of the snapshot file + example: 123 + host: + type: string + description: The host hosting the snapshot file + example: 127.0.0.1 + port: + type: integer + description: The port of the host hosting the snapshot file + example: 8080 + dataDirIndex: + type: integer + description: The index of the data directory containing the snapshot file + example: 1 + snapshotName: + type: string + description: The name of the snapshot + example: snapshot-123 + keySpaceName: + type: string + description: The keyspace the snapshot file pertains to + example: someKeyspace + tableName: + type: string + description: The name of the table the snapshot file pertains to + example: someTable + fileName: + type: string + description: The name of the snapshot file + example: snapshotFile + componentDownloadUrl: + type: string + description: The url to download the snapshot file from + example: http://127.0.0.1/api/v1/keyspaces/ks/tables/t/snapshots/s/components/c diff --git a/server/src/main/resources/openAPI/components/schemas/snapshotFileInfoList.yaml b/server/src/main/resources/openAPI/components/schemas/snapshotFileInfoList.yaml new file mode 100644 index 000000000..a0709b15a --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/snapshotFileInfoList.yaml @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: array +items: + $ref: ./snapshotFileInfo.yaml diff --git a/server/src/main/resources/openAPI/components/schemas/ssTableImportRequest.yaml b/server/src/main/resources/openAPI/components/schemas/ssTableImportRequest.yaml new file mode 100644 index 000000000..df1d1ac41 --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/ssTableImportRequest.yaml @@ -0,0 +1,47 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + resetLevel: + type: boolean + description: Flag stating the reset level + example: true + clearRepaired: + type: boolean + description: Flag to clear the repaired files + example: true + verifySSTables: + type: boolean + description: Flag to verify the SSTables + example: true + verifyTokens: + type: boolean + description: Flag to verify the tokens + example: true + invalidateCaches: + type: boolean + description: Flag to invalidate the caches + example: true + extendedVerify: + type: boolean + description: Flag to extend the verify + example: true + copyData: + type: boolean + description: Flag to copy the data + example: true diff --git a/server/src/main/resources/openAPI/components/schemas/ssTableImportResponse.yaml b/server/src/main/resources/openAPI/components/schemas/ssTableImportResponse.yaml new file mode 100644 index 000000000..2a13fa599 --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/ssTableImportResponse.yaml @@ -0,0 +1,35 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + success: + type: boolean + description: Flag with the success of the import + example: true + uploadId: + type: string + description: Id of the upload + example: someId + keyspace: + type: string + description: Name of the SSTable keyspace + example: someKeyspace + tableName: + type: string + description: Name of the SSTable table + example: someTable diff --git a/server/src/main/resources/openAPI/components/schemas/ssTableUploadResponse.yaml b/server/src/main/resources/openAPI/components/schemas/ssTableUploadResponse.yaml new file mode 100644 index 000000000..b369a201b --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/ssTableUploadResponse.yaml @@ -0,0 +1,31 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + uploadId: + type: string + description: Id of the upload + example: someId + uploadSizeBytes: + type: number + description: Number of bytes of the uploaded file + example: 1000 + serviceTimeMillis: + type: number + description: Time that took to upload the file in millis + example: 1000 diff --git a/server/src/main/resources/openAPI/components/schemas/storageCredentials.yaml b/server/src/main/resources/openAPI/components/schemas/storageCredentials.yaml new file mode 100644 index 000000000..b3cd23056 --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/storageCredentials.yaml @@ -0,0 +1,35 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + accessKeyId: + type: string + description: Access Key Id + example: someAccessKey + secretAccessKey: + type: string + description: Secret Access Key + example: someSecret + sessionToken: + type: string + description: Session token + example: someToken + region: + type: string + description: Storage region + example: someSecret diff --git a/server/src/main/resources/openAPI/components/schemas/streamStatsResponse.yaml b/server/src/main/resources/openAPI/components/schemas/streamStatsResponse.yaml new file mode 100644 index 000000000..a78d2b247 --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/streamStatsResponse.yaml @@ -0,0 +1,25 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + operationMode: + type: string + description: The operation Mode + example: Mode + streamsProgressStats: + $ref: ./streamsProgressStats.yaml diff --git a/server/src/main/resources/openAPI/components/schemas/streamsProgressStats.yaml b/server/src/main/resources/openAPI/components/schemas/streamsProgressStats.yaml new file mode 100644 index 000000000..5044a48cf --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/streamsProgressStats.yaml @@ -0,0 +1,51 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + totalFilesToReceive: + type: number + description: The amount of files to be received + example: 1000 + totalFilesReceived: + type: number + description: The amount of files that have been received + example: 1000 + totalBytesToReceive: + type: number + description: The amount of bytes to be received + example: 1000 + totalBytesReceived: + type: number + description: The amount of bytes that have been received + example: 1000 + totalFilesToSend: + type: number + description: The amount of files to be sent + example: 1000 + totalFilesSent: + type: number + description: The amount of files that have been sent + example: 1000 + totalBytesToSend: + type: number + description: The amount of bytes to be sent + example: 1000 + totalBytesSent: + type: number + description: The amount of bytes that have been sent + example: 1000 diff --git a/server/src/main/resources/openAPI/components/schemas/timeSkewResponse.yaml b/server/src/main/resources/openAPI/components/schemas/timeSkewResponse.yaml new file mode 100644 index 000000000..bb462bdb8 --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/timeSkewResponse.yaml @@ -0,0 +1,27 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + currentTime: + type: number + description: Current time on the instance + example: 1000 + allowableSkewInMinutes: + type: integer + description: Allowable skew time in minutes + example: 10 diff --git a/server/src/main/resources/openAPI/components/schemas/updateRestoreJobRequest.yaml b/server/src/main/resources/openAPI/components/schemas/updateRestoreJobRequest.yaml new file mode 100644 index 000000000..075f358f4 --- /dev/null +++ b/server/src/main/resources/openAPI/components/schemas/updateRestoreJobRequest.yaml @@ -0,0 +1,43 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +type: object +properties: + jobAgent: + type: string + description: The agent of the job + example: someJobAgent + secrets: + $ref: ./restoreJobSecrets.yaml + status: + type: string + enum: + - CREATED + - STAGE_READY + - STAGED + - IMPORT_READY + - FAILED + - ABORTED + - SUCCEEDED + expireAtInMillis: + type: number + description: When should the job expire + example: 1000 + sliceCount: + type: number + description: Number of slices + example: 100 diff --git a/server/src/main/resources/openAPI/paths/__health.yaml b/server/src/main/resources/openAPI/paths/__health.yaml new file mode 100644 index 000000000..5dd24fe1a --- /dev/null +++ b/server/src/main/resources/openAPI/paths/__health.yaml @@ -0,0 +1,31 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - healthchecks + operationId: healthcheck + description: Check health + summary: Endpoint used to perform health checks against a Sidecar instance + security: [] + responses: + '200': + description: Healthy + content: + application/json: + schema: + $ref: ../components/schemas/healthCheckResponse.yaml diff --git a/server/src/main/resources/openAPI/paths/cassandra___health.yaml b/server/src/main/resources/openAPI/paths/cassandra___health.yaml new file mode 100644 index 000000000..aaa3e61ed --- /dev/null +++ b/server/src/main/resources/openAPI/paths/cassandra___health.yaml @@ -0,0 +1,31 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - healthchecks + operationId: cassandraHealthcheck + description: Check health + summary: Endpoint used to perform health checks to a Cassandra instance + security: [] + responses: + '200': + description: Healthy + content: + application/json: + schema: + $ref: ../components/schemas/healthCheckResponse.yaml diff --git a/server/src/main/resources/openAPI/paths/cassandra_gossip.yaml b/server/src/main/resources/openAPI/paths/cassandra_gossip.yaml new file mode 100644 index 000000000..b24db018b --- /dev/null +++ b/server/src/main/resources/openAPI/paths/cassandra_gossip.yaml @@ -0,0 +1,39 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - gossip + operationId: gossipInfo + description: Get Gossip info + summary: Gets all the gossip protocol related info + security: + - mTLS: [] + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + additionalProperties: true + description: Map with all the instances gossip information + example: + instance1: + heartbeat: bar + instance2: + heartbeat: baz diff --git a/server/src/main/resources/openAPI/paths/cassandra_gossip___health.yaml b/server/src/main/resources/openAPI/paths/cassandra_gossip___health.yaml new file mode 100644 index 000000000..51afb18fa --- /dev/null +++ b/server/src/main/resources/openAPI/paths/cassandra_gossip___health.yaml @@ -0,0 +1,31 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - healthchecks + operationId: cassandraGossipHealthcheck + description: Check Gossip health + summary: Endpoint used to check the gossip health of a Cassandra instance + security: [] + responses: + '200': + description: Healthy + content: + application/json: + schema: + $ref: ../components/schemas/healthCheckResponse.yaml diff --git a/server/src/main/resources/openAPI/paths/cassandra_jmx___health.yaml b/server/src/main/resources/openAPI/paths/cassandra_jmx___health.yaml new file mode 100644 index 000000000..fe465eeab --- /dev/null +++ b/server/src/main/resources/openAPI/paths/cassandra_jmx___health.yaml @@ -0,0 +1,31 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - healthchecks + operationId: jmxHealthcheck + description: Check health + summary: Endpoint used to perform health checks to for JMX connection + security: [] + responses: + '200': + description: Healthy + content: + application/json: + schema: + $ref: ../components/schemas/healthCheckResponse.yaml diff --git a/server/src/main/resources/openAPI/paths/cassandra_native___health.yaml b/server/src/main/resources/openAPI/paths/cassandra_native___health.yaml new file mode 100644 index 000000000..61224455e --- /dev/null +++ b/server/src/main/resources/openAPI/paths/cassandra_native___health.yaml @@ -0,0 +1,31 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - healthchecks + operationId: cassandraNativeHealthcheck + description: Check health + summary: Endpoint used to perform health checks to for native connection + security: [] + responses: + '200': + description: Healthy + content: + application/json: + schema: + $ref: ../components/schemas/healthCheckResponse.yaml diff --git a/server/src/main/resources/openAPI/paths/cassandra_ring.yaml b/server/src/main/resources/openAPI/paths/cassandra_ring.yaml new file mode 100644 index 000000000..282651901 --- /dev/null +++ b/server/src/main/resources/openAPI/paths/cassandra_ring.yaml @@ -0,0 +1,32 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - ring + operationId: getRing + description: Gets the ring status + summary: This endpoint retrieves the information related to ring + security: + - mTLS: [] + responses: + '200': + description: Ring status + content: + application/json: + schema: + $ref: ../components/schemas/ringEntryList.yaml diff --git a/server/src/main/resources/openAPI/paths/cassandra_ring_keyspaces_keyspace.yaml b/server/src/main/resources/openAPI/paths/cassandra_ring_keyspaces_keyspace.yaml new file mode 100644 index 000000000..dfe73ef83 --- /dev/null +++ b/server/src/main/resources/openAPI/paths/cassandra_ring_keyspaces_keyspace.yaml @@ -0,0 +1,34 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - ring + operationId: getRingPerKeyspace + description: Gets the ring status for a keyspace + summary: This endpoint retrieves the information related to ring for a given keyspace + security: + - mTLS: [] + parameters: + - $ref: ../components/parameters/keyspace.yaml + responses: + '200': + description: Ring status + content: + application/json: + schema: + $ref: ../components/schemas/ringEntryList.yaml diff --git a/server/src/main/resources/openAPI/paths/cassandra_schema.yaml b/server/src/main/resources/openAPI/paths/cassandra_schema.yaml new file mode 100644 index 000000000..fc1684bff --- /dev/null +++ b/server/src/main/resources/openAPI/paths/cassandra_schema.yaml @@ -0,0 +1,32 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - keyspaces + operationId: listAllKeyspaces + description: Gets all the keyspaces from the database + summary: Endpoint to retrieve the schemas of a database, in all of the user keyspaces + security: + - mTLS: [] + responses: + '200': + description: List of keyspaces + content: + application/json: + schema: + $ref: ../components/schemas/schemaResponse.yaml diff --git a/server/src/main/resources/openAPI/paths/cassandra_settings.yaml b/server/src/main/resources/openAPI/paths/cassandra_settings.yaml new file mode 100644 index 000000000..cbc6e74c2 --- /dev/null +++ b/server/src/main/resources/openAPI/paths/cassandra_settings.yaml @@ -0,0 +1,32 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - settings + operationId: nodeSettings + description: Get the settings of a node + summary: Endpoint used to retrieve the current settings of a Cassandra node + security: + - mTLS: [] + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: ../components/schemas/nodeSettings.yaml diff --git a/server/src/main/resources/openAPI/paths/cassandra_stats_stats_connected-clients.yaml b/server/src/main/resources/openAPI/paths/cassandra_stats_stats_connected-clients.yaml new file mode 100644 index 000000000..e08eef554 --- /dev/null +++ b/server/src/main/resources/openAPI/paths/cassandra_stats_stats_connected-clients.yaml @@ -0,0 +1,32 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - stats + operationId: getClientStats + description: Gets stats of connected clients + summary: Endpoint to retrieve the information related to connected clients to the database + security: + - mTLS: [] + responses: + '200': + description: Connected clients stats + content: + application/json: + schema: + $ref: ../components/schemas/connectedClientStatsResponse.yaml diff --git a/server/src/main/resources/openAPI/paths/cassandra_stats_streams.yaml b/server/src/main/resources/openAPI/paths/cassandra_stats_streams.yaml new file mode 100644 index 000000000..548e8fc29 --- /dev/null +++ b/server/src/main/resources/openAPI/paths/cassandra_stats_streams.yaml @@ -0,0 +1,32 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - stats + operationId: getStreamStats + description: Gets stats of streams + summary: Endpoint to retrieve the information related to streams + security: + - mTLS: [] + responses: + '200': + description: Stream stats + content: + application/json: + schema: + $ref: "../components/schemas/streamStatsResponse.yaml" diff --git a/server/src/main/resources/openAPI/paths/cdc_segments.yaml b/server/src/main/resources/openAPI/paths/cdc_segments.yaml new file mode 100644 index 000000000..d824d3054 --- /dev/null +++ b/server/src/main/resources/openAPI/paths/cdc_segments.yaml @@ -0,0 +1,32 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - cdc + operationId: listCdcSegment + description: List all the cdc segments + summary: Endpoint used to list the pending cdc segments + security: + - mTLS: [] + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: ../components/schemas/cdcSegmentsResponse.yaml diff --git a/server/src/main/resources/openAPI/paths/cdc_segments_cdcSegment.yaml b/server/src/main/resources/openAPI/paths/cdc_segments_cdcSegment.yaml new file mode 100644 index 000000000..84165dd5b --- /dev/null +++ b/server/src/main/resources/openAPI/paths/cdc_segments_cdcSegment.yaml @@ -0,0 +1,35 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - cdc + operationId: streamCdcSegment + description: Get CDC Segment + summary: Endpoint get a specific cdc segment information + security: + - mTLS: [] + parameters: + - $ref: ../components/parameters/cdcSegment.yaml + responses: + '200': + description: Success + content: + application/octet-stream: + schema: + type: string + format: binary diff --git a/server/src/main/resources/openAPI/paths/keyspace_keyspace_table_table_snapshots_snapshot.yaml b/server/src/main/resources/openAPI/paths/keyspace_keyspace_table_table_snapshots_snapshot.yaml new file mode 100644 index 000000000..9fb25972b --- /dev/null +++ b/server/src/main/resources/openAPI/paths/keyspace_keyspace_table_table_snapshots_snapshot.yaml @@ -0,0 +1,37 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - snapshots + operationId: deprecatedGetSnapshots + description: Get snapshot information + summary: Deprecated endpoint to get the information of a given snapshot + security: + - mTLS: [] + deprecated: true + parameters: + - $ref: ../components/parameters/keyspace.yaml + - $ref: ../components/parameters/table.yaml + - $ref: ../components/parameters/snapshot.yaml + responses: + '200': + description: Stream of the component + content: + application/octet-stream: + schema: + $ref: ../components/schemas/snapshotFileInfoList.yaml diff --git a/server/src/main/resources/openAPI/paths/keyspace_keyspace_table_table_snapshots_snapshot_components_component.yaml b/server/src/main/resources/openAPI/paths/keyspace_keyspace_table_table_snapshots_snapshot_components_component.yaml new file mode 100644 index 000000000..318bb122a --- /dev/null +++ b/server/src/main/resources/openAPI/paths/keyspace_keyspace_table_table_snapshots_snapshot_components_component.yaml @@ -0,0 +1,39 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - components + operationId: deprecatedGetComponent + description: Get the component from a snapshot + summary: Deprecated endpoint to get the component from a given snapshot + security: + - mTLS: [] + deprecated: true + parameters: + - $ref: ../components/parameters/keyspace.yaml + - $ref: ../components/parameters/table.yaml + - $ref: ../components/parameters/snapshot.yaml + - $ref: ../components/parameters/component.yaml + responses: + '200': + description: Stream of the component + content: + application/octet-stream: + schema: + type: string + format: binary diff --git a/server/src/main/resources/openAPI/paths/keyspaces_keyspace_schema.yaml b/server/src/main/resources/openAPI/paths/keyspaces_keyspace_schema.yaml new file mode 100644 index 000000000..119dd59d0 --- /dev/null +++ b/server/src/main/resources/openAPI/paths/keyspaces_keyspace_schema.yaml @@ -0,0 +1,34 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - keyspaces + operationId: getAKeyspaces + description: Gets Schema + summary: Gets the schemas from a keyspace + security: + - mTLS: [] + parameters: + - $ref: ../components/parameters/keyspace.yaml + responses: + '200': + description: List of keyspaces + content: + application/json: + schema: + $ref: ../components/schemas/schemaResponse.yaml diff --git a/server/src/main/resources/openAPI/paths/keyspaces_keyspace_tables_table_restore-jobs.yaml b/server/src/main/resources/openAPI/paths/keyspaces_keyspace_tables_table_restore-jobs.yaml new file mode 100644 index 000000000..e8ae62bdd --- /dev/null +++ b/server/src/main/resources/openAPI/paths/keyspaces_keyspace_tables_table_restore-jobs.yaml @@ -0,0 +1,41 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +post: + tags: + - jobs + operationId: createRestoreJob + description: Create Restore Job + summary: Endpoint used to create a restore job + security: + - mTLS: [] + parameters: + - $ref: ../components/parameters/keyspace.yaml + - $ref: ../components/parameters/table.yaml + requestBody: + description: Restore Job Payload + content: + application/json: + schema: + $ref: ../components/schemas/createRestoreJobRequest.yaml + responses: + '200': + description: Job Restored + content: + application/json: + schema: + $ref: ../components/schemas/createRestoreJobResponse.yaml diff --git a/server/src/main/resources/openAPI/paths/keyspaces_keyspace_tables_table_restore-jobs_jobId.yaml b/server/src/main/resources/openAPI/paths/keyspaces_keyspace_tables_table_restore-jobs_jobId.yaml new file mode 100644 index 000000000..6c901d59e --- /dev/null +++ b/server/src/main/resources/openAPI/paths/keyspaces_keyspace_tables_table_restore-jobs_jobId.yaml @@ -0,0 +1,57 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - jobs + operationId: getRestoreJob + description: Get restore job info + summary: Endpoint used to get a restore job information + security: + - mTLS: [] + parameters: + - $ref: ../components/parameters/jobId.yaml + - $ref: ../components/parameters/keyspace.yaml + - $ref: ../components/parameters/table.yaml + responses: + '200': + description: Job Restored + content: + application/json: + schema: + $ref: ../components/schemas/restoreJobSummary.yaml +patch: + tags: + - jobs + operationId: patchRestoreJob + description: Modify Restore Job + summary: Endpoint used to modify a restore job info + security: + - mTLS: [] + parameters: + - $ref: ../components/parameters/jobId.yaml + - $ref: ../components/parameters/keyspace.yaml + - $ref: ../components/parameters/table.yaml + requestBody: + description: Patch restore Job Payload + content: + application/json: + schema: + $ref: ../components/schemas/updateRestoreJobRequest.yaml + responses: + '200': + description: Success diff --git a/server/src/main/resources/openAPI/paths/keyspaces_keyspace_tables_table_restore-jobs_jobId_abort.yaml b/server/src/main/resources/openAPI/paths/keyspaces_keyspace_tables_table_restore-jobs_jobId_abort.yaml new file mode 100644 index 000000000..27e911880 --- /dev/null +++ b/server/src/main/resources/openAPI/paths/keyspaces_keyspace_tables_table_restore-jobs_jobId_abort.yaml @@ -0,0 +1,43 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +post: + tags: + - jobs + operationId: abortRestoreJob + description: Abort restore job + summary: Endpoint used to abort a restore job + security: + - mTLS: [] + parameters: + - $ref: ../components/parameters/jobId.yaml + - $ref: ../components/parameters/keyspace.yaml + - $ref: ../components/parameters/table.yaml + requestBody: + description: Restore Job Payload + content: + application/json: + schema: + type: object + properties: + reason: + type: string + description: The reason for aborting the restore job + example: Some Reason + responses: + '200': + description: Success diff --git a/server/src/main/resources/openAPI/paths/keyspaces_keyspace_tables_table_restore-jobs_jobId_progress.yaml b/server/src/main/resources/openAPI/paths/keyspaces_keyspace_tables_table_restore-jobs_jobId_progress.yaml new file mode 100644 index 000000000..ab0986406 --- /dev/null +++ b/server/src/main/resources/openAPI/paths/keyspaces_keyspace_tables_table_restore-jobs_jobId_progress.yaml @@ -0,0 +1,36 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - jobs + operationId: getRestoreJobProgress + description: Get Restore Job Progress + summary: Endpoint used to get a restore job progress information + security: + - mTLS: [] + parameters: + - $ref: ../components/parameters/jobId.yaml + - $ref: ../components/parameters/keyspace.yaml + - $ref: ../components/parameters/table.yaml + responses: + '200': + description: Job restore progress info + content: + application/json: + schema: + $ref: ../components/schemas/restoreJobProgressResponse.yaml diff --git a/server/src/main/resources/openAPI/paths/keyspaces_keyspace_tables_table_restore-jobs_jobId_slices.yaml b/server/src/main/resources/openAPI/paths/keyspaces_keyspace_tables_table_restore-jobs_jobId_slices.yaml new file mode 100644 index 000000000..baa641be7 --- /dev/null +++ b/server/src/main/resources/openAPI/paths/keyspaces_keyspace_tables_table_restore-jobs_jobId_slices.yaml @@ -0,0 +1,38 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +post: + tags: + - jobs + operationId: createRestoreJobSlice + description: Create Job Slice + summary: Endpoint used to create a restore job slice + security: + - mTLS: [] + parameters: + - $ref: ../components/parameters/jobId.yaml + - $ref: ../components/parameters/keyspace.yaml + - $ref: ../components/parameters/table.yaml + requestBody: + description: Restore Job Payload + content: + application/json: + schema: + $ref: ../components/schemas/createSliceRequest.yaml + responses: + '200': + description: Success diff --git a/server/src/main/resources/openAPI/paths/keyspaces_keyspace_tables_table_snapshots_snapshot.yaml b/server/src/main/resources/openAPI/paths/keyspaces_keyspace_tables_table_snapshots_snapshot.yaml new file mode 100644 index 000000000..6683bc0f3 --- /dev/null +++ b/server/src/main/resources/openAPI/paths/keyspaces_keyspace_tables_table_snapshots_snapshot.yaml @@ -0,0 +1,80 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - snapshots + operationId: getSnapshot + description: Get Snapshot Info + summary: Endpoint to get the information of a snapshot + security: + - mTLS: [] + parameters: + - $ref: ../components/parameters/keyspace.yaml + - $ref: ../components/parameters/table.yaml + - $ref: ../components/parameters/snapshot.yaml + responses: + '200': + description: Stream of the component + content: + application/octet-stream: + schema: + $ref: ../components/schemas/snapshotFileInfoList.yaml +delete: + tags: + - snapshots + operationId: deleteSnapshot + description: Delete a snapshot + summary: Endpoint to delete a snapshot + security: + - mTLS: [] + parameters: + - $ref: ../components/parameters/keyspace.yaml + - $ref: ../components/parameters/table.yaml + - $ref: ../components/parameters/snapshot.yaml + responses: + '200': + description: Snapshot was successfully deleted +put: + tags: + - snapshots + operationId: createSnapshot + description: Creates a snapshot + summary: Endpoint to creates a snapshot + security: + - mTLS: [] + parameters: + - $ref: ../components/parameters/keyspace.yaml + - $ref: ../components/parameters/table.yaml + - $ref: ../components/parameters/snapshot.yaml + requestBody: + description: Restore Job Payload + content: + application/json: + schema: + $ref: ../components/schemas/createSnapshotRequest.yaml + responses: + '200': + description: Snapshot created + content: + application/json: + schema: + type: object + properties: + result: + type: string + example: Success diff --git a/server/src/main/resources/openAPI/paths/keyspaces_keyspace_tables_table_snapshots_snapshot_components_component.yaml b/server/src/main/resources/openAPI/paths/keyspaces_keyspace_tables_table_snapshots_snapshot_components_component.yaml new file mode 100644 index 000000000..57cc5f572 --- /dev/null +++ b/server/src/main/resources/openAPI/paths/keyspaces_keyspace_tables_table_snapshots_snapshot_components_component.yaml @@ -0,0 +1,38 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - components + operationId: getComponent + description: Get Component + summary: Endpoint to get the component from a snapshot. + security: + - mTLS: [] + parameters: + - $ref: ../components/parameters/keyspace.yaml + - $ref: ../components/parameters/table.yaml + - $ref: ../components/parameters/snapshot.yaml + - $ref: ../components/parameters/component.yaml + responses: + '200': + description: Stream of the component + content: + application/octet-stream: + schema: + type: string + format: binary diff --git a/server/src/main/resources/openAPI/paths/keyspaces_keyspace_tables_table_snapshots_snapshot_components_index_component.yaml b/server/src/main/resources/openAPI/paths/keyspaces_keyspace_tables_table_snapshots_snapshot_components_index_component.yaml new file mode 100644 index 000000000..f86503089 --- /dev/null +++ b/server/src/main/resources/openAPI/paths/keyspaces_keyspace_tables_table_snapshots_snapshot_components_index_component.yaml @@ -0,0 +1,39 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - components + operationId: getComponentFromIndex + description: Get Component From Index + summary: Endpoint to get the component from a snapshot using a specific index + security: + - mTLS: [] + parameters: + - $ref: ../components/parameters/keyspace.yaml + - $ref: ../components/parameters/table.yaml + - $ref: ../components/parameters/snapshot.yaml + - $ref: ../components/parameters/index.yaml + - $ref: ../components/parameters/component.yaml + responses: + '200': + description: Stream of the component + content: + application/octet-stream: + schema: + type: string + format: binary diff --git a/server/src/main/resources/openAPI/paths/keyspaces_keyspace_token-range-replicas.yaml b/server/src/main/resources/openAPI/paths/keyspaces_keyspace_token-range-replicas.yaml new file mode 100644 index 000000000..c2fe84bbe --- /dev/null +++ b/server/src/main/resources/openAPI/paths/keyspaces_keyspace_token-range-replicas.yaml @@ -0,0 +1,34 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - tokenrange + operationId: getTokenRangeReplica + description: Get Token Range Replica + summary: Gets the token range replicas for a given keyspace + security: + - mTLS: [] + parameters: + - $ref: ../components/parameters/keyspace.yaml + responses: + '200': + description: Ring status + content: + application/json: + schema: + $ref: ../components/schemas/replicaInfoResponse.yaml diff --git a/server/src/main/resources/openAPI/paths/schema_keyspaces.yaml b/server/src/main/resources/openAPI/paths/schema_keyspaces.yaml new file mode 100644 index 000000000..a845bc925 --- /dev/null +++ b/server/src/main/resources/openAPI/paths/schema_keyspaces.yaml @@ -0,0 +1,33 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - keyspaces + operationId: deprecatedListAllKeyspaces + description: Get All Keyspaces + summary: Endpoint to gets all the keyspaces from the database + security: + - mTLS: [] + deprecated: true + responses: + '200': + description: List of keyspaces + content: + application/json: + schema: + $ref: ../components/schemas/schemaResponse.yaml diff --git a/server/src/main/resources/openAPI/paths/schema_keyspaces_keyspace.yaml b/server/src/main/resources/openAPI/paths/schema_keyspaces_keyspace.yaml new file mode 100644 index 000000000..4f6e2f993 --- /dev/null +++ b/server/src/main/resources/openAPI/paths/schema_keyspaces_keyspace.yaml @@ -0,0 +1,35 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - keyspaces + operationId: deprecatedGetAKeyspaces + description: Get Keyspace + summary: Endpoint to get a keyspace schema + security: + - mTLS: [] + parameters: + - $ref: ../components/parameters/keyspace.yaml + deprecated: true + responses: + '200': + description: List of keyspaces + content: + application/json: + schema: + $ref: ../components/schemas/schemaResponse.yaml diff --git a/server/src/main/resources/openAPI/paths/time-skew.yaml b/server/src/main/resources/openAPI/paths/time-skew.yaml new file mode 100644 index 000000000..67dc2501a --- /dev/null +++ b/server/src/main/resources/openAPI/paths/time-skew.yaml @@ -0,0 +1,32 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +get: + tags: + - gossip + operationId: timeSkew + description: Get Time Skew + summary: Endpoint to get the time skey + security: + - mTLS: [] + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: ../components/schemas/timeSkewResponse.yaml diff --git a/server/src/main/resources/openAPI/paths/uploads_uploadId.yaml b/server/src/main/resources/openAPI/paths/uploads_uploadId.yaml new file mode 100644 index 000000000..949add57c --- /dev/null +++ b/server/src/main/resources/openAPI/paths/uploads_uploadId.yaml @@ -0,0 +1,30 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +delete: + tags: + - sstables + operationId: ssTableCleanup + description: Cleanup SSTable + summary: Endpoint to start the clean up of an SSTable + security: + - mTLS: [] + parameters: + - $ref: ../components/parameters/uploadId.yaml + responses: + '200': + description: Uploaded file successfully diff --git a/server/src/main/resources/openAPI/paths/uploads_uploadId_keyspaces_keyspace_tables_table_components_component.yaml b/server/src/main/resources/openAPI/paths/uploads_uploadId_keyspaces_keyspace_tables_table_components_component.yaml new file mode 100644 index 000000000..e9c3d1075 --- /dev/null +++ b/server/src/main/resources/openAPI/paths/uploads_uploadId_keyspaces_keyspace_tables_table_components_component.yaml @@ -0,0 +1,44 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +put: + tags: + - sstables + operationId: uploadSSTable + description: Upload SSTable + summary: Endpoint to upload an SSTable + security: + - mTLS: [] + parameters: + - $ref: ../components/parameters/uploadId.yaml + - $ref: ../components/parameters/keyspace.yaml + - $ref: ../components/parameters/table.yaml + - $ref: ../components/parameters/component.yaml + requestBody: + description: SSLTable to upload + content: + application/octet-stream: + schema: + type: string + format: binary + responses: + '200': + description: Uploaded file successfully + content: + application/json: + schema: + $ref: ../components/schemas/ssTableUploadResponse.yaml diff --git a/server/src/main/resources/openAPI/paths/uploads_uploadId_keyspaces_keyspace_tables_table_import.yaml b/server/src/main/resources/openAPI/paths/uploads_uploadId_keyspaces_keyspace_tables_table_import.yaml new file mode 100644 index 000000000..b78b4c166 --- /dev/null +++ b/server/src/main/resources/openAPI/paths/uploads_uploadId_keyspaces_keyspace_tables_table_import.yaml @@ -0,0 +1,42 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +put: + tags: + - sstables + operationId: importSSTable + description: Import SSTable + summary: Endpoint to import an SSTable + security: + - mTLS: [] + parameters: + - $ref: ../components/parameters/uploadId.yaml + - $ref: ../components/parameters/keyspace.yaml + - $ref: ../components/parameters/table.yaml + requestBody: + description: SSLTable to upload + content: + application/octet-stream: + schema: + $ref: ../components/schemas/ssTableImportRequest.yaml + responses: + '200': + description: Uploaded file successfully + content: + application/json: + schema: + $ref: ../components/schemas/ssTableImportResponse.yaml diff --git a/server/src/main/resources/openAPI/sidecarApi.yaml b/server/src/main/resources/openAPI/sidecarApi.yaml new file mode 100644 index 000000000..564a6ccea --- /dev/null +++ b/server/src/main/resources/openAPI/sidecarApi.yaml @@ -0,0 +1,125 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +openapi: 3.1.0 +info: + title: Cassandra Sidecar API + description: Cassandra Sidecar API API description. + version: 1.0.0 +servers: + - url: https://localhost:8080/api/v1 + description: Localhost server +tags: + - name: healthchecks + description: Different healthchecks endpoints + - name: jobs + description: Restore jobs operations + - name: components + description: Component endpoints + - name: snapshots + description: Snapshot endpoints + - name: keyspaces + description: Keyspaces endpoints + - name: ring + description: Ring endpoints + - name: stats + description: Stats endpoints + - name: sstables + description: SSTables endpoints + - name: tokenrange + description: Token Range endpoints + - name: gossip + description: Gossip endpoints + - name: settings + description: Settings endpoints + - name: cdc + description: CDC endpoints +paths: + /__health: + $ref: paths/__health.yaml + /cassandra/__health: + $ref: paths/cassandra___health.yaml + /cassandra/gossip/__health: + $ref: paths/cassandra_gossip___health.yaml + /cassandra/native/__health: + $ref: paths/cassandra_native___health.yaml + /cassandra/jmx/__health: + $ref: paths/cassandra_jmx___health.yaml + /keyspace/{keyspace}/table/{table}/snapshots/{snapshot}/components/{component}: + $ref: "paths/keyspace_keyspace_table_table_snapshots_snapshot_compon\ + ents_component.yaml" + /keyspaces/{keyspace}/tables/{table}/snapshots/{snapshot}/components/{component}: + $ref: "paths/keyspaces_keyspace_tables_table_snapshots_snapshot_comp\ + onents_component.yaml" + /keyspaces/{keyspace}/tables/{table}/snapshots/{snapshot}/components/{index}/{component}: + $ref: "paths/keyspaces_keyspace_tables_table_snapshots_snapshot_comp\ + onents_index_component.yaml" + /keyspace/{keyspace}/table/{table}/snapshots/{snapshot}: + $ref: paths/keyspace_keyspace_table_table_snapshots_snapshot.yaml + /keyspaces/{keyspace}/tables/{table}/snapshots/{snapshot}: + $ref: paths/keyspaces_keyspace_tables_table_snapshots_snapshot.yaml + /schema/keyspaces: + $ref: paths/schema_keyspaces.yaml + /cassandra/schema: + $ref: paths/cassandra_schema.yaml + /schema/keyspaces/{keyspace}: + $ref: paths/schema_keyspaces_keyspace.yaml + /keyspaces/{keyspace}/schema: + $ref: paths/keyspaces_keyspace_schema.yaml + /cassandra/ring: + $ref: paths/cassandra_ring.yaml + /cassandra/ring/keyspaces/{keyspace}: + $ref: paths/cassandra_ring_keyspaces_keyspace.yaml + /cassandra/stats/connected-clients: + $ref: paths/cassandra_stats_stats_connected-clients.yaml + /cassandra/stats/streams: + $ref: paths/cassandra_stats_streams.yaml + /keyspaces/{keyspace}/token-range-replicas: + $ref: paths/keyspaces_keyspace_token-range-replicas.yaml + /uploads/{uploadId}/keyspaces/{keyspace}/tables/{table}/components/{component}: + $ref: "paths/uploads_uploadId_keyspaces_keyspace_tables_table_compon\ + ents_component.yaml" + /uploads/{uploadId}/keyspaces/{keyspace}/tables/{table}/import: + $ref: paths/uploads_uploadId_keyspaces_keyspace_tables_table_import.yaml + /uploads/{uploadId}: + $ref: paths/uploads_uploadId.yaml + /cassandra/gossip: + $ref: paths/cassandra_gossip.yaml + /time-skew: + $ref: paths/time-skew.yaml + /cassandra/settings: + $ref: paths/cassandra_settings.yaml + /keyspaces/{keyspace}/tables/{table}/restore-jobs: + $ref: paths/keyspaces_keyspace_tables_table_restore-jobs.yaml + /keyspaces/{keyspace}/tables/{table}/restore-jobs/{jobId}/slices: + $ref: paths/keyspaces_keyspace_tables_table_restore-jobs_jobId_slices.yaml + /keyspaces/{keyspace}/tables/{table}/restore-jobs/{jobId}: + $ref: paths/keyspaces_keyspace_tables_table_restore-jobs_jobId.yaml + /keyspaces/{keyspace}/tables/{table}/restore-jobs/{jobId}/abort: + $ref: paths/keyspaces_keyspace_tables_table_restore-jobs_jobId_abort.yaml + /keyspaces/{keyspace}/tables/{table}/restore-jobs/{jobId}/progress: + $ref: "paths/keyspaces_keyspace_tables_table_restore-jobs_jobId_prog\ + ress.yaml" + /cdc/segments: + $ref: paths/cdc_segments.yaml + /cdc/segments/{cdcSegment}: + $ref: paths/cdc_segments_cdcSegment.yaml +components: + securitySchemes: + mTLS: + description: mTLS authentication + type: mutualTLS