3.4 Query organization architecture interface: getDeptInfo
**Request address:** - `/ivci/api/dept/getDeptInfo` **Request mode:** - POST,GET **Parameter description** |Parameter name|Type|Description|Remark| |:---- |:---|:----- |----- | |content| String | Request encrypted data |Mandatory| |merchantId | String | Request customer ID of the users| Mandatory| **Note** Content json format after decrypted via RSA ```json { "userName":"testuser", "antiFake":"4bbab6ff0d8042548cc6f2df9f3655fa", "timestamp":"20160518165030", "serverIP":"127.0.0.1", "queryDept":{ "deptId":9901 } } ``` **Content parameter description** |Name|Type|Description|Remark| |:---- |:---|:----- |----- | |userName | String | Username| Mandatory| |antiFake | String | Anti-fake random string | Mandatory| |timestamp | String |Request timestamp, accurate to second | Mandatory| |serverIP | String | Server IP | Mandatory| |queryDept | json | Query department information | Mandatory| |queryDept.deptId | String| Query the department ID, if not passing the value, request to ask the user's department information by default. | Optional| **Use examples:** 1. Back end ```java //Read privateKeyStr String privateKey=........... //Acquire data signature SimpleDateFormat formatter = new SimpleDateFormat ("yyyyMMddHHmmss"); String timestamp=formatter.format(new Date()); String signStr=RSAUtils.sign(timestamp.getBytes(), privateKey); String ip=request.getRemoteAddr(); //Encrypting with private key String ext=",\"queryDept\":{.............}";//Add department information String dataStr="{\"userName\":\"testuser\",\"antiFake\":\""+signStr+"\",\"timestamp\":\""+timestamp+"\",\"serverIP\":\""+ip+"\" "+ext+" }"; String content=RSAUtils.encryptByPrivateKey(dataStr, privateKey); ``` 2. Front end The background returns the encrypted content to the front-end, and then sends the request http://xxxxx/ivci/api/dept/delDeptById?merchantId=100000&content=content **Return data** All return data should be in json format. ```json {"code":1,"msg":"operation failure","data":{}} ``` **Return parameter** |Parameter name|Type|Description|Remark| |:---- |:---|:----- |----- | |code | String | Operate result code (success=0,failure=1), refer to appendix 1 | Return| |msg| String |Operate return message (if success, return null; failure, return prompt message )| | Return data need to be decoded, the decryption process is as follows: ```java String key="......"; String mi="56D56B912C68308AA6D863DE087DBFD82D65C37836FC15E0B92"; String ming=RSAUtils.decryptByPrivateKey(mi, key); ```