PUT#
task: Update instance
relation/LineRelation/55b9fe59a6165413b9d17628
user: site administrator
hierarchy:
55b9dc81a6165413b9d16ab6
Field Display Policy:
LineMenuFDPSite
Configuration Template:
line-cft
Payload file:
put-payload.json
Snippet of put-payload.json
, showing the updated alertingName
value to “Helpdesk”:
...
{
"data": {
"partyEntranceTone": "Default",
"cfaCssPolicy": "Use System Default",
"autoAnswer": "Auto Answer Off",
"callForwardNotRegisteredInt": {
"forwardToVoiceMail": false
},
"routePartitionName": "Site-locus1",
"callForwardOnFailure": {
"forwardToVoiceMail": false
},
"rejectAnonymousCall": false,
"aarKeepCallHistory": true,
"callForwardBusy": {
"forwardToVoiceMail": false
},
"pattern": "90124",
"patternPrecedence": "Default",
"presenceGroupName": "Standard Presence group",
"callForwardNoAnswer": {
"forwardToVoiceMail": false
},
"callForwardNoCoverage": {
"forwardToVoiceMail": false
},
"callForwardNotRegistered": {
"forwardToVoiceMail": false
},
"usage": "Device",
"alertingName": "Helpdesk",
...
$ curl -v
-H 'Authorization: Basic YWRtaW5AbG9jdXMxLmNvbTpwYXNzd29yZA=='
-H 'Content-Type:application/json'
--data-binary @put-payload.json
-X PUT 'http://localhost/api/relation/LineRelation/55b9fe59a6165413b9d17628/
?hierarchy=55b9dc81a6165413b9d16ab6
&policy_name=LineMenuFDPSite
&template_name=line-cft
&nowait=true
&format=json'
+ About to connect() to localhost port 80 (#0)
+ Trying 127.0.0.1... connected
> PUT /api/relation/LineRelation/55b9fe59a6165413b9d17628/
?hierarchy=55b9dc81a6165413b9d16ab6
&policy_name=LineMenuFDPSite
&template_name=line-cft
&nowait=true
&format=json HTTP/1.1
> Authorization: Basic YWRtaW5AbG9jdXMxLmNvbTpwYXNzd29yZA==
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu)
libcurl/7.22.0
OpenSSL/1.0.1
zlib/1.2.3.4
libidn/1.23
librtmp/2.3
> Host: localhost
> Accept: */*
> Content-Type:application/json
> Content-Length: 1926
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
< HTTP/1.1 202 ACCEPTED
< Server: nginx/1.1.19
< Date: Thu, 30 Jul 2015 13:00:33 GMT
< Content-Type: application/json
< Transfer-Encoding: chunked
< Connection: keep-alive
< Vary: Accept, Cookie, Accept-Language, X-CSRFToken
< Content-Language: en-us
< Allow: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
< X-CSRFToken: GgxBBhTjkB2IUib2lHgIVzeohhmK2arc
< Set-Cookie: csrftoken=GgxBBhTjkB2IUib2lHgIVzeohhmK2arc;
SameSite=Lax;
httponly;
Path=/
< Set-Cookie: sessionid=8skxwiqojuyz5xl37cdcflbr5ct5ncrk;
SameSite=Lax;
httponly;
Path=/
<
+ Connection #0 to host localhost left intact
+ Closing connection #0
{"href": "/api/tool/Transaction/0bebcaa2-df37-420f-bd15-3a00ea056092/",
"success": true,
"transaction_id": "0bebcaa2-df37-420f-bd15-3a00ea056092"}