REST API - POST Passkey (Client Level)

A client owner can run this operation to create, modify, or remove a passkey for browsing or restoring backup content on their client computer.

For more information about passkeys, see Configuring a Passkey.

Caution

If you lose the passkey, you cannot browse or restore data.

Request

Syntax

Send the request using either XML or JSON.

  • XML

    POST <webservice>/client/{clientId}/Passkey
    Host: <host name>
    Accept: {application/xml}
    Content-type: application/xml
    <App_SetPasskeyRequest currentPasskey="" newPasskey="" confirmPasskey="" passkeyOpType=""/>
  • JSON

    POST <webservice>/client/{clientId}/Passkey
    Host: <host name>
    Accept: {application/json}
    Content-type: application/json
    {
      "App_SetPasskeyRequest": {
        "currentPasskey": "",
        "newPasskey": "",
        "confirmPasskey": "",
        "passkeyOpType": ""
        }
    }

where <webservice> is the root path used to route the API requests to the Web Server.

For more information, see Available Web Services for REST API.

Request Parameters

Name

Description

Required

clientId

The ID of the client. If the client ID is not known, use the REST API - GET Client to retrieve it.

Yes

Request Headers

Name

Description

Host

The host name of the Web Server or Web Console used in the API request.

Accept

The format of the response. Valid values are: application/xml or application/json.

Content-type

The media type contained in the request body. Valid values are: application/xml or application/json.

Request Body

An XML element or a JSON message is required. See Syntax. The following table displays the parameters for the request body.

Note

All XML requests interpret the input as a plain text passkey, and all JSON requests interpret the input as a Base64 encoded passkey.

Parameter

Description

Elements

currentPasskey

The new passkey for restricting backup restores.

App_SetPasskeyRequest

newPasskey

The new passkey for restricting backup restores.

App_SetPasskeyRequest

confirmPasskey

Confirm the new passkey for restricting backup restores.

App_SetPasskeyRequest

passkeyOpType

The type of passkey operation:

  • 1: Create passkey

  • 2: Modify passkey

  • 3: Remove passkey

App_SetPasskeyRequest

Response

Response Parameters

Parameter

Description

Elements

name

API processing result. Valid value is exitval.

attributes

value

The number for the API processing result.

Valid values are:

  • 0: Successful completion

  • a specific error code.

attributes

errorMessage

The description of the error code. Not all error codes have an error message.

error

errorCode

The possible error codes.

Valid values are:

  • 0: Successful completion.

  • 2: Failure.

  • a specific error code.

error

Examples

Example Request to Create a New Passkey

POST <webservice>/ClientGroup HTTP/1.1
Host: client.mydomain.com
Accept: application/xml
Authtoken: QSDK 38568012f4d1e8ee1841d283a47aa3ba78e124ea58354b5fc60f4dab8a63347d05cf5552484dafda3bfa4c5db84e580b1cb37bcf8e65b39f7f8549a443e6f78a2c7be3f31b3d845e24776c835e498e8e883bb40c46bd15af4f40ca94e823acedcdd4e9659e74b34a07a85c4586cd2ed914b6dce015874783ef768fda78183a4208930954a377f66eb56c8b92cexampl4s437a19317ca6ce7f3233d5a01aca35dbad93468b833f2cf71010809006a937670adce711ca8be46638e8
Content-type: application/xml
<?xml version="1.0" encoding="UTF-8"?><App_SetPasskeyRequest currentPasskey="RESTAPI!12" passkeyOpType="1"/>

Example Request to Modify an Existing Passkey

POST <webservice>/ClientGroup HTTP/1.1
Host: client.mydomain.com
Accept: application/xml
Authtoken: QSDK 38568012f4d1e8ee1841d283a47aa3ba78e124ea58354b5fc60f4dab8a63347d05cf5552484dafda3bfa4c5db84e580b1cb37bcf8e65b39f7f8549a443e6f78a2c7be3f31b3d845e24776c835e498e8e883bb40c46bd15af4f40ca94e823acedcdd4e9659e74b34a07a85c4586cd2ed914b6dce015874783ef768fda78183a4208930954a377f66eb56c8b92cexampl4s437a19317ca6ce7f3233d5a01aca35dbad93468b833f2cf71010809006a937670adce711ca8be46638e8
Content-type: application/xml
<?xml version="1.0" encoding="UTF-8"?><App_SetPasskeyRequest currentPasskey="Abc!12" newPasskey="RestAPI!12" confirmPasskey="RestAPI!12" passkeyOpType="2"/>

Example Request to Remove an Existing Passkey

POST <webservice>/ClientGroup HTTP/1.1
Host: client.mydomain.com
Accept: application/xml
Authtoken: QSDK 38568012f4d1e8ee1841d283a47aa3ba78e124ea58354b5fc60f4dab8a63347d05cf5552484dafda3bfa4c5db84e580b1cb37bcf8e65b39f7f8549a443e6f78a2c7be3f31b3d845e24776c835e498e8e883bb40c46bd15af4f40ca94e823acedcdd4e9659e74b34a07a85c4586cd2ed914b6dce015874783ef768fda78183a4208930954a377f66eb56c8b92cexampl4s437a19317ca6ce7f3233d5a01aca35dbad93468b833f2cf71010809006a937670adce711ca8be46638e8
Content-type: application/xml
<?xml version="1.0" encoding="UTF-8"?><App_SetPasskeyRequest currentPasskey="Abc!12" passkeyOpType="3"/>

Example Response When a Passkey Is Created Successfully

<?xml version="1.0" encoding="UTF-8"?>
<App_SetPasskeyResponse>
  <processinginstructioninfo>
    <attributes name="exitval" value="0"/>
  </processinginstructioninfo>
  <error errorCode="0"/>
</App_SetPasskeyResponse>

Example Response When You Do Not Have Permissions to Create a Passkey at the Client Level

<?xml version="1.0" encoding="UTF-8"?>
<App_SetPasskeyResponse>
  <processinginstructioninfo>
    <attributes name="exitval" value="587204594"/>
  </processinginstructioninfo>
  <error errorMessage="You do not have sufficient privileges for this operation" errorCode="587204594"/>
</App_SetPasskeyResponse>

Loading...