添加软件信息到计算机

添加软件信息到计算机

API调用URL地址

http://<serverName>:<portNumber>/api/v3/workstations/{workstations_id}/software/

其中{workstations_id}为需要添加软件信息的的计算机 ID,注意需要被添加的软件已在 SDP 中有记录

示例:http://192.168.0.55/api/v3/workstations/2404/software/

请求参数

方法:POST

请求参数:

参数名

位置

input_data

<JSON_String>

body

authtoken

<API Key>

header


输入示例

 input_data:

{
    "software":[
        {
            "software":{
                "id":"3366"
            }

        }
,
        {
            "software":{
                "name":"1Checker"
            }

        }

    ]

}
可以使用软件的id也可以使用软件的名称

响应示例

 {

    "software":[
        {
            "software":{
                "name":"2.9 Build 1600",
                "id":"3366",
                "type":{
                    "id":"1"
                }

            }
,
            "usage":null,
            "workstation":{
                "part_no":"-",
                "chassis_type":null,
                "product":{
                    "id":"304"
                }
,
                "product_type":{
                    "id":"1"
                }
,
                "ci":{
                    "id":"3006"
                }
,
                "computer_group":{
                    "id":"2"
                }
,
                "name":"itsm-domain.medemo.com",
                "id":"2404",
                "state":{
                    "id":"2"
                }
,
                "barcode":null,
                "manufacturer":"VMware, Inc."
            }
,
            "software_type":{
                "name":"UnIdentified",
                "id":"1"
            }
,
            "version":"-",
            "file_size":"-",
            "license":null,
            "product_key":null,
            "is_suite_installation":false,
            "added_by":{
                "email_id":"admin@zohochina.net",
                "phone":"1234455",
                "name":"Administrator",
                "mobile":"13000000000",
                "profile_pic":{
                    "content-url":"/images/default-profile-pic2.svg",
                    "name":"default-profile-pic2.svg"
                }
,
                "is_vipuser":false,
                "id":"4",
                "department":{
                    "site":{
                        "name":"管理计算机(域)的内置帐户",
                        "id":32402
                    }
,
                    "name":"ITOM",
                    "id":9606
                }

            }
,
            "product_id":null,
            "location":"-",
            "installed_on":null,
            "id":"32413",
            "software_category":{
                "name":"Others",
                "id":"9"
            }

        }
,
        {
            "software":{
                "name":"1Checker",
                "id":"15321",
                "type":{
                    "id":"1"
                }

            }
,
            "usage":null,
            "workstation":{
                "part_no":"-",
                "chassis_type":null,
                "product":{
                    "id":"304"
                }
,
                "product_type":{
                    "id":"1"
                }
,
                "ci":{
                    "id":"3006"
                }
,
                "computer_group":{
                    "id":"2"
                }
,
                "name":"itsm-domain.medemo.com",
                "id":"2404",
                "state":{
                    "id":"2"
                }
,
                "barcode":null,
                "manufacturer":"VMware, Inc."
            }
,
            "software_type":{
                "name":"UnIdentified",
                "id":"1"
            }
,
            "version":"-",
            "file_size":"-",
            "license":null,
            "product_key":null,
            "is_suite_installation":false,
            "added_by":{
                "email_id":"admin@zohochina.net",
                "phone":"1234455",
                "name":"Administrator",
                "mobile":"13000000000",
                "profile_pic":{
                    "content-url":"/images/default-profile-pic2.svg",
                    "name":"default-profile-pic2.svg"
                }
,
                "is_vipuser":false,
                "id":"4",
                "department":{
                    "site":{
                        "name":"管理计算机(域)的内置帐户",
                        "id":32402
                    }
,
                    "name":"ITOM",
                    "id":9606
                }

            }
,
            "product_id":null,
            "location":"-",
            "installed_on":null,
            "id":"32414",
            "software_category":{
                "name":"Others",
                "id":"9"
            }

        }

    ]
,
    "response_status":[
        {
            "status_code":2000,
            "id":"32413",
            "status":"success"
        }
,
        {
            "status_code":2000,
            "id":"32414",
            "status":"success"
        }

    ]

}

Postman示例