Hi Chandra,

Are you looking to get a count of the cloud regions lets say like this?

GET /aai/v14/cloud-infrastructure/cloud-regions?format=count

That will return something like below:

{
    "results": [
        {
            "cloud-region": 9
        }
    ]
}

The API you are invoking is custom query in which you needed to provide what 
kind of custom query you are interested in and what the start vertexes would be:

PUT /aai/v14/query?format=count

{
  "start": "<START_URI >",
  "query": "query/<CUSTOM_QUERY_NAME>"
}

Thanks,
Harish

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of 
Chandra
Sent: Friday, April 5, 2019 12:10 PM
To: [email protected]; [email protected]
Subject: Re: [onap-discuss] [aai] API to get the count of objects

Hi Keong,
Thanks for the response.

Do we have any Json to post while calling this Put API?

Or its just get API.. I tried with both getting the error as -

https://urldefense.proofpoint.com/v2/url?u=https-3A__-257Baai-2Dapi-257D-3A-257Baai-2Dport-257D_aai_v14_query-3Fformat-3Dcount&d=DwIGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=f44eG3iZaja2ozEA2yRZnQ&m=zKC1QPPITaz_SRr83L8bVYe3TF4mf7PSbHvlUqO9FBo&s=233ulJjtSpuc89zA1JJA9UDvN-iTlqRHqY9CqsC1hzg&e=

{
    "requestError": {
        "serviceException": {
            "messageId": "SVC3000",
            "text": "Invalid input performing %1 on %2 (msg=%3) (ec=%4)",
            "variables": [
                "PUT",
                "v14/query",
                "Invalid input performing %1 on %2:Unrecognized AAI object 
query",
                "ERR.5.2.3000"
            ]
        }
    }
}

-----Original Message-----
From: [email protected] [mailto:[email protected]] On 
Behalf Of Keong Lim
Sent: 04 April 2019 05:37
To: Chandrashekhar Thakare <[email protected]>; 
[email protected]
Subject: Re: [onap-discuss] [aai] API to get the count of objects

On Wed, Apr  3, 2019 at 02:47 PM, Chandra wrote:
>
> Hi ,
> Is there any API in AAI which just provides the count of individual objects by

Hi Chandra,

Looking at the ONAP documentation on readthedocs, you can find the "format" 
query parameter value "count":
- 
https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.onap.org_en_casablanca_submodules_aai_aai-2Dcommon.git_docs_AAI-2520REST-2520API-2520Documentation_nodesQuery.html-23format&d=DwIGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=f44eG3iZaja2ozEA2yRZnQ&m=zKC1QPPITaz_SRr83L8bVYe3TF4mf7PSbHvlUqO9FBo&s=Y89hk0qX1-46J7evYzVXLOJ6draBde1hjtk9nqKL-m4&e=
- 
https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.onap.org_en_casablanca_submodules_aai_aai-2Dcommon.git_docs_AAI-2520REST-2520API-2520Documentation_AAIRESTAPI-5FCASABLANCA.html-23count&d=DwIGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=f44eG3iZaja2ozEA2yRZnQ&m=zKC1QPPITaz_SRr83L8bVYe3TF4mf7PSbHvlUqO9FBo&s=z6la4FgopVXhMxm_61XMx5GrRhAS3u6DgyERFF-ko80&e=

which produces output like this:

{
  "results": [
    {
      "pnf": 4,
      "p-interface": 5,
      "l-interface": 3,
      "pserver": 1
    }
  ]
}

Keong



============================================================================================================================

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 
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.techmahindra.com_Disclaimer.html&d=DwIGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=f44eG3iZaja2ozEA2yRZnQ&m=zKC1QPPITaz_SRr83L8bVYe3TF4mf7PSbHvlUqO9FBo&s=IKno4rIMTseDqTJLX9-eeYIvPDQs8KxDaFH-t1JZoCo&e=
 
<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.techmahindra.com_Disclaimer.html&d=DwIGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=f44eG3iZaja2ozEA2yRZnQ&m=zKC1QPPITaz_SRr83L8bVYe3TF4mf7PSbHvlUqO9FBo&s=IKno4rIMTseDqTJLX9-eeYIvPDQs8KxDaFH-t1JZoCo&e=>
 externally 
https://urldefense.proofpoint.com/v2/url?u=http-3A__tim.techmahindra.com_tim_disclaimer.html&d=DwIGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=f44eG3iZaja2ozEA2yRZnQ&m=zKC1QPPITaz_SRr83L8bVYe3TF4mf7PSbHvlUqO9FBo&s=jWunto8wbxKruHCObPpZmuE4-fNlZ5Q8jlURXa197vQ&e=
 
<https://urldefense.proofpoint.com/v2/url?u=http-3A__tim.techmahindra.com_tim_disclaimer.html&d=DwIGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=f44eG3iZaja2ozEA2yRZnQ&m=zKC1QPPITaz_SRr83L8bVYe3TF4mf7PSbHvlUqO9FBo&s=jWunto8wbxKruHCObPpZmuE4-fNlZ5Q8jlURXa197vQ&e=>
 internally within TechMahindra.

============================================================================================================================




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

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

Reply via email to