Questions tagged [codeigniter-restserver]

A fully RESTful server implementation for CodeIgniter using one library, one config file and one controller.

A fully RESTful server implementation for CodeIgniter using one library, one config file and one controller.

Dowloads :

REST SERVER

REST CLIENT

Tutorials

http://net.tutsplus.com/tutorials/php/working-with-restful-services-in-codeigniter-2/

98 questions
19
votes
3 answers

HTTP OPTIONS error in Phil Sturgeon's Codeigniter Restserver and Backbone.js

My backbone.js application throwing an HTTP OPTIONS not found error when I try to save a model to my restful web service that's located on another host/URL. Based on my research, I gathered from this post that : a request would constantly send an…
17
votes
5 answers

CodeIgniter Passing POST data from RestClient to RestServer API

I've spent my whole day trying to figure out this problem. Posting this issue here is my last hope. I hope someone can help to continue working on my first job. So, POST works fine when directly passing data from my views to the RestServer directly.…
13
votes
2 answers

token based authentication in codeigniter rest server library

I am try to build restful API in codeigniter using Phil Sturgeon's rest server Problem is I can't figure out how to do token based authentication. I am building that API for mobile app and it is over HTTPS. At first user will authentication by…
Nuryagdy Mustapayev
  • 667
  • 1
  • 7
  • 27
12
votes
10 answers

enabling cors in codeigniter ( restserver by @chriskacerguis )

http.get request in agularJs controller works fine when my client app and api are in localhost. when api is moved to server., issue arised. client side using…
onerinas
  • 198
  • 1
  • 1
  • 11
10
votes
1 answer

Why doesn't the login session "stick" when login in using "ionic serve" window but works when I point the browser to the www folder?

I am using Ionic to build a login system on top of Codeigniter/Ion_Auth/codeigniter-restclient and when I try to login from "ionic server" the login works but the next api request to the logged_in() method returns false. The same thing works…
9
votes
2 answers

Codeigniter 3 autoload controller

I'm using REST Server in codeigniter, and the way to use is that then in my app in all my controllers I must write this line on start: require APPPATH . '/libraries/REST_Controller.php'; Does anyone know how to autoload this REST_Controller and to…
Sasa
  • 553
  • 7
  • 25
6
votes
2 answers

Phil Sturgeon's REST server, Codeigniter3, error messages no return on PUT

I am using Phil Sturgeon's REST server, CI3 and POSTMAN for debugging. I send a PUT with below info, however, I am not receiving the error messages expected. Here is my form_validation.php:
spreaderman
  • 918
  • 2
  • 10
  • 39
4
votes
1 answer

REST API for codeigniter 2.0.1

codeigniter-restserver is available for codeigniter 2.1.0 or above (https://github.com/chriskacerguis/codeigniter-restserver) but unable to find REST API for codeigniter 2.0.1 How to create restserver in codeigniter 2.0.1
Ankit Gupta
  • 41
  • 1
  • 4
4
votes
3 answers

Phil Sturgeon’s REST API always returning: status:0, error:Unknown method

I am always getting the this error. {"status":false,"error":"Unknown method."} But all syntax are correct from my side. because everything is working fine on the browser but same URL integration on the devices gives the 'unknown method…
Anuja P
  • 2,123
  • 2
  • 19
  • 32
4
votes
2 answers

Codeigniter routing and REST server

I'm trying to achieve the following URLs for my API (I'm using Codeigniter and Phil Sturgeon's REST server library): /players -> refers to index method in the players controller /players/rookies -> refers to rookies method in the…
gregory
  • 1,140
  • 2
  • 11
  • 27
3
votes
3 answers

how to get rid of /index at end

I am using PHP codeigniter and chriskacerguis/codeigniter-restserver. In log file I am seeing 404. because some how /index is getting append at end. correct url is api/CurrentYear DEBUG - 2016-02-02 02:14:48 --> UTF-8 Support Enabled DEBUG -…
fresher
  • 399
  • 4
  • 23
3
votes
2 answers

Invalid Api key using RestServer

I am using the codeigniter rest server api library. When I enter http://localhost/projects/myapi/key/index_put.php and hit enter gives me the following error: 0 Invalid API Key When I give a dummy string…
mparo_afridi
  • 179
  • 1
  • 2
  • 8
3
votes
0 answers

How to use codeigniter rest api from Phil and Backbone.js to GET, POST , PUT, DELETE data?

I'm working with Phil rest library for codeigniter. According to his documentation a rest api can have as many parameters as we want so, the url is structured as follows: /method/{resource/value} which translates into this /users/id/1 and we can…
Lothre1
  • 3,523
  • 7
  • 43
  • 64
2
votes
1 answer

codeigniter 4 rest api error 501 show action not implemented

I'm trying to create a simple REST server using CI 4 based on this article. this is my code: app/Controllers/Barang.php
dapidmini
  • 1,490
  • 2
  • 23
  • 46
2
votes
0 answers

I cant run codeigniter-restserver

im trying to run codeigniter-restserver. Here what i've done; i installed latest codeigniter to my localhost. then in the root directory of clean installed codeigniter i runned composer require chriskacerguis/codeigniter-restserver the vendor…
Ali Aydin
  • 33
  • 4
1
2 3 4 5 6 7