locked
Need directions on uysing the SolveBIO API for medicine healthcare - RRS feed

  • Question

  • User-215451226 posted

    Hi All.

    I need some guidance/directions on the above mentioned. The name of the API is SolveBIO.
    What I am looking for, is a few pre-worked out samples/tutorial in C#, or a clear, code stub in C#. If you visit their official documentation and resources website also, I don't think you will be able to find directions on using their API with C#.

    • how to make a request to the API endpoint
    • what parameters to pass [if authentication credentials are required, for eg. api secret, key etc]
    • how to deal with the response[which must be in JSON/text format presumably]
    • if it can be used in a .NET Core application

    These are the things I am seeking.

    Thanks

    Sunday, March 1, 2020 8:16 AM

All replies

  • User1120430333 posted

    IMO, it would be in your best interest to contact them. You asking the forum is like being at Niagara Falls and asking another tourist. How do they turn the water off?

    https://www.solvebio.com/platform#core

    Sunday, March 1, 2020 9:34 AM
  • User-215451226 posted

    @DA924 As per your speak, I will write to them.

    Nevertheless,

    I'll await response from other members of the forum. Surely there's something related or even closely relevant faced/done by someone on here.
    Awaiting.

    Sunday, March 1, 2020 2:21 PM
  • User475983607 posted

    I'll await response from other members of the forum. Surely there's something related or even closely relevant faced/done by someone on here.
    Awaiting.

    The docs are very clear...

    https://docs.solvebio.com/applications/#step-1-create-your-app

    Step 2: Develop Your App

    SolveBio recommends the following frameworks to build apps:

    While you can technically use any app framework to develop an app, you may have to integrate OAuth2 support yourself if you choose to do so (contact SolveBio Support for help).

    .NET has OAuth libraries but it requires you take the time to learn OAuth.

    https://oauth.net/code/dotnet/

    Otherwise, you might want to hire someone to help you.

    Sunday, March 1, 2020 3:03 PM
  • User-215451226 posted

    Hi @mgebhard - written to them no response so far. Expectingsomething.

    Yes, even before you mentioned I saw it myself there was no support for C#. Which is why.
    The request can't be made by usual HttpWebRequest and Uri method? If I have to do plumbing for OAuth thyen that's a hullava lot of work just to call 1 API endpoint.

    I'm going to give this a try via the WebRequest way itself. Hope, something gives.

    Meanwhile open for more suggestions.

    Monday, March 2, 2020 12:13 PM
  • User475983607 posted

    Yes, even before you mentioned I saw it myself there was no support for C#. Which is why.
    The request can't be made by usual HttpWebRequest and Uri method? If I have to do plumbing for OAuth thyen that's a hullava lot of work just to call 1 API endpoint.

    Regardless of the amount of work, the service expects OAuth which usually means a JWT token.  You need to get the token so you can use it to access secure resources.   

    Monday, March 2, 2020 12:45 PM
  • User-215451226 posted

    mgebhard

    Regardless of the amount of work, the service expects OAuth which usually means a JWT token.  You need to get the token so you can use it to access secure resources.   

    Hey @mgebhard

    I have no idea what you wrote. What's jwt token, OAuth and "access secure resources" here got to do with preparing a proper format for making the request to SolveBio API endpoint? Did you read and understand the original question itself?

    Can someone else on the forum enlighten me on what exactly she meant by the above?


    Monday, March 2, 2020 4:10 PM
  • User475983607 posted

    I have no idea what you wrote. What's jwt token, OAuth and "access secure resources" here got to do with preparing a proper format for making the request to SolveBio API endpoint? Did you read and understand the original question itself?

    I'm a little confused by your response.  The SolveBIO documentation clearly states it uses OAuth2 which is a security standard.  The natural next step is setting aside the time to learn OAuth2 fundamentals.   

    https://aaronparecki.com/oauth-2-simplified/

    https://oauth.net/getting-started/

    https://dzone.com/articles/oauth-20-beginners-guide

    Also see link in my first post for .NET OAuth libraries.

    Monday, March 2, 2020 4:33 PM
  • User-215451226 posted

    mgebhard

    PGChoudhury

    I have no idea what you wrote. What's jwt token, OAuth and "access secure resources" here got to do with preparing a proper format for making the request to SolveBio API endpoint? Did you read and understand the original question itself?

    I'm a little confused by your response.  The SolveBIO documentation clearly states it uses OAuth2 which is a security standard.  The natural next step is setting aside the time to learn OAuth2 fundamentals.   

    https://aaronparecki.com/oauth-2-simplified/

    https://oauth.net/getting-started/

    https://dzone.com/articles/oauth-20-beginners-guide

    Also see link in my first post for .NET OAuth libraries.

    Your answers have no correlation with each other whatsoever and the very least with my Original question in Clearly Bulleted Points which you can read right at the top.
    These are your answers-
    https://forums.asp.net/post/6296007.aspx
    https://forums.asp.net/post/6296118.aspx

    @mgebhard I don't think you have the idea what and how to do this switching one thing and another. "access secure resources",  jWT Token and all that ....



    Expect meaningful relevant answers from forum posters on this.

    Monday, March 2, 2020 4:50 PM
  • User-215451226 posted

    Expecting some pertinent meaningful suggestions addressing the specified bulleted points I mentioned ....

    Monday, March 2, 2020 6:18 PM
  • User475983607 posted

    PGChoudhury

    how to make a request to the API endpoint

    Depends on how your application works. Use the standard HttpClient if you are doing the HTTP request from C#. 

    https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netframework-4.8

    Use AJAX or fetch if executing the HTTP Request for JavaScript.

    You send a Bearer token (access token) in the HTTP header.  You get the Bearer token from the SolveBIO OAuth server.

    PGChoudhury

    what parameters to pass [if authentication credentials are required, for eg. api secret, key etc]

    Read the SolveBIO documentation as it will show the data format.  The secret key is used to identify/register your application with SolveBIO.  Again, if you take the time to learn Oauth2 this will become a bit more clear. 

    PGChoudhury

    how to deal with the response[which must be in JSON/text format presumably]

    If you are using HttpClient then you can also use NewtonSoft to deserialize the JSON stream into a C# type.  

    https://www.newtonsoft.com/json/help/html/DeserializeObject.htm

    If you are using JavaScript then the JSON is already a type.

    PGChoudhury

    if it can be used in a .NET Core application

    Yes

    PGChoudhury

    Expecting some pertinent meaningful suggestions addressing the specified bulleted points I mentioned ....

    IMHO, you really need to learn OAuth as mentioned several times...

    Monday, March 2, 2020 6:33 PM