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 -n caadmin --message-format json --output tmp ca-user-add testuser --fullName "Test User"

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

POST /ca/rest/admin/users HTTP/1.1
Accept: application/json
Content-Type: application/json
...
{
    "UserID": "testuser",
    "FullName": "Test User",
    "Attributes": {
        "Attribute": []
    }
}

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

HTTP/1.1 201 
Location: https://localhost.localdomain:8443/ca/rest/admin/users/testuser
Content-Type: application/json
...
{
    "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": []
    }
}

See Also

Clone this wiki locally