Questions tagged [restler]

A micro framework that can expose any PHP class and its methods as Pragmatic and/or RESTful API.

Restler is a simple multi-format Web API Server written in PHP. It is open sourced under LGPL license.

258 questions
0
votes
1 answer

Restler get/index with optional value

I'm trying to define a method with Restler so that if I do .../clients/123 then it returns that specific client, and if I leave off the 123 then it returns all clients. I tried this: /** * @param int $id The SQL identifier */ function index($id…
Gargoyle
  • 9,590
  • 16
  • 80
  • 145
0
votes
1 answer

Restler 3 nested resources?

In restler, is is possible to use nested resources? For example, with restler I would do the normal /api/account/123 call to get that specific account. Now I want to get the clients that belong to that account. So I'd want to also call…
Gargoyle
  • 9,590
  • 16
  • 80
  • 145
0
votes
1 answer

Can we use Restler on Google App Engine

I want to create a website on Google Cloud (Google App Engine & Restler RESTful API Server) with sub domains: http://api.restlerongooglecloud.com for hybrid app (Android, iOS, Windows) joomla.restlerongooglecloud.com for blog and…
Join Free
  • 89
  • 3
0
votes
1 answer

Upload a CSV in Restler 3rc5 through CSVformat

I'm trying to post a CSV to one of our API's and import data from it. I took a look at CSVFormat and it looks like it handles the parsing of the CSV and puts the result in an array, which is awesome! However, I'm having some issues when trying to do…
zongweil
  • 2,031
  • 2
  • 21
  • 30
0
votes
1 answer

Luracast restler 3 returns nothing

I've messed something up on my installation of restler. Down in a subfolder of my website where I want the REST api I put the vendor directory that comes with restler (got rid of everything else), and then I created an index.php file at that same…
Gargoyle
  • 9,590
  • 16
  • 80
  • 145
0
votes
1 answer

Can I pass a dictionary object to Restler?

I know I can specify 'array' as the type for arrays, but what do I use when I want to pass in a dictionary type to a method using Restler 3? The whole 'outer' block passed to the POST method is of course a dictionary type, but now I want one of the…
Gargoyle
  • 9,590
  • 16
  • 80
  • 145
0
votes
1 answer

Restler SerializedFile is not working

I've installed Restler with success. Everything is working ok except the SerializedFile.php. I've made sure that it is un-commented, folder and files have correct permissions and it is still not working. when i open the page and navigate to…
user2062455
  • 411
  • 5
  • 14
0
votes
1 answer

Restler 2 cross domain POST AJAX call

I've built my server with a simple REST API using Restler 2. Now I'm trying to do a POST request to that API from my localhost with AJAX, and I see that a OPTIONS request is being sent before, and Restler doesn't handle it. I added…
Hugo Sousa
  • 1,904
  • 2
  • 15
  • 28
0
votes
1 answer

Restler 3.0 RC5 HtmlFormat uses mkdir

first thanks for your brilliant work on Restler, I am using it for some labs at the University and so far it works like a charm, really simple and elegant framework! I've been using Restler 3.0 RC4 successfully until I updated to RC5 today. Now I'm…
lukasged
  • 198
  • 1
  • 11
0
votes
1 answer

Luracast Restler - routing one object/list of object in one routing rule

I dont know how to configure routing class to route this in one index method: categories/176 categories/?depth=3&category=4 first URL is for one category, the second one is for list of categories (filtered by depth and category parameter). I have…
demijohn
  • 198
  • 1
  • 7
0
votes
1 answer

Deal with Restler versioning

I'm trying to use Restler versioning but there is something i don't get. On the BMI example it's written that: Only integers are supported for versioning. When not specified explicitly the version is assumed to be one. But in your example, the v2…
cocoggu
  • 401
  • 7
  • 18
0
votes
1 answer

add JsonP-Format for callback function to restler

I´m trying to add JSONP Format to lucarest restler api without luck As mentioned in this thread jsonpsupport i added a new file jsonpformat.php with the given context into my vendor/ folder where restler.php resides. Then i added the…
Inge
  • 427
  • 7
  • 20
0
votes
1 answer

How to get parameters in iAuthenticate class (Restler)

For my API, I have a database of items and users. API calls follow the format of POST(GET, DELETE, etc.) http://example.com/api/items/4 When a user calls an API, I'd like to be able to get the id of the item to make sure that the user actually has…
zongweil
  • 2,031
  • 2
  • 21
  • 30
0
votes
1 answer

Restler 2: When calling index.php, display error 404

I am new to Restler 2.0 I trying to create an API, http://exampe.com/api/index.php/lbs/hello/123456 and it return success result But when i put http://exampe.com/api/index.php/lbs/getloc/123456, it return fail. Anyone know what does it happen?…
0
votes
1 answer

Remote API exploring not working (Restler Framework)

I have a Restler-powered API (api.example.com) and I have a website for developers (developer.example.com). My aim is to be able to explore the API from the latter site. But as I add this to the API Explorer options:…
Mate Kocsis
  • 126
  • 1
  • 8