Uploaded image for project: 'Hybrid Cloud Console'
  1. Hybrid Cloud Console
  2. RHCLOUD-25881

The sent "export request" Cloud Event doesn't fully comply with the specified schema

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • Unset
    • No

      The following two payloads are a comparison between an expected Consoledot CE compliant payload, and the current payload sent by the export service:

      {
          "id": "8e44a302-bcd2-4b12-8a91-b5117b114bf8",
          "source": "urn:redhat:source:console:export-service",
          "subject": "urn:redhat:subject:export-service:8f81939b-d940-48ec-b1b1-befea8e7392d",
          "time": "2023-05-15T10:59:10.404485400Z",
          "type": "com.redhat.console.export-service.request",
          "data": {
              "exportRequest": {
                  "application": "urn:redhat:application:notifications",
                  "filters": {
                      "from": "2023-05-05",
                      "to": "2023-05-10"
                  },
                  "format": "json",
                  "resource": "urn:redhat:application:notifications:export:events",
                  "uuid": "8e44a302-bcd2-4b12-8a91-b5117b114bf8",
                  "x-rh-identity": "ewogICAgImlkZW50aXR5IjogewogICAgICAgICJhY2NvdW50X251bWJlciI6ICJkZWZhdWx0LWFjY291bnQtaWQiLAogICAgICAgICJvcmdfaWQiOiAiZGVmYXVsdC1vcmctaWQiLAogICAgICAgICJpbnRlcm5hbCI6IHsKICAgICAgICAgICAgIm9yZ19pZCI6ICIiCiAgICAgICAgfSwKICAgICAgICAidXNlciI6IHsKICAgICAgICAgICAgInVzZXJuYW1lIjogInRlc3RfdXNlciIsCiAgICAgICAgICAgICJlbWFpbCI6ICJ0dXNlckByZWRoYXQuY29tIiwKICAgICAgICAgICAgImZpcnN0X25hbWUiOiAidGVzdCIsCiAgICAgICAgICAgICJsYXN0X25hbWUiOiAidXNlciIsCiAgICAgICAgICAgICJpc19hY3RpdmUiOiB0cnVlLAogICAgICAgICAgICAiaXNfb3JnX2FkbWluIjogZmFsc2UsCiAgICAgICAgICAgICJpc19pbnRlcm5hbCI6IGZhbHNlLAogICAgICAgICAgICAibG9jYWxlIjogIiIsCiAgICAgICAgICAgICJ1c2VyX2lkIjogIiIKICAgICAgICB9LAogICAgICAgICJzeXN0ZW0iOiB7fSwKICAgICAgICAiYXNzb2NpYXRlIjogewogICAgICAgICAgICAiUm9sZSI6IG51bGwsCiAgICAgICAgICAgICJlbWFpbCI6ICIiLAogICAgICAgICAgICAiZ2l2ZW5OYW1lIjogIiIsCiAgICAgICAgICAgICJyaGF0VVVJRCI6ICIiLAogICAgICAgICAgICAic3VybmFtZSI6ICIiCiAgICAgICAgfSwKICAgICAgICAieDUwOSI6IHsKICAgICAgICAgICAgInN1YmplY3RfZG4iOiAiIiwKICAgICAgICAgICAgImlzc3Vlcl9kbiI6ICIiCiAgICAgICAgfSwKICAgICAgICAidHlwZSI6ICJVc2VyIiwKICAgICAgICAiYXV0aF90eXBlIjogIiIKICAgIH0KfQ=="
              }
          },
          "$schema": "https://console.redhat.com/api/schemas/events/v1/events.json",
          "specversion": "1.0",
          "dataschema": "https://console.redhat.com/api/schemas/apps/export-service/v1/export-request.json",
          "redhatorgid": "default-org-id",
          "redhataccount": "default-account-id"
      }
      
      {
          "id": "5fea4db3-e903-4699-8be0-85c65e5e63bc",
          "source": "urn:redhat:source:export-service",
          "subject": "ba64a927-4904-4e62-801a-f55fc6e4e166",
          "time": "2023-05-15T11:02:46Z",
          "type": "com.redhat.console.export-service.request",
          "data": {
              "application": "exampleApplication",
              "filters": {
                  "endDate": "2022-03-01T00:00:00Z",
                  "productId": "RHEL",
                  "startDate": "2022-01-01T00:00:00Z"
              },
              "format": "json",
              "resource": "exampleResource",
              "uuid": "2417fb2e-722d-42bc-8777-5bf33d8fffbb",
              "x-rh-identity": "eyJpZGVudGl0eSI6IHsiYWNjb3VudF9udW1iZXIiOiJhY2NvdW50MTIzIiwib3JnX2lkIjoib3JnMTIzIiwidHlwZSI6IlVzZXIiLCJ1c2VyIjp7ImlzX29yZ19hZG1pbiI6dHJ1ZX0sImludGVybmFsIjp7Im9yZ19pZCI6Im9yZzEyMyJ9fX0K"
          },
          "specversion": "1.0",
          "dataschema": "https://github.com/RedHatInsights/event-schemas/blob/main/schemas/apps/export-service/v1/export-request.json",
          "redhatorgid": "org123"
      }
      

      There are a few minor issues that need to be addressed:

              mbarcina@redhat.com Mikel Barcina
              mbarcina@redhat.com Mikel Barcina
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: