400 error on basic API calls?

Hello everyone,

I just installed Dreamfactory on my Mac to create an API to make data available from a PostgreSQL but with no luck.

localhost:8080/rest

{“service”:[{“name”:“Database”,“api_name”:“db”},{“name”:“Email Service”,“api_name”:“email”},{“name”:“Local File Storage”,“api_name”:“files”},{“name”:“PostgreSQL”,“api_name”:“pgdb”},{“name”:“Local Portal Service”,“api_name”:“portal”}]}

but on both

http://localhost:8080/rest/db
http://localhost:8080/rest/pgdb

I get:

{“error”:[{“context”:null,“message”:“No application name header or parameter value in request.”,“code”:400}]}

Do I need to do anything? Did I miss something, happy to be pointed to a FAQ or Documentation if it is better outlined…

Thank you!

Kostas

Hi, I think I can help you here. You need the header X-DreamFactory-Application-Name with the value of the name of your app. This should go in all requests to your api.

@babaggeii is correct: you receive the error No application name header or parameter value in request. because you are not supplying an application name in the API call.

Supplying your application name as an HTTP header X-DreamFactory-Application-Name value is one way to accomplish this. The other way is to use the URI parameter ?app_name= in your call.

Please refer to this wiki page for further reading: https://github.com/dreamfactorysoftware/dsp-core/wiki/Common-Headers-Parameters