Enrollment

Delete

Delete enrollment information for an enrolled device.

Command: DELETE
http://localhost/api/v1/host/enroll/
Curl example
curl http://localhost/api/v1/host/enroll \
    --unix-socket /var/run/edge-core/edge-core.sock \
    -X DELETE
Table 1. Error 4xx
Field Type Description
error_message String A description of the error encountered
status_code Number Status code for the HTTP request
Error response example
{
    "error_message": "<errorMessage>",
    "status_code": 400
}

Enroll Device

Enrolls the device with the Edge Manager.

Command: POST
http://localhost/api/v1/host/enroll
Table 2. Parameters
Field Type Description
sharedSecret String Shared secret
deviceId String Device identifier
enrollmentUrl String URL for the enrollment
Curl example
curl http://localhost/api/v1/host/enroll \
    --unix-socket /var/run/edge-core/edge-core.sock \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{
            "sharedSecret": "secret",
            "deviceId": "some-device-id",
            "enrollmentUrl": "https://some-enrollment-url"
        }'
Table 3. Success 200
Field Type Description
enrollment String "Certified enrollment success"
Success response example
{
    "enrollment": "Certificate enrollment success"
}
Table 4. Error 4xx
Field Type Description
error_message String A description of the error encountered
status_code Number The status code for the HTTP request
Error response example
{
    "error_message": "<errorMessage>",
    "status_code": 400
}

Get Enrollment Status

Gets enrollment details from the specified device.

Command: GET
http://localhost/api/v1/host/enroll
Curl example
curl http://localhost/api/v1/host/enroll \
    --unix-socket /var/run/edge-core/edge-core.sock
Table 5. Success 200
Field Type Description
enrolled Boolean True if device is enrolled
deviceId String Device identifier
edgeManagerUrl String URL for the device manager
Enrolled device example
{
    "enrolled": true,
    "deviceId": "some-device-id",
    "edgeManagerUrl": "https://edgemanager-sysint.predix.io"
}
Unenrolled device example
{
    "enrolled": false
}