REST API v2 DELETE CO Group returns 400

XMLWordPrintable

      The CO Group is simple as seen by this REST API GET call:

      $ curl \
          --verbose \
          -u "${USER}:${PASSWORD}" \
          -H "Content-Type: application/json; charset=UTF-8" \
          -H "Accept: application/json; charset=UTF-8" \
          "${REGISTRY}/groups/283" | jq
                
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
        0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 2600:9000:a70e:7345:3480:7894:2196:7be7:443...
      * Connected to registry5-test.igwn.org (2600:9000:a70e:7345:3480:7894:2196:7be7) port 443 (#0)
      * ALPN, offering h2
      * ALPN, offering http/1.1
      *  CAfile: /etc/ssl/certs/ca-certificates.crt
      *  CApath: /etc/ssl/certs
      * TLSv1.0 (OUT), TLS header, Certificate Status (22):
      } [5 bytes data]
      * TLSv1.3 (OUT), TLS handshake, Client hello (1):
      } [512 bytes data]
      * TLSv1.2 (IN), TLS header, Certificate Status (22):
      { [5 bytes data]
      * TLSv1.3 (IN), TLS handshake, Server hello (2):
      { [122 bytes data]
      * TLSv1.2 (IN), TLS header, Finished (20):
      { [5 bytes data]
      * TLSv1.2 (IN), TLS header, Supplemental data (23):
      { [5 bytes data]
      * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
      { [19 bytes data]
      * TLSv1.2 (IN), TLS header, Supplemental data (23):
      { [5 bytes data]
      * TLSv1.3 (IN), TLS handshake, Certificate (11):
      { [3811 bytes data]
      * TLSv1.2 (IN), TLS header, Supplemental data (23):
      { [5 bytes data]
      * TLSv1.3 (IN), TLS handshake, CERT verify (15):
      { [264 bytes data]
      * TLSv1.2 (IN), TLS header, Supplemental data (23):
      { [5 bytes data]
      * TLSv1.3 (IN), TLS handshake, Finished (20):
      { [36 bytes data]
      * TLSv1.2 (OUT), TLS header, Finished (20):
      } [5 bytes data]
      * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
      } [1 bytes data]
      * TLSv1.2 (OUT), TLS header, Supplemental data (23):
      } [5 bytes data]
      * TLSv1.3 (OUT), TLS handshake, Finished (20):
      } [36 bytes data]
      * SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
      * ALPN, server accepted to use h2
      * Server certificate:
      *  subject: CN=registry5-test.igwn.org
      *  start date: Jun 30 00:00:00 2025 GMT
      *  expire date: Jul 29 23:59:59 2026 GMT
      *  subjectAltName: host "registry5-test.igwn.org" matched cert's "registry5-test.igwn.org"
      *  issuer: C=US; O=Amazon; CN=Amazon RSA 2048 M02
      *  SSL certificate verify ok.
      * Using HTTP2, server supports multiplexing
      * Connection state changed (HTTP/2 confirmed)
      * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
      * TLSv1.2 (OUT), TLS header, Supplemental data (23):
      } [5 bytes data]
      * TLSv1.2 (OUT), TLS header, Supplemental data (23):
      } [5 bytes data]
      * TLSv1.2 (OUT), TLS header, Supplemental data (23):
      } [5 bytes data]
      * Server auth using Basic with user 'co_2.scott.koranda_testing'
      * Using Stream ID: 1 (easy handle 0x581d6b2719f0)
      * TLSv1.2 (OUT), TLS header, Supplemental data (23):
      } [5 bytes data]
      > GET /registry/api/v2/groups/283 HTTP/2
      > Host: registry5-test.igwn.org
      > authorization: Basic Y29fMi5zY290dC5rb3JhbmRhX3Rlc3Rpbmc6emNobS0wNDQ0LWFoc2ItMjczMg==
      > user-agent: curl/7.81.0
      > content-type: application/json; charset=UTF-8
      > accept: application/json; charset=UTF-8
      * TLSv1.2 (IN), TLS header, Supplemental data (23):
      { [5 bytes data]
      * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
      { [157 bytes data]
      * TLSv1.2 (IN), TLS header, Supplemental data (23):
      { [5 bytes data]
      * Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
      * TLSv1.2 (OUT), TLS header, Supplemental data (23):
      } [5 bytes data]
      * TLSv1.2 (IN), TLS header, Supplemental data (23):
      { [5 bytes data]
      < HTTP/2 200 
      < date: Thu, 18 Dec 2025 15:55:36 GMT
      < content-type: text/html; charset=UTF-8
      < content-length: 552
      < set-cookie: AWSALB=jlNx+A/R+aMWurv6+h5IOgsNXhTyHsd9jUsOSh/M6ZZ6SloQW8EroHCdXbQ6X4MFFIapdd7+76mW156V4yhHfinNsIi9lFIXWtEprVaAHM/2Oy/Z6tVa/xakg1zk; Expires=Thu, 25 Dec 2025 15:55:36 GMT; Path=/
      < set-cookie: AWSALBCORS=jlNx+A/R+aMWurv6+h5IOgsNXhTyHsd9jUsOSh/M6ZZ6SloQW8EroHCdXbQ6X4MFFIapdd7+76mW156V4yhHfinNsIi9lFIXWtEprVaAHM/2Oy/Z6tVa/xakg1zk; Expires=Thu, 25 Dec 2025 15:55:36 GMT; Path=/; SameSite=None; Secure
      < server: Apache/2.4.62 (Debian)
      < x-powered-by: PHP/8.3.22
      < x-debugkit-id: 2e1375b2-0c04-4d3a-90cd-d1494cbd53dd
      < vary: Accept-Encoding
      < content-security-policy: frame-ancestors 'self';
      { [552 bytes data]
      * TLSv1.2 (IN), TLS header, Supplemental data (23):
      { [5 bytes data]
      100   552  100   552    0     0    677      0 --:--:-- --:--:-- --:--:--   677
      * Connection #0 to host registry5-test.igwn.org left intact
      {
        "responseMeta": {
          "resource": "Groups",
          "version": "2"
        },
        "Groups": [
          {
            "id": 283,
            "co_id": 2,
            "cou_id": null,
            "owners_group_id": 284,
            "name": "KorandaTest01",
            "description": "Koranda Test 01",
            "open": false,
            "status": "A",
            "group_type": "S",
            "nesting_mode_all": false,
            "parent_id": null,
            "cri": null,
            "do_not_clone": null,
            "meta": {
              "created": "2025-12-16T21:25:47+00:00",
              "modified": "2025-12-16T21:25:47+00:00",
              "revision": 0,
              "deleted": false,
              "actor_identifier": "API:co_2.scott.koranda_testing",
              "lft": 167,
              "rght": 168,
              "uuid": "3879ff57-0023-40f1-b023-d1233c26353d",
              "crn": null,
              "group_id": null
            }
          }
        ]
      }

      The DELETE action, however, returns a 400:

      $ curl \
          --verbose \
          -u "${USER}:${PASSWORD}" \
          -H "Content-Type: application/json; charset=UTF-8" \
          -H "Accept: application/json; charset=UTF-8" \
              -X DELETE \
          "${REGISTRY}/groups/283" 
      *   Trying 2600:9000:a70e:7345:3480:7894:2196:7be7:443...
      * Connected to registry5-test.igwn.org (2600:9000:a70e:7345:3480:7894:2196:7be7) port 443 (#0)
      * ALPN, offering h2
      * ALPN, offering http/1.1
      *  CAfile: /etc/ssl/certs/ca-certificates.crt
      *  CApath: /etc/ssl/certs
      * TLSv1.0 (OUT), TLS header, Certificate Status (22):
      * TLSv1.3 (OUT), TLS handshake, Client hello (1):
      * TLSv1.2 (IN), TLS header, Certificate Status (22):
      * TLSv1.3 (IN), TLS handshake, Server hello (2):
      * TLSv1.2 (IN), TLS header, Finished (20):
      * TLSv1.2 (IN), TLS header, Supplemental data (23):
      * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
      * TLSv1.2 (IN), TLS header, Supplemental data (23):
      * TLSv1.3 (IN), TLS handshake, Certificate (11):
      * TLSv1.2 (IN), TLS header, Supplemental data (23):
      * TLSv1.3 (IN), TLS handshake, CERT verify (15):
      * TLSv1.2 (IN), TLS header, Supplemental data (23):
      * TLSv1.3 (IN), TLS handshake, Finished (20):
      * TLSv1.2 (OUT), TLS header, Finished (20):
      * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
      * TLSv1.2 (OUT), TLS header, Supplemental data (23):
      * TLSv1.3 (OUT), TLS handshake, Finished (20):
      * SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
      * ALPN, server accepted to use h2
      * Server certificate:
      *  subject: CN=registry5-test.igwn.org
      *  start date: Jun 30 00:00:00 2025 GMT
      *  expire date: Jul 29 23:59:59 2026 GMT
      *  subjectAltName: host "registry5-test.igwn.org" matched cert's "registry5-test.igwn.org"
      *  issuer: C=US; O=Amazon; CN=Amazon RSA 2048 M02
      *  SSL certificate verify ok.
      * Using HTTP2, server supports multiplexing
      * Connection state changed (HTTP/2 confirmed)
      * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
      * TLSv1.2 (OUT), TLS header, Supplemental data (23):
      * TLSv1.2 (OUT), TLS header, Supplemental data (23):
      * TLSv1.2 (OUT), TLS header, Supplemental data (23):
      * Server auth using Basic with user 'co_2.scott.koranda_testing'
      * Using Stream ID: 1 (easy handle 0x56a1df0e69f0)
      * TLSv1.2 (OUT), TLS header, Supplemental data (23):
      > DELETE /registry/api/v2/groups/283 HTTP/2
      > Host: registry5-test.igwn.org
      > authorization: Basic Y29fMi5zY290dC5rb3JhbmRhX3Rlc3Rpbmc6emNobS0wNDQ0LWFoc2ItMjczMg==
      > user-agent: curl/7.81.0
      > content-type: application/json; charset=UTF-8
      > accept: application/json; charset=UTF-8
      * TLSv1.2 (IN), TLS header, Supplemental data (23):
      * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
      * TLSv1.2 (IN), TLS header, Supplemental data (23):
      * Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
      * TLSv1.2 (OUT), TLS header, Supplemental data (23):
      * TLSv1.2 (IN), TLS header, Supplemental data (23):
      < HTTP/2 400 
      < date: Thu, 18 Dec 2025 15:55:59 GMT
      < content-type: application/json
      < content-length: 220
      < set-cookie: AWSALB=aut5fKnO2cD4nVmLJiYJiG+KSKSkCiXG5IOEjy81jbkMhrcODB3dlEM8MGgjBl0cr/vg+r20doG1uAxNJqyClNusFO5M6WvoY8de/Yzrwwl8kRlHbdGla5yrPogC; Expires=Thu, 25 Dec 2025 15:55:59 GMT; Path=/
      < set-cookie: AWSALBCORS=aut5fKnO2cD4nVmLJiYJiG+KSKSkCiXG5IOEjy81jbkMhrcODB3dlEM8MGgjBl0cr/vg+r20doG1uAxNJqyClNusFO5M6WvoY8de/Yzrwwl8kRlHbdGla5yrPogC; Expires=Thu, 25 Dec 2025 15:55:59 GMT; Path=/; SameSite=None; Secure
      < server: Apache/2.4.62 (Debian)
      < x-powered-by: PHP/8.3.22
      < x-debugkit-id: 4b63a113-c4f9-44b2-8330-8e018b2b06d9
      < content-security-policy: frame-ancestors 'self';
      {
          "message": "This record is read only and cannot be edited",
          "url": "\/api\/v2\/groups\/283",
          "code": 400,
          "file": "\/srv\/comanage-registry\/app\/src\/Controller\/ApiV2Controller.php",
          "line": 218
      * TLSv1.2 (IN), TLS header, Supplemental data (23):
      * Connection #0 to host registry5-test.igwn.org left intact
      }

      Note that the CO Group IS deleted and no longer can be browsed from the UI/UX.

            Assignee:
            Benn Oshrin
            Reporter:
            Scott Koranda
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: