Click here to Skip to main content
15,942,710 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to use following api? Centers for Medicare & Medicaid Services Data[^]


error: undefined

What I have tried:

<pre><script>

    $(document).ready(function(){
        $.ajax({
            url: "https://data.cms.gov/data-api/v1/dataset/0d753f51-c3de-43cd-95d2-550a23b8606a/data",
            type: "GET",
            dataType: "jsonp",
            success: function (r) {
                alert("Success: " + r.d);
            },
            failure: function (r) {
                alert("fail: " + r.d);
            },
            error: function (r) {
                alert("error: " + r.d);
            }
        });
    });
</script>
Posted
Updated 21-Nov-22 12:43pm
Comments
Richard Deeming 22-Nov-22 4:37am    
REPOST
You have already posted this question. The answer has not changed: YOU need to read the API documentation.
How do I use API and display in VB.NET[^]
[no name] 22-Nov-22 9:03am    
this question is for error: undefined using ajax. I am not sure what YOU talking about. If YOU dont want help than just dont waste your time on this thread
Richard Deeming 22-Nov-22 10:31am    
1) You have provided precisely zero details of the "error".

2) You have tried absolutely nothing, and want someone else to do your work for you.

3) You have already posted a "how do I use this API" question, and been told what you need to do.

If you don't want to follow the rules of the site, then don't post here. Keep ignoring the rules, and you will be banned from the site.
[no name] 22-Nov-22 11:24am    
1st, i posted the error i got. 2nd, i have tried and posted my code. This is not my orgional code. I guess you cant see. 3rd, this totally different question and different programming language, with different error. You dont seem to be good at helping people. 4TH, STOP POSTING COMMENT ON MY THREAD AND HARASSING ME. 5th, stop confusing other users who are trying to help.
Richard Deeming 22-Nov-22 11:27am    
If you think "undefined error" is enough information for anyone to diagnose the problem, then you're clearly not cut out for this line of work. 🤣

And I'm not "confusing other users"; as I keep telling you, you haven't provided enough information for anyone to help you, on either copy of your question.

1 solution

Google for "javascript how to use a web api". Beyond that, questions about the specifics of the CMM api would have to be directed at them.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900