Skip to content

PKI CA Add User REST API

Endi S. Dewata edited this page Jun 7, 2021 · 9 revisions

Request

  • Method: POST

  • Path: /ca/rest/admin/users

  • Authentication: Client certificate

Response

Examples

Using PKI CLI

To add a CA user using PKI CLI:

$ pki -v -n caadmin --message-format json --output tmp ca-user-add testuser --fullName "Test User"
...
INFO: HTTP request: POST /ca/rest/admin/users HTTP/1.1
...
INFO: HTTP response: HTTP/1.1 201 
...

The request will be stored in tmp/http-request-3:

{
    "UserID": "testuser",
    "FullName": "Test User",
    "Attributes": {
        "Attribute": []
    }
}

The response will be stored in tmp/http-response-3:

{
    "id": "testuser",
    "UserID": "testuser",
    "FullName": "Test User",
    "Link": {
        "rel": "self",
        "href": "https://localhost.localdomain:8443/ca/rest/admin/users/testuser",
        "type": "application/xml"
    },
    "Attributes": {
        "Attribute": []
    }
}

Clone this wiki locally