Requesting Signed Updates and Manifests

Instructions for requesting signed updates and manifests are described in the following sections:

Obtaining the Public Key
Requesting Signed Updates
Polling for Signed Updates
Requesting the Signed Manifest
Polling for Signed Manifest

Obtaining the Public Key

The public key can be obtained directly from FlexNet Operations using the updates-service-rest-controller REST API.

To obtain the public key

Make a GET call to https://siteID-uat.flexnetoperations.com/flexnet/operations/api/updates/update-signing-key.

Body Type

Code

Request Body

BarryPhotoStudio

Response Body

{

    "publicKey":"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVvQg5xomVn3ZCnp+Ln5Ia1z0DUPmyETIAw8I+N9zsf+c3PSWrfBQr8RwuJDFndT7bjGB/UhATyk3yaGT7Lsp/v8XUYliUegQ0ZxK83h6DzRDcOemApchEffAwJp0Egwlt3qpZbEhxaT2wJaiodLyYEXOebk1+dAW0OMEo3A0L+wIDAQAB",

    "errorMessage": ""

}

This public key is required to verify the signature in the response obtained in Requesting Signed Updates.

Requesting Signed Updates

To request signed updates

Make a POST call to https://siteID-ns-uat.flexnetoperations.com/uai/2.0/signed-updates.

Body Type

Code

Request Body

{

    "updateFromPkgId":"PhotoPrintInstaller",

    "language":1033,

    "platform":"WIN64",

    "id":"PhotoPrintInstaller-V12",

    "idType":"STRING",

    "publisherName":"ABCNetworks"

}

Note:For devices that are assigned to an account, it is recommended to populate the fields id, idType, and publisherName. For anonymous devices, these fields should be left blank.

Response Body

{

    "url": "/uai/2.0/signed-updates/67089b0f-4b8a-4e53-a970-2cb92217459e"

}

Polling for Signed Updates

Poll for the signed updates using the provided polling URL. If a 202 response code is received, repeat the polling until a 200 response is received.

To poll for the signed updates

Make a GET call to https://siteID-ns-uat.flexnetoperations.com/uai/2.0/signed-updates/67089b0f-4b8a-4e53-a970-2cb92217459e.

Body Type

Code

Request Body

N/A

Response Body

{

    "protected": "eyJhbGciOiJSUzI1NiJ9",

    "payload":"ewoidXBkYXRlSXRlbXMiOiBbCnsKImNvbW1hbmRMaW5lIjogIiIsCiJkZXNjcmlwdGlvbiI6ICJVcGRhdGUgUGhvdG9QcmludCBmcm9tIHZlcnNpb24gMTIgdG8gdmVyc2lvbiAxMi4xIiwKImV4cGlyZURhdGUiOiAiMDUvMDEvMjAyNSIsCiJmcm9tUGFja2FnZUlkIjogIlBob3RvUHJpbnRJbnN0YWxsZXItVjEyIiwKInVwZGF0ZUlkIjogIlBob3RvUHJpbnQtVXBkYXRlLVYxMi4xIiwKImxhbmd1YWdlQ29kZSI6IDEwMzMsCiJ1cGRhdGVOYW1lIjogIlBob3RvUHJpbnQtVXBkYXRlIiwKInByb2R1Y3ROYW1lIjogIiIsCiJzdGFydERhdGUiOiAiMDUvMDEvMjAxOCIsCiJ0aXRsZSI6ICJVcGRhdGUgZm9yIFBob3RvUHJpbnQiLAoidG9QYWNrYWdlSWQiOiAiUGhvdG9QcmludC1VcGRhdGUtVjEyLjEiLAoibWFuaWZlc3RVUkwiOiAiL3VhaS8yLjAvdXBkYXRlcy9tYW5pZmVzdHMvYzRjOGM1ZDYtMzU3NC00MmFlLTljZDktCmQ2YWE3MzdhMWRiZSIKfQpdLAoiZXJyb3IiOiB7CiJrZXkiOiAiIiwKIm1lc3NhZ2UiOiAiIiwKImFyZ3VtZW50cyI6ICIiCn0KfQ",

    "signature": "Q25NmY5LPi4o9-lkMyG_JmAVCn6RHWgIFg7jFRr9kyoUkqk5h8QeNttUhhO4DwIENU0HVKkGyknkUhgFrY2bUAgRQpEiIqn-aXmIanHxHcDGGWGT0-PKX5nJHqfBE8Ssg3Z0ludCPzXL3JOFYt1pLjeBvEOgAqgTVrl02Xx3"

}

Use the response to do the following:

Check signature. Any tool or library that verifies a signature will use all three fields from the response and the public key (obtained using the REST API /update-signing-key/).
Decode response. Any Base64URL decoder will be able to decode the response into JSON format, providing the same information as seen in the previous section, Requesting Updates and Manifests. (The tool used to check the signature will probably return a decoded response.)

Requesting the Signed Manifest

To request the manifest

Make a POST call to https://siteID-ns-uat.flexnetoperations.com/uai/2.0/signed-updates/manifests.

Body Type

Code

Request Body

{

    "uuid": "c4c8c5d6-3574-42ae-9cd9-d6aa737a1dbe"

}

Response Body

{

    "url": "/uai/2.0/signed-updates/manifests/16489f0c-3b34-abfa-b342-3fe2459023e1"

}

Polling for Signed Manifest

Poll for the signed manifest using the provided polling URL. If a 202 response code is received, repeat the polling until a 200 response is received.

To poll for the signed manifest

Make a GET call to https://siteID-ns-uat.flexnetoperations.com/uai/2.0/signed-updates/manifests/16489f0c-3b34-abfa-b342-3fe2459023e1.

Body Type

Code

Request Body

N/A

Response Body

{

    "protected": "eyJhbGciOiJSUzI1NiJ9",

    "payload":"eyJtYW5pZmVzdFZlcnNpb24iOiIxLjAiLCJtYW5pZmVzdEZpbGVzIjpbeyJmaWxlVXJsIjoiaHR0cHM6Ly9leGFtcGxlLmNvbS9maWxlbmFtZS50eHQiLCJmaWxlU2l6ZSI6IjY2NjgxMSIsIm1kNUhhc2giOiJlMzgxOTBlNDcwM2ViNjVkMzk5MWNjMTA5ZjJjOTg4NiIsInNoYTI1Nkhhc2giOiIiLCJleGVjdXRlIjoibm8ifV19",

    "signature":"S0xEZx0rPPRr_tWQ2ufQJ9pkC9OZGkrjxuAqLunm7GDjw2hreXAsEFsxlahiklwaLcJUfArNO3C4oOXEAQrS0prJhfRxywHzLzyflImO3Ku-A9XRxr3rYpmCfLWJWxVH8cVXHBHVmo5mV50sXPOBeohrcLKUSzo1u3IMTEoi5cQ"

}

Use the response to do the following:

Check signature. Any tool or library that verifies a signature will use all three fields from the response and the public key (obtained using the REST API /update-signing-key/).
Decode response. Any Base64URL decoder will be able to decode the response into JSON format, providing the same information as seen in the previous section, Requesting Updates and Manifests. (The tool used to check the signature will probably return a decoded response.)

This step completes the registration.