Hi, Shubhada,

Two things – 1) this is how the metadata block should look.


   "metadata": {

        "metadatum": [

            {

                "metaname": "example-metaname-val-23573",

                "metaval": "example-metaval-val-72274"

            }

        ]

    },

2) make sure you set the depth query parameter.  In this case, GET 
/business/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances/service-instance/{service-instance-id}?depth=1

Depth=1 means give me the object at this level and its immediate descendants.

Thanks,
jimmy


From: <[email protected]> on behalf of Shubhada 
<[email protected]>
Date: Friday, June 29, 2018 at 3:05 AM
To: "[email protected]" <[email protected]>
Subject: [onap-discuss] [aai] Trouble in creating service instance with some 
metadata

Hi,

We are trying to create a new service instance with some metadata by invoking 
AAI API. The instance gets created. But when we try to get service instance 
details, we are not getting metadata back.

Can anyone please suggest if anything is wrong in below PUT API ? Thanks in 
Advance.

API used: PUT 
/business/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances/service-instance/{service-instance-id}
Body:
{
    "service-instance": [
        {
                                                
"global-customer-id":"TechM_Cust",
                                                "service-instance-id": 
"0aa1c4f0-5e0c-8888-8882-ab4fa3d22bf6",
                                                "service-instance-name": 
"Techm_vFW_ServiceInstance_2",
                                                "service-type":"vFW",
                                                "metadatum":{
                                                [
                                                                {
                                                                                
"metaname":"someName",
                                                                                
"metaval":"someValue"
                                                                }
                                                ]
                                                }
        }
    ]
}

GET 
/business/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances/service-instance/{service-instance-id}


Regards,
Shubhada
============================================================================================================================
Disclaimer:  This message and the information contained herein is proprietary 
and confidential and subject to the Tech Mahindra policy statement, you may 
review the policy at 
http://www.techmahindra.com/Disclaimer.html<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.techmahindra.com_Disclaimer.html&d=DwMFAg&c=LFYZ-o9_HUMeMTSQicvjIg&r=Oej6QUk5p2KdqNEWySpOHA&m=sNYUkBudvbshNAGI-Z2od2Ix3uFRxye2fbmdCrH1sZ0&s=R0HYLbREIYP-ztwUBDGi6wwyOWUpR6L9WxGVVTfBR78&e=>
 externally 
http://tim.techmahindra.com/tim/disclaimer.html<https://urldefense.proofpoint.com/v2/url?u=http-3A__tim.techmahindra.com_tim_disclaimer.html&d=DwMFAg&c=LFYZ-o9_HUMeMTSQicvjIg&r=Oej6QUk5p2KdqNEWySpOHA&m=sNYUkBudvbshNAGI-Z2od2Ix3uFRxye2fbmdCrH1sZ0&s=Lk5wga6lRUO41kQBt4nsGMSzfWyDSuFIW5Z60WqS1Hg&e=>
 internally within TechMahindra.
============================================================================================================================


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10695): https://lists.onap.org/g/onap-discuss/message/10695
Mute This Topic: https://lists.onap.org/mt/22892233/21656
Group Owner: [email protected]
Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to