Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(API): remove API endpoints that redirect clients to newer API versioned endpoints #584

Merged
merged 146 commits into from
Oct 1, 2024

Conversation

aali309
Copy link
Contributor

@aali309 aali309 commented Jul 25, 2024

Welcome to Cryostat! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed all commits using a GPG signature

To recreate commits with GPG signature git fetch upstream && git rebase --force --gpg-sign upstream/main


Fixes: #583

Description of the change:

This change allows an environment variable to be configured so that...

Motivation for the change:

This change is helpful because users may want to...

How to manually test:

  1. Run CRYOSTAT_IMAGE=quay.io... bash smoketest.bash...
  2. ...

@aali309 aali309 added the feat New feature or request label Jul 25, 2024
@aali309 aali309 self-assigned this Jul 25, 2024
@mergify mergify bot added the safe-to-test label Jul 25, 2024
@aali309 aali309 force-pushed the removeApiRedirect branch 3 times, most recently from 87ce8e6 to 69a21c1 Compare July 31, 2024 19:57
@aali309
Copy link
Contributor Author

aali309 commented Jul 31, 2024

/build_test

Copy link

Workflow started at 7/31/2024, 3:57:32 PM. View Actions Run.

Copy link

OpenAPI schema change detected:

diff --git a/schema/openapi.yaml b/schema/openapi.yaml
index 27a342d..ca10eb9 100644
--- a/schema/openapi.yaml
+++ b/schema/openapi.yaml
@@ -459,44 +459,20 @@ paths:
         "204":
           description: No Content
         "401":
           description: Not Authorized
         "403":
           description: Not Allowed
       security:
         - SecurityScheme: []
       tags:
         - Recordings
-  /api/beta/fs/recordings/{jvmId}/{filename}/upload:
-    post:
-      parameters:
-        - in: path
-          name: filename
-          required: true
-          schema:
-            type: string
-        - in: path
-          name: jvmId
-          required: true
-          schema:
-            type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Recordings
   /api/beta/matchExpressions:
     get:
       responses:
         "200":
           content:
             application/json:
               schema:
                 items:
                   additionalProperties: {}
                   type: object
@@ -572,44 +548,20 @@ paths:
         "200":
           description: OK
         "401":
           description: Not Authorized
         "403":
           description: Not Allowed
       security:
         - SecurityScheme: []
       tags:
         - Recordings
-  /api/beta/recordings/{connectUrl}/{filename}/upload:
-    post:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            type: string
-        - in: path
-          name: filename
-          required: true
-          schema:
-            type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Recordings
   /api/beta/recordings/{jvmId}:
     get:
       parameters:
         - in: path
           name: jvmId
           required: true
           schema:
             type: string
       responses:
         "200":
@@ -764,201 +716,20 @@ paths:
         "200":
           description: OK
         "401":
           description: Not Authorized
         "403":
           description: Not Allowed
       security:
         - SecurityScheme: []
       tags:
         - Targets
-  /api/v1/targets/{connectUrl}/events:
-    get:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-        - in: query
-          name: q
-          schema:
-            type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Events
-  /api/v1/targets/{connectUrl}/recordingOptions:
-    get:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Recordings
-    patch:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Recordings
-  /api/v1/targets/{connectUrl}/recordings:
-    get:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Recordings
-    post:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Recordings
-  /api/v1/targets/{connectUrl}/recordings/{recordingName}:
-    delete:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-        - in: path
-          name: recordingName
-          required: true
-          schema:
-            type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Recordings
-    patch:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-        - in: path
-          name: recordingName
-          required: true
-          schema:
-            type: string
-      requestBody:
-        content:
-          application/json:
-            schema:
-              type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Recordings
-  /api/v1/targets/{connectUrl}/recordings/{recordingName}/upload:
-    post:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-        - in: path
-          name: recordingName
-          required: true
-          schema:
-            type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Recordings
   /api/v1/targets/{connectUrl}/snapshot:
     post:
       parameters:
         - in: path
           name: connectUrl
           required: true
           schema:
             format: uri
             type: string
       responses:
@@ -967,70 +738,20 @@ paths:
             application/json: {}
           description: OK
         "401":
           description: Not Authorized
         "403":
           description: Not Allowed
       security:
         - SecurityScheme: []
       tags:
         - Recordings
-  /api/v1/targets/{connectUrl}/templates:
-    get:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Event Templates
-  /api/v1/targets/{connectUrl}/templates/{templateName}/type/{templateType}:
-    get:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-        - in: path
-          name: templateName
-          required: true
-          schema:
-            type: string
-        - in: path
-          name: templateType
-          required: true
-          schema:
-            $ref: '#/components/schemas/TemplateType'
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Event Templates
   /api/v1/targets/{targetId}/reports/{recordingName}:
     get:
       deprecated: true
       parameters:
         - in: path
           name: recordingName
           required: true
           schema:
             type: string
         - in: path
@@ -1042,117 +763,34 @@ paths:
         "200":
           description: OK
         "401":
           description: Not Authorized
         "403":
           description: Not Allowed
       security:
         - SecurityScheme: []
       tags:
         - Reports
-  /api/v1/templates:
-    post:
-      requestBody:
-        content:
-          application/x-www-form-urlencoded:
-            schema:
-              properties:
-                template:
-                  $ref: '#/components/schemas/FileUpload'
-              type: object
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Event Templates
-  /api/v1/templates/{templateName}:
-    delete:
-      parameters:
-        - in: path
-          name: templateName
-          required: true
-          schema:
-            type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Event Templates
   /api/v2.1/auth:
     post:
       responses:
         "200":
           description: OK
       tags:
         - Auth
-  /api/v2.1/discovery:
-    get:
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Discovery
   /api/v2.1/logout:
     post:
       responses:
         "200":
           description: OK
       tags:
         - Auth
-  /api/v2.1/targets/{connectUrl}/templates/{templateName}/type/{templateType}:
-    get:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-        - in: path
-          name: templateName
-          required: true
-          schema:
-            type: string
-        - in: path
-          name: templateType
-          required: true
-          schema:
-            $ref: '#/components/schemas/TemplateType'
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Event Templates
   /api/v2.2/credentials:
     get:
       responses:
         "200":
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/V2Response'
           description: OK
         "401":
@@ -1319,85 +957,20 @@ paths:
             application/json:
               schema:
                 additionalProperties:
                   additionalProperties:
                     type: string
                   type: object
                 type: object
           description: OK
       tags:
         - Discovery
-  /api/v2.2/graphql:
-    get:
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Graph QL
-    post:
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Graph QL
-  /api/v2/probes:
-    get:
-      responses:
-        "200":
-          description: OK
-      tags:
-        - JMC Agent
-  /api/v2/probes/{probeTemplateName}:
-    delete:
-      parameters:
-        - in: path
-          name: probeTemplateName
-          required: true
-          schema:
-            type: string
-      responses:
-        "200":
-          description: OK
-      tags:
-        - JMC Agent
-    post:
-      parameters:
-        - in: path
-          name: probeTemplateName
-          required: true
-          schema:
-            type: string
-      requestBody:
-        content:
-          application/x-www-form-urlencoded:
-            schema:
-              properties:
-                probeTemplate:
-                  $ref: '#/components/schemas/FileUpload'
-              type: object
-      responses:
-        "200":
-          description: OK
-      tags:
-        - JMC Agent
   /api/v2/rules:
     get:
       responses:
         "200":
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/V2Response'
           description: OK
         "401":
@@ -1613,40 +1186,20 @@ paths:
         "200":
           description: OK
         "401":
           description: Not Authorized
         "403":
           description: Not Allowed
       security:
         - SecurityScheme: []
       tags:
         - Custom Discovery
-  /api/v2/targets/{connectUrl}:
-    delete:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Custom Discovery
   /api/v2/targets/{connectUrl}/events:
     get:
       parameters:
         - in: path
           name: connectUrl
           required: true
           schema:
             format: uri
             type: string
         - in: query
@@ -1661,66 +1214,20 @@ paths:
                 $ref: '#/components/schemas/V2Response'
           description: OK
         "401":
           description: Not Authorized
         "403":
           description: Not Allowed
       security:
         - SecurityScheme: []
       tags:
         - Events
-  /api/v2/targets/{connectUrl}/probes:
-    delete:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-      responses:
-        "200":
-          description: OK
-      tags:
-        - JMC Agent
-    get:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-      responses:
-        "200":
-          description: OK
-      tags:
-        - JMC Agent
-  /api/v2/targets/{connectUrl}/probes/{probeTemplateName}:
-    post:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-        - in: path
-          name: probeTemplateName
-          required: true
-          schema:
-            type: string
-      responses:
-        "200":
-          description: OK
-      tags:
-        - JMC Agent
   /api/v2/targets/{connectUrl}/snapshot:
     post:
       parameters:
         - in: path
           name: connectUrl
           required: true
           schema:
             format: uri
             type: string
       responses:

Copy link

No GraphQL schema changes detected.

Copy link

CI build and push: At least one test failed ❌
https://github.com/cryostatio/cryostat/actions/runs/10186786609

@aali309
Copy link
Contributor Author

aali309 commented Aug 2, 2024

/build_test

Copy link

github-actions bot commented Aug 2, 2024

Workflow started at 8/2/2024, 5:39:33 PM. View Actions Run.

Copy link

github-actions bot commented Aug 2, 2024

No GraphQL schema changes detected.

Copy link

github-actions bot commented Aug 2, 2024

OpenAPI schema change detected:

diff --git a/schema/openapi.yaml b/schema/openapi.yaml
index 27a342d..4f54b86 100644
--- a/schema/openapi.yaml
+++ b/schema/openapi.yaml
@@ -459,44 +459,20 @@ paths:
         "204":
           description: No Content
         "401":
           description: Not Authorized
         "403":
           description: Not Allowed
       security:
         - SecurityScheme: []
       tags:
         - Recordings
-  /api/beta/fs/recordings/{jvmId}/{filename}/upload:
-    post:
-      parameters:
-        - in: path
-          name: filename
-          required: true
-          schema:
-            type: string
-        - in: path
-          name: jvmId
-          required: true
-          schema:
-            type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Recordings
   /api/beta/matchExpressions:
     get:
       responses:
         "200":
           content:
             application/json:
               schema:
                 items:
                   additionalProperties: {}
                   type: object
@@ -572,44 +548,20 @@ paths:
         "200":
           description: OK
         "401":
           description: Not Authorized
         "403":
           description: Not Allowed
       security:
         - SecurityScheme: []
       tags:
         - Recordings
-  /api/beta/recordings/{connectUrl}/{filename}/upload:
-    post:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            type: string
-        - in: path
-          name: filename
-          required: true
-          schema:
-            type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Recordings
   /api/beta/recordings/{jvmId}:
     get:
       parameters:
         - in: path
           name: jvmId
           required: true
           schema:
             type: string
       responses:
         "200":
@@ -642,517 +594,145 @@ paths:
               properties:
                 labels:
                   $ref: '#/components/schemas/JsonObject'
                 maxFiles:
                   format: int32
                   type: integer
                 recording:
                   $ref: '#/components/schemas/FileUpload'
               type: object
       responses:
-        "201":
-          description: Created
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Recordings
-  /api/v1/grafana_dashboard_url:
-    get:
-      responses:
-        "200":
-          description: OK
-      tags:
-        - Health
-  /api/v1/grafana_datasource_url:
-    get:
-      responses:
-        "200":
-          description: OK
-      tags:
-        - Health
-  /api/v1/recordings:
-    get:
-      responses:
-        "200":
-          content:
-            application/json:
-              schema:
-                items:
-                  $ref: '#/components/schemas/ArchivedRecording'
-                type: array
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Recordings
-    post:
-      requestBody:
-        content:
-          application/x-www-form-urlencoded:
-            schema:
-              properties:
-                labels:
-                  $ref: '#/components/schemas/JsonObject'
-                recording:
-                  $ref: '#/components/schemas/FileUpload'
-              type: object
-      responses:
-        "200":
-          content:
-            application/json:
-              schema:
-                additionalProperties: {}
-                type: object
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Recordings
-  /api/v1/recordings/{filename}:
-    delete:
-      parameters:
-        - in: path
-          name: filename
-          required: true
-          schema:
-            type: string
-      responses:
-        "204":
-          description: No Content
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Recordings
-  /api/v1/reports/{recordingName}:
-    get:
-      deprecated: true
-      parameters:
-        - in: path
-          name: recordingName
-          required: true
-          schema:
-            type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Reports
-  /api/v1/targets:
-    get:
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Targets
-  /api/v1/targets/{connectUrl}/events:
-    get:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-        - in: query
-          name: q
-          schema:
-            type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Events
-  /api/v1/targets/{connectUrl}/recordingOptions:
-    get:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Recordings
-    patch:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Recordings
-  /api/v1/targets/{connectUrl}/recordings:
-    get:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Recordings
-    post:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Recordings
-  /api/v1/targets/{connectUrl}/recordings/{recordingName}:
-    delete:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-        - in: path
-          name: recordingName
-          required: true
-          schema:
-            type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Recordings
-    patch:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-        - in: path
-          name: recordingName
-          required: true
-          schema:
-            type: string
-      requestBody:
-        content:
-          application/json:
-            schema:
-              type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Recordings
-  /api/v1/targets/{connectUrl}/recordings/{recordingName}/upload:
-    post:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-        - in: path
-          name: recordingName
-          required: true
-          schema:
-            type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Recordings
-  /api/v1/targets/{connectUrl}/snapshot:
-    post:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-      responses:
-        "200":
-          content:
-            application/json: {}
-          description: OK
+        "201":
+          description: Created
         "401":
           description: Not Authorized
         "403":
           description: Not Allowed
       security:
         - SecurityScheme: []
       tags:
         - Recordings
-  /api/v1/targets/{connectUrl}/templates:
+  /api/v1/grafana_dashboard_url:
     get:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
       responses:
         "200":
           description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
       tags:
-        - Event Templates
-  /api/v1/targets/{connectUrl}/templates/{templateName}/type/{templateType}:
+        - Health
+  /api/v1/grafana_datasource_url:
     get:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-        - in: path
-          name: templateName
-          required: true
-          schema:
-            type: string
-        - in: path
-          name: templateType
-          required: true
-          schema:
-            $ref: '#/components/schemas/TemplateType'
       responses:
         "200":
           description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
       tags:
-        - Event Templates
-  /api/v1/targets/{targetId}/reports/{recordingName}:
+        - Health
+  /api/v1/recordings:
     get:
-      deprecated: true
-      parameters:
-        - in: path
-          name: recordingName
-          required: true
-          schema:
-            type: string
-        - in: path
-          name: targetId
-          required: true
-          schema:
-            type: string
       responses:
         "200":
+          content:
+            application/json:
+              schema:
+                items:
+                  $ref: '#/components/schemas/ArchivedRecording'
+                type: array
           description: OK
         "401":
           description: Not Authorized
         "403":
           description: Not Allowed
       security:
         - SecurityScheme: []
       tags:
-        - Reports
-  /api/v1/templates:
+        - Recordings
     post:
       requestBody:
         content:
           application/x-www-form-urlencoded:
             schema:
               properties:
-                template:
+                labels:
+                  $ref: '#/components/schemas/JsonObject'
+                recording:
                   $ref: '#/components/schemas/FileUpload'
               type: object
       responses:
         "200":
+          content:
+            application/json:
+              schema:
+                additionalProperties: {}
+                type: object
           description: OK
         "401":
           description: Not Authorized
         "403":
           description: Not Allowed
       security:
         - SecurityScheme: []
       tags:
-        - Event Templates
-  /api/v1/templates/{templateName}:
+        - Recordings
+  /api/v1/recordings/{filename}:
     delete:
       parameters:
         - in: path
-          name: templateName
+          name: filename
           required: true
           schema:
             type: string
       responses:
-        "200":
-          description: OK
+        "204":
+          description: No Content
         "401":
           description: Not Authorized
         "403":
           description: Not Allowed
       security:
         - SecurityScheme: []
       tags:
-        - Event Templates
-  /api/v2.1/auth:
+        - Recordings
+  /api/v1/targets/{connectUrl}/snapshot:
     post:
+      parameters:
+        - in: path
+          name: connectUrl
+          required: true
+          schema:
+            format: uri
+            type: string
       responses:
         "200":
-          description: OK
-      tags:
-        - Auth
-  /api/v2.1/discovery:
-    get:
-      responses:
-        "200":
+          content:
+            application/json: {}
           description: OK
         "401":
           description: Not Authorized
         "403":
           description: Not Allowed
       security:
         - SecurityScheme: []
       tags:
-        - Discovery
-  /api/v2.1/logout:
+        - Recordings
+  /api/v2.1/auth:
     post:
       responses:
         "200":
           description: OK
       tags:
         - Auth
-  /api/v2.1/targets/{connectUrl}/templates/{templateName}/type/{templateType}:
-    get:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-        - in: path
-          name: templateName
-          required: true
-          schema:
-            type: string
-        - in: path
-          name: templateType
-          required: true
-          schema:
-            $ref: '#/components/schemas/TemplateType'
+  /api/v2.1/logout:
+    post:
       responses:
         "200":
           description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
       tags:
-        - Event Templates
+        - Auth
   /api/v2.2/credentials:
     get:
       responses:
         "200":
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/V2Response'
           description: OK
         "401":
@@ -1319,85 +899,20 @@ paths:
             application/json:
               schema:
                 additionalProperties:
                   additionalProperties:
                     type: string
                   type: object
                 type: object
           description: OK
       tags:
         - Discovery
-  /api/v2.2/graphql:
-    get:
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Graph QL
-    post:
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Graph QL
-  /api/v2/probes:
-    get:
-      responses:
-        "200":
-          description: OK
-      tags:
-        - JMC Agent
-  /api/v2/probes/{probeTemplateName}:
-    delete:
-      parameters:
-        - in: path
-          name: probeTemplateName
-          required: true
-          schema:
-            type: string
-      responses:
-        "200":
-          description: OK
-      tags:
-        - JMC Agent
-    post:
-      parameters:
-        - in: path
-          name: probeTemplateName
-          required: true
-          schema:
-            type: string
-      requestBody:
-        content:
-          application/x-www-form-urlencoded:
-            schema:
-              properties:
-                probeTemplate:
-                  $ref: '#/components/schemas/FileUpload'
-              type: object
-      responses:
-        "200":
-          description: OK
-      tags:
-        - JMC Agent
   /api/v2/rules:
     get:
       responses:
         "200":
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/V2Response'
           description: OK
         "401":
@@ -1613,40 +1128,20 @@ paths:
         "200":
           description: OK
         "401":
           description: Not Authorized
         "403":
           description: Not Allowed
       security:
         - SecurityScheme: []
       tags:
         - Custom Discovery
-  /api/v2/targets/{connectUrl}:
-    delete:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-      responses:
-        "200":
-          description: OK
-        "401":
-          description: Not Authorized
-        "403":
-          description: Not Allowed
-      security:
-        - SecurityScheme: []
-      tags:
-        - Custom Discovery
   /api/v2/targets/{connectUrl}/events:
     get:
       parameters:
         - in: path
           name: connectUrl
           required: true
           schema:
             format: uri
             type: string
         - in: query
@@ -1661,66 +1156,20 @@ paths:
                 $ref: '#/components/schemas/V2Response'
           description: OK
         "401":
           description: Not Authorized
         "403":
           description: Not Allowed
       security:
         - SecurityScheme: []
       tags:
         - Events
-  /api/v2/targets/{connectUrl}/probes:
-    delete:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-      responses:
-        "200":
-          description: OK
-      tags:
-        - JMC Agent
-    get:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-      responses:
-        "200":
-          description: OK
-      tags:
-        - JMC Agent
-  /api/v2/targets/{connectUrl}/probes/{probeTemplateName}:
-    post:
-      parameters:
-        - in: path
-          name: connectUrl
-          required: true
-          schema:
-            format: uri
-            type: string
-        - in: path
-          name: probeTemplateName
-          required: true
-          schema:
-            type: string
-      responses:
-        "200":
-          description: OK
-      tags:
-        - JMC Agent
   /api/v2/targets/{connectUrl}/snapshot:
     post:
       parameters:
         - in: path
           name: connectUrl
           required: true
           schema:
             format: uri
             type: string
       responses:

Copy link

github-actions bot commented Aug 2, 2024

CI build and push: All tests pass ✅
https://github.com/cryostatio/cryostat/actions/runs/10222382811

Copy link

github-actions bot commented Sep 5, 2024

OpenAPI schema change detected:

diff --git a/schema/openapi.yaml b/schema/openapi.yaml
index 8cba820..5677b47 100644
--- a/schema/openapi.yaml
+++ b/schema/openapi.yaml
@@ -68,22 +68,20 @@ components:
         name:
           type: string
         reportUrl:
           type: string
         size:
           format: int64
           type: integer
       type: object
     ArchivedRecordingDirectory:
       properties:
-        connectUrl:
-          type: string
         jvmId:
           type: string
         recordings:
           items:
             $ref: '#/components/schemas/ArchivedRecording'
           type: array
       type: object
     AuthResponse:
       properties:
         username:

Copy link

github-actions bot commented Sep 5, 2024

No GraphQL schema changes detected.

Copy link

github-actions bot commented Sep 5, 2024

Schema changes committed by the CI.

Copy link

github-actions bot commented Sep 5, 2024

CI build and push: All tests pass ✅
https://github.com/cryostatio/cryostat/actions/runs/10726912382

@andrewazores
Copy link
Member

/build_test

Copy link

github-actions bot commented Sep 5, 2024

Workflow started at 9/5/2024, 3:43:03 PM. View Actions Run.

Copy link

github-actions bot commented Sep 5, 2024

No GraphQL schema changes detected.

Copy link

github-actions bot commented Sep 5, 2024

OpenAPI schema change detected:

diff --git a/schema/openapi.yaml b/schema/openapi.yaml
index 5677b47..8cba820 100644
--- a/schema/openapi.yaml
+++ b/schema/openapi.yaml
@@ -68,20 +68,22 @@ components:
         name:
           type: string
         reportUrl:
           type: string
         size:
           format: int64
           type: integer
       type: object
     ArchivedRecordingDirectory:
       properties:
+        connectUrl:
+          type: string
         jvmId:
           type: string
         recordings:
           items:
             $ref: '#/components/schemas/ArchivedRecording'
           type: array
       type: object
     AuthResponse:
       properties:
         username:

Copy link

github-actions bot commented Sep 5, 2024

Schema changes committed by the CI.

Copy link

github-actions bot commented Sep 5, 2024

CI build and push: All tests pass ✅
https://github.com/cryostatio/cryostat/actions/runs/10727099792

@Josh-Matsuoka
Copy link
Contributor

First readthrough of the changes looks good, I'll test this with the web client and agent changes and make sure everything works as expected, are there any additional PRs connected to this one that should be tested at the same time other than the ones connected to #550?

@andrewazores
Copy link
Member

I think it's just the three: this one, the web one, and the agent one.

Josh-Matsuoka
Josh-Matsuoka previously approved these changes Oct 1, 2024
@andrewazores andrewazores changed the base branch from api-v4 to main October 1, 2024 15:23
@andrewazores andrewazores dismissed Josh-Matsuoka’s stale review October 1, 2024 15:23

The base branch was changed.

@andrewazores
Copy link
Member

/build_test

Copy link

github-actions bot commented Oct 1, 2024

Workflow started at 10/1/2024, 11:50:37 AM. View Actions Run.

Copy link

github-actions bot commented Oct 1, 2024

No GraphQL schema changes detected.

Copy link

github-actions bot commented Oct 1, 2024

No OpenAPI schema changes detected.

Copy link

github-actions bot commented Oct 1, 2024

CI build and push: All tests pass ✅
https://github.com/cryostatio/cryostat/actions/runs/11128920200

@andrewazores andrewazores merged commit e7d070f into cryostatio:main Oct 1, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request safe-to-test
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Story] API V4 paths and formats cleanup
4 participants