Device Group Create REST Service
Use Device Group Create REST Service to create a device group, such as myLTO. The new device group is a child of a parent device family, such as LTO.
- Operation
- POST
- URL
- https://<host>:<port>/SKLM/rest/v1/deviceGroups/{groupName}
依預設,IBM Security Key Lifecycle Manager 伺服器 會接聽非安全埠 80 (HTTP) 及安全埠 443 (HTTPS) 以進行通訊。 在 IBM Security Key Lifecycle Manager 安裝期間,您可以修改這些預設埠。 如果您要使用 HTTP 或 HTTPS 的預設埠,則該埠是 URL 的選用部分。
Request
要求參數
| 參數 | 說明 |
|---|---|
| host | 指定 IBM Security Key Lifecycle Manager 伺服器的 IP 位址或主機名稱。 |
| port | 指定 IBM Security Key Lifecycle Manager 伺服器在其上接聽要求的埠號。 |
要求標頭
| 標頭名稱 | 值 |
|---|---|
| Content-Type | application/json |
| Accept | application/json |
| Authorization | SKLMAuth userAuthId=<authIdValue> |
| Accept-Language | IBM Security Key Lifecycle Manager 支援的任何有效語言環境。 例如:en 或 de |
Path parameters
| Parameter name | Description |
|---|---|
| groupName | Specify a user-defined name for a device group.
For example, myDivisionLTO Follow these rules to
define a name:
|
Request body
JSON object with the following specification:
| JSON property name | Description |
|---|---|
| deviceFamily | Specify an existing device family that IBM Security Key Lifecycle Manager provides.
You can specify the following device family:
|
| device.enableMachineAffinity | Specify the device groups in the DS5000 device family that enabled to store the association of a device to an existing system identifier in the IBM Security Key Lifecycle Manager database. The values are true (enable) or false (disable). An instance of the property is stored for each device group. |
| enableKMIPDelete | Enables or disables KMIP delete requests. Disabling this attribute when you create a device group prevents KMIP clients from deleting keys in the device group. Default is false (disabled). |
| shortName | Specify a short label that is usually a drive type such as LTO. This property is used for any additional attributes that are needed by an original equipment manufacturer. |
| longName | Specify an extended descriptive name of a drive type, such as my division LTO. For example, it might include business information. |
Response
回應標頭
| 標頭名稱 | 值和說明 |
|---|---|
| 狀態碼 |
|
| Content-Type | application/json |
| Content-Language | 回應訊息的語言環境。 |
Success response
body
JSON object with the following specification:
| JSON property name | Description |
|---|---|
| DeviceGroupName | Returns the name of the group that is created. |
錯誤回應主體
具有下列規格的 JSON 物件。
| JSON 內容名稱 | 說明 |
|---|---|
| code | 傳回應用程式錯誤碼。 |
| message | 傳回說明錯誤的訊息。 |
Examples
- Service request to create a device group
POST https://localhost:<port>/SKLM/rest/v1/deviceGroups/newGroup Content-Type: application/json Accept: application/json Authorization: SKLMAuth userAuthId=139aeh34567m {"deviceFamily":"LTO","shortName":"myLTO","longName":"my companyname LTO devices"}
- Success response
Status Code: 200 OK {"code":"0","status":"Succeeded"}- Error response
Status Code: 400 Bad Request {"code":"CTGKM6002E","message":"CTGKM6002E Bad Request: Invalid user authentication ID or invalid request format."}