none
How to get api ids from API management REST Services RRS feed

  • Question

  • I have a situation here. I want to get details from a particluar api by providing api management URL.

    In current scenario ,I am able to get it by providing the apiids.

    please refer below for the api call details:

         static async Task<string> GetAPI(string apiId)
            {                     
                string requestUrl = string.Format("{0}/apis/{1}?api-version={2}", baseUrl, apiId, apiVersion);

                using (HttpClient httpClient = new HttpClient())
                {
                    var request = new HttpRequestMessage(HttpMethod.Get, requestUrl);

                    // Set the SharedAccessSignature header
                    request.Headers.Authorization =
                        new AuthenticationHeaderValue("SharedAccessSignature", sharedAccessSignature);

                    // Content Type header not required since default is application/json, no need to
                    // set accept header

                    // Make the request
                    HttpResponseMessage response = await httpClient.SendAsync(request);

                    // Throw if there is an error
                    response.EnsureSuccessStatusCode();

                    string responseBody = await response.Content.ReadAsStringAsync();

                    return responseBody;
                }
            }




    • Moved by 宝宝徐 Friday, October 13, 2017 2:46 AM
    Monday, October 9, 2017 5:48 AM

All replies

  •  guys requires urgently..

    Monday, October 9, 2017 7:01 AM
  • Hi Soumya027,

    Thank you for posting in MSDN forum.

    To have a better understanding of this issue, could you please tell us if you are using Azure API Management?  If so , I will help you re-direct this link to a much appropriate forum to get a much professional support.

    Thank you for your understanding.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, October 10, 2017 7:23 AM