Can you post the full response from the patch? The body should have more 
details.

I believe that error means the resource versions didn’t match.



Daniel Rose
ECOMP / ONAP
com.att.ecomp
732-420-7308

From: onap-discuss-boun...@lists.onap.org 
[mailto:onap-discuss-boun...@lists.onap.org] On Behalf Of Pujar, Rashmi
Sent: Friday, August 11, 2017 3:43 PM
To: onap-discuss@lists.onap.org
Subject: [onap-discuss] [AAI] PATCH request in AAI

Hello AAI devs!

I see that AAI supports PATCH requests [1]. I want to update the 
“service-instance-location-id” and “metadata” fields in a specific 
service-instance. However, I get a 412: Pre-requisite failed as response. Below 
is my PATCH request to AAI.
Are there any constraints on the type of attribute that are modifiable? If yes 
is there documentation or some reference in code to get to know that info.

PATCH 
/aai/v8/business/customers/customer/Desjardins/service-subscriptions/service-subscription/SDWAN/service-instances/service-instance/8128c8ee-13f5-4f0b-9cf5-7932e32664fc
 HTTP/1.1
Host: <AAI_IP>:<8443>
Authorization: Basic QUFJOkFBSQ==
X-FromAppId: TEST
Content-Type: application/merge-patch+json
Accept: application/json
Cache-Control: no-cache
Postman-Token: fa51808d-2544-87aa-cb89-1d6842671e3d

{
   "service-instance-id":"8128c8ee-13f5-4f0b-9cf5-7932e32664fc",
   "service-instance-location-id":"siteId",
   "metadata":{
      "metadatum":[
         {
            "metaname":"test1",
            "metaname":"testtest"
         },
         {
            "metaname":"test2",
            "metaname":"testtest"
         }
      ]
   }
}


Thanks,
Rashmi

[1]: 
https://wiki.onap.org/display/DW/AAI+API?preview=/1015849/1017043/AAIRESTAPI_8.pdf<https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.onap.org_display_DW_AAI-2BAPI-3Fpreview-3D_1015849_1017043_AAIRESTAPI-5F8.pdf&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=2wwdGZ3YcpSivQ2Kio028A&m=P3tQKwJirDdc9zMbuHLPchgz6XOuJ3Arpvu-05mxDWM&s=MTQ9ffX46qFEx0wQkQwCzQY2HG5TQyTuG_Jf21iTjDI&e=>

_______________________________________________
onap-discuss mailing list
onap-discuss@lists.onap.org
https://lists.onap.org/mailman/listinfo/onap-discuss

Reply via email to