Get data from REST API

  • 146Views
  • Last Post 12 May 2021
0
votes
Ronnie ├ůstrand posted this 04 May 2021

Hi.

I am trying to get the REST API to work but I am not able to get the metadata correct and therefor I am not getting any data back.
Can someone point me in the right direction, how would metadata look it where to get the employee from the example below ?

Would really appretiate som help

dummy.restapiexample.com/api/v1/employees

0
votes
Olena Romanchuk posted this 12 May 2021


Hello Ronnie,

We are sorry for the delay with reply.

To connect to the API example please do the following:

1. Create new REST connection
2. Specify the URL: http://dummy.restapiexample.com/api/v1 
3. Select the Authentication: None
4. Specify the metadata by copying the following text 

{  "ProviderConfiguration" : {

    

  },

 

  "Metadata" : [

 

   //Employees

  {

      "Name":"Employees",

      "Url":"/employees",

      "ResultPath": "data",

      "Columns" : [

          {"Name": "Id", APIPath: "id", "DbType":"Int32", "Primary": true, "Createable":false, "Updateable":false},

          {"Name": "EmployeeName", APIPath: "employee_name", "DbType":"String", "Createable":false, "Updateable":false},

          {"Name": "EmployeeSalary", APIPath: "employee_salary", "DbType":"Decimal", "Createable":false, "Updateable":false},

          {"Name": "EmployeeAge", APIPath: "employee_age", "DbType":"Int32", "Createable":false, "Updateable":false},

          {"Name": "ProfileImage", APIPath: "profile_image", "DbType":"String", "Createable":false, "Updateable":false}       

      ]

     }

    //end of Employees

       

  ]

}

5. Save the connection.  

Please inform us about the result.

Close