‘endpoints’

/api/v1/endpoints

/api/v1/endpoints/{endpoint_id:[0-9a-fA-F]{32}}

POST

Register new endpoint:

POST /api/v1/endpoints
{
    'name': 'Endpoint1',
    'is_trusted': True/False  # If you specify *is_trusted*, you MUST send *auth_data*.
                              # Unauthorized callers are prohibited.
    'typ': 2,
                # TYP_UNKNOWN = 1
                # TYP_WINDOWS_CLIENT = 2
                # TYP_NAM = 3
                # TYP_MACOS_CLIENT = 4,
                # TYP_LINUX_CLIENT = 5,
                # TYP_NCA = 6,
                # TYP_RADIUS = 7
    'desc': 'a description',
    'auth_data':
    {
        # this is not yet designed, but idea is to provide authentication data
        # in order to ensure only admin can register new endpoint.
        # currently, only "PASSWORD:1" method is supported
        # this is subject to change.

        'method_id': 'PASSWORD:1',
        'user_name': 'LOCAL\admin',
        'password': 'password'
    }
}
Returns
{
    'id': 'abc123',
    'secret': 'xxx'  # server-generated secret.
}

Grab secret and remember it inside endpoint (secure registry storage, root-only accessible file etc.) You will use the secret in ‘endpoint_sessions’ service.

Notes: 1.

GET

Read endpoint information:

GET /api/v1/endpoints/123
Returns
{
    'id':   'xxx',
    'name': 'xxx',
    'desc': 'xxx',
    'typ': 2,
    'is_trusted': True/False
}

DELETE

Destroy endpoint. This method requires JSON body, not all web clients/proxy servers support body for HTTP DELETE method:

DELETE /api/v1/endpoints/123
{
    'auth_data':
    {
        # see description of POST
    }
}

PATCH

Update endpoint information:

PATCH /api/v1/endpoints/123
{
    'name' : 'new name',
    'desc': 'new description',
    'is_trusted': True/False,
    'typ'  :  1 # new type,
    'auth_data': {
        # ...
    }
}

If you omit a field, it will not be changed.