So, the value of the TscIpSubscriber object prior to my operations:
GET http://srvroxe01.nxodev.intra/api/rest/ ... riber/1045 HTTP/1.1
Code: Select all
{
"objectName": "Tsc_IP_subscriber",
"objectId": "1045",
"attributes": [
{
"name": "Directory_Number",
"value": [
"1045"
]
},
{
"name": "Ethernet_Address",
"value": [
"00:80:9f:c7:84:02"
]
},
{
"name": "IP_Add_Mode",
"value": [
"ipv4"
]
},
{
"name": "IP_Address",
"value": [
"192.168.201.106"
]
},
{
"name": "IP_Domain_Number",
"value": [
"0"
]
},
{
"name": "IP_Softphone_Emul",
"value": [
"No"
]
},
{
"name": "Reset_For_Update",
"value": [
"Yes"
]
},
{
"name": "Station_Type",
"value": [
"NOE_C_Color_IP"
]
},
{
"name": "Use_Volume_In_System",
"value": [
"Yes"
]
},
{
"name": "Voice_Coding_Algorithm",
"value": [
"Default"
]
}
]
}
Code: Select all
PUT http://srvroxe01.nxodev.intra/api/rest/1.0/pbxs/143/instances/Subscriber/1045/Tsc_IP_subscriber/1045 HTTP/1.1
user-agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)
Content-Type: application/json; charset=utf-8
Host: srvroxe01.nxodev.intra
Cookie: JSESSIONID=A4424918F4E81F16B50AA0F617CD7D34.tomcat; AlcUserId=userid
Content-Length: 57
Expect: 100-continue
{"attributes":[{"name":"Ethernet_Address","value":[""]}]}
Code: Select all
HTTP/1.1 204 No Content
Date: Tue, 26 Feb 2019 15:11:15 GMT
Server: Apache/2.4.23
Content-Length: 0
Then I'm trying to restore the MAC address
Code: Select all
PUT http://srvroxe01.nxodev.intra/api/rest/1.0/pbxs/143/instances/Subscriber/1045/Tsc_IP_subscriber/1045 HTTP/1.1
user-agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)
Content-Type: application/json; charset=utf-8
Host: srvroxe01.nxodev.intra
Cookie: JSESSIONID=A4424918F4E81F16B50AA0F617CD7D34.tomcat; AlcUserId=eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJzZGt1c2VyIiwiaWF0IjoxNTUxMTkzNzYzfQ.WMLMPQlEmWLgAopebzUAa0Xb9ASyyylrxTYU0KozC6M
Content-Length: 74
Expect: 100-continue
{"attributes":[{"name":"Ethernet_Address","value":["00:80:9f:c7:84:02"]}]}
Code: Select all
HTTP/1.1 500 Internal Server Error
Date: Tue, 26 Feb 2019 15:12:14 GMT
Server: Apache/2.4.23
Content-Length: 240
Connection: close
Content-Type: application/json
{"httpStatus":"INTERNAL_SERVER_ERROR","code":1007,"helpMessage":"Server general problem. Please contact the administrator to fix the problem.","type":"SERVER_PROBLEM","innerMessage":"error during parsing the allowed value","canRetry":false}