Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4826

Ember Beginner - Problem with JSONAPIAdapter

$
0
0

@FlorianKrippner wrote:

Hi, I have the following problem.

I want to get data from a other server. the data is in json structure. If i access the url http://localhost:8085/v1/extension/dummy/widgets/totalOverviewWidget i get this: {"data":{"type":"totalOverviewWidget","id":"dashboard-extension-d468eba4-e90c-4de9-986d-cad1054a10c9-1","attributes":{"name":"test","numberOfSystems":1,"numberOfNodes":2,"numberOfApplications":1}}}

i want this data now in ember… i created a Model like this:

   ` //modelname: totalOverviewWidget`
        import DS from 'ember-data';
        const { Model } = DS;

    export default Model.extend({
    	name: DS.attr(),
    	numberOfSystems: DS.attr(),
    	numberOfNodes: DS.attr(),
    	numberOfApplications: DS.attr()
    });

now i tried to get the data like this from the server: this.store.query(‘totalOverviewWidget’, {});

the error i get is this: http://localhost:8085/v1/extension/dummy/widgets/total-overview-widgets 404 (Not Found)

everytime i use like query or findRecord etc it puts a “s” at the end of the url and it cant find my data.

What is the best way to get the data from that other server to display it later on my website ?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles