Skip to content

PKI CA Delete Group Member REST API

ckelleyRH edited this page Jun 10, 2021 · 3 revisions

Request

  • Path: /ca/rest/admin/groups/{groupID}/members/{memberID}

  • Method: DELETE

  • Authentication: client certificate

  • Parameters:

    • groupID: string

    • memberID: string

  • Content: None

Source

Example

curl \
  -k \
  -s \
  -X POST \
  -H "Content-Type:application/json" \
  -H "Accept: application/json" \
  -d '{
     "id": "foo",
     "GroupID": "Enterprise RA Administrators",
     "Link": {
       "rel": "self",
       "href": "https://localhost.localdomain:8443/ca/rest/admin/groups/Enterprise+RA+Administrators/members/foo",
       "type": "application/xml"}}' \
  --user caadmin:Secret.123 \
https://localhost.localdomain:8443/ca/rest/admin/groups/Enterprise%20RA%20Administrators/members | python -m json.tool
{
    "id": "foo",
    "GroupID": "Enterprise RA Administrators",
    "Link": {
        "rel": "self",
        "href": "https://localhost.localdomain:8443/ca/rest/admin/groups/Enterprise+RA+Administrators/members/foo",
        "type": "application/xml"
    }
}
  • Second attempt, resource doesn’t exist:

curl \
  -k \
  -s \
  -X POST \
  -H "Content-Type:application/json" \
  -H "Accept: application/json" \
  -d '{
     "id": "foo",
     "GroupID": "Enterprise RA Administrators",
     "Link": {
       "rel": "self",
       "href": "https://localhost.localdomain:8443/ca/rest/admin/groups/Enterprise+RA+Administrators/members/foo",
       "type": "application/xml"}}' \
  --user caadmin:Secret.123 \
https://localhost.localdomain:8443/ca/rest/admin/groups/Enterprise%20RA%20Administrators/members | python -m json.tool
{
    "Attributes": {
        "Attribute": []
    },
    "ClassName": "com.netscape.certsrv.base.ResourceNotFoundException",
    "Code": 404,
    "Message": "No such attribute."
}
Clone this wiki locally