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
2
votes
1 answer

How to fix Restler + Explorer + Nginx (gives 404)

I have RESTler and the explorer working with Apache but it won't work with Nginx. The API works fine (server.com/api/class works fine) but http://server.com/api/explorer/index.html gives an Nginx 404. Anyone out there with RESTler + nginx + explorer…
2
votes
0 answers

php restler explorer 404 not found ../resources.json

When attempting to run restler explorer I keep getting 404 : Not Found ../resources.json I've gone round and round and found nothing to resolve this issue. It doesn't seem to be a permissions issue, nor a PHP version issue. My .htaccess looks like…
2
votes
1 answer

How to not send a response body

I'm trying to send a header response back from our api with a http status code 201 Created and a Location:header. No matter what I do I get a response body too, something that I don't want. If I return an empty string (return "";), restler will put…
2
votes
1 answer

AWS PHP SDK 2 (aws.phar) does not work with Restler Framework

I have been testing some PHP scripts that uses the aws-sdk-php to upload files to S3 storage. These scripts seems to work nicely when they are executed directly from the browser, but fails when trying to use it through an API class in Luracast…
Alvaro Luis Bustamante
  • 8,157
  • 3
  • 28
  • 42
2
votes
0 answers

how to use restler of javascript to get html from webpage

I am pretty new to the restler. I want to obtain the html contents from a webpage. Could somebody provide some examples? Thanks a lot.
user2547081
  • 189
  • 2
  • 8
2
votes
1 answer

Restler API Explorer POSTing JSON data

I am having a problem posting JSON data to my Restler Web Service using the Restler API Explorer. Here is an example /** * Inserts a product * * @param string $product_id {@from body} The SKU for the product * @return a product object which…
2
votes
1 answer

API Explorer not using URL parameters

I have created a RESTful API that has an optional parameter passed in as a URL variable. It seems to work correctly when executing from the browser directly but when trying it in the API Explorer it lists the parameter but ignores it when executing…
ken
  • 8,763
  • 11
  • 72
  • 133
2
votes
1 answer

Restler 3 - Default value for a parameter blocks ability to pass parameter in

I have a very simple class that derives off of the example "Say" class given on the Restler website. It is as follows:
ken
  • 8,763
  • 11
  • 72
  • 133
2
votes
1 answer

Restler: Internal actions

Is there a way to perform REST actions in the middle of executing an action? For example, if I perform GET /index.php/book/1 I might receive the following: [{ "id" : 1, "title" : "This is a book.", "owner_id" : 4 }] But what I'd like to…
2
votes
1 answer

Restler ssl https redirection

I'm using restler to write a REST api, and since I wan't to do some basic authentication I need to redirect every request wich doesn't come from https, to https. Does anybody know a way of doing this using the .htaccess file provided by restler or…
danielrvt
  • 10,177
  • 20
  • 80
  • 121
2
votes
1 answer

Authenticating users when using REST

Not sure if the title of the question expresses good my problem, so I'm going to do my best to explain it here: I'm writing a RESTful api using php and Restler. Now here comes the problem: There are some services that I'd like to protect, that is,…
danielrvt
  • 10,177
  • 20
  • 80
  • 121
2
votes
1 answer

Restler not receiving ñ character

I'm making a REST service using Restler, however I've found that when I pass it the ñ character, the whole parameter becomes null. Is this because of REST or because some weird encoding that I'm missing?
danielrvt
  • 10,177
  • 20
  • 80
  • 121
1
vote
0 answers

Apache 2.4 + Restler + PHP-FPM cannot access to url like http://test.php/test

Problem While I try to access on my server to url like : https://myserver/api.php/test I got "access denied" error. The server dont interpret that I want to use api.php file and try to redirect to test file ? Or what I want is to access at api.php…
Hugo
  • 11
  • 2
1
vote
1 answer

How to set an API operation as deprecated with Restler?

I am using Restler to provide a REST API in a code written in PHP and I would like to set an operation as deprecated in the API. I use the Restler API Explorer for documenting/browsing the API. The Restler API Explorer is based on Swagger UI and it…
Xebax
  • 432
  • 4
  • 11
1
vote
1 answer

Restler, writing test in behat for POST-Method

I want to write a TestScenario in Behat for a POST Method that takes an Object as input. Feature: Testing The ChildController Endpoint Scenario: Trying to create an Child by POSTing vars with an existing Id Given that I want to make a new…
1 2
3
17 18