Query web API and return JSON data

  • curl -X GET "https://api.server.com/v1/markets/quotes?symbols=AAPL,VXX190517P00016000&greeks=false" \

    -H 'Authorization: Bearer <TOKEN>' \

    -H 'Accept: application/json'

    How do i run this Rest Json API in sql server directly ?

    I believe its a combination of using he below, but i could not figure out the last syntax.

    sp_OACreate,

    sp_OAMethod

    sp_OAGetProperty

    Python version is here :

    # Version 3.6.1 import requests

    response = requests.get('https://api.server.com/v1/markets/quotes',

    params={'symbols': 'AAPL,VXX190517P00016000', 'greeks': 'false'},

    headers={'Authorization': 'Bearer <TOKEN>', 'Accept': 'application/json'} )

    json_response = response.json()

    print(response.status_code)

    print(json_response)

    • This topic was modified 1 year, 1 month ago by  xclaim.david. Reason: API, JSON, REST, sp_OACreate
  • This was removed by the editor as SPAM

  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply