96 questions
2
votes
1
answer
2k
views
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
<?php
namespace App\Controllers;
use CodeIgniter\RESTful\ResourceController;...
-2
votes
1
answer
496
views
Restapi sends "invalid api key" message to client side
I'm creating a rest api using codeigniter 3 and it's running fine, but I'm having problems with how to display {"status":false,"error":"Invalid API key "} on the client ...
0
votes
1
answer
919
views
CodeIgniter 3 REST Api cannot read routes
I am doing a versioning in my REST API and have it structured this way
example.domain.com
↳ v1
↳ v2
It will be browsed like https://www.example.domain.com/v1 or https://www.example.domain.com/v2 ...
0
votes
0
answers
63
views
How to redirect to another link after send reponse JSON
I make a API Restful with codeigniter-restserverto recieve POST request from another website, the scema is after sent response json i must redirect to another website to confirm that I have received ...
0
votes
0
answers
533
views
Video cannot be uploaded to server side [react native + codeigniter]
I faced this problem since yesterday and I am still unable to find a solution for this. I just don't have any idea why was the video cannot be uploaded by using rest server.
I am using react native ...
1
vote
1
answer
850
views
Extends REST_Controller and MY_Controller at once in CodeIgniter
I have this situation where I need to access a global function and normally I will do that in MY_Controller for the normal CodeIgniter. But in this case, I am using a REST server and I noticed that ...
0
votes
1
answer
1k
views
Phonegap Error : 401 Unauthorized - consuming Rest API with Basic Auth in Phonegap
I have create rest api in codeigniter and trying to consume it in phonegap app But its giving me Error - 401 Unauthorized in Phonegap index.html page.
I am using Token Based Authentication in ...
1
vote
0
answers
841
views
Codeiniter Rest Server - Not able to get data sent via post request
I am creating a simple rest API in Codeigniter using the chriskacerguis/codeigniter-restserver.I have successfully created a login method and tested it using the postman and it works but i have ...
0
votes
1
answer
283
views
codeigniter-restserver not working in https connection
I have created two codeigniter project subdomains.
In domain A I have kept only the controller and view part.
In domain B I have kept only the controller and model part.
I am using controller of ...
1
vote
1
answer
1k
views
$this->input->post() returns NULL in codeigniter rest api implementation
In the file RestClient.php the lines $uname = $this->input->post('username') and $pwd = $this->input->post('password') returns NULL.
This is my (View) loginform.php
<?php echo form_open('api/...
1
vote
3
answers
5k
views
405 method not allowed - CodeIgniter Rest-server
I am having troubles with Codeigniter - Rest Server for a week already.
I have a controller called Users with 2 methods all_users_get and register_post.
all_users_get is working fine.
register_post
...
0
votes
1
answer
56
views
Codeigniter single quotes when retrieve API issue
I added some data like these "I'm completely drunk, drunk"
And my CI web app works fine but when I retrieve APi it shows like that only..
Can you tell me how to display like this I'm ...
0
votes
1
answer
2k
views
Codeigniter Rest Server - Fatal error: Class 'CI_Exceptions' not found
I try to create a rest API for my android app using CodeIgniter rest services. Everything is fine on localhost. but when I upload it on live server and test again it throws the error. I creating rest ...
1
vote
0
answers
110
views
Always getting "status":false while using rest api in codeigniter 2.0
I am using Ashimante Rest Server API in my project.
This is what I did:-
I have put the Rest.php controller in the application/libraries
folder
I have created webservice-v1 folder inside the
...
0
votes
1
answer
112
views
Unable to preview the uploaded image [rest api]
I'm trying to do uploading from my Ionic App to the codeigniter Rest Server but the image cannot be previewed when I open it. I'm referring to this tutorial to do the uploading from the app side https:...
0
votes
2
answers
315
views
library input class not working in php codeigniter
I'm working with codeigniter REST API. In my API call i'm trying to get value from $this->input->get('id') but does not get any value from the get.
public function data_get($id_param = NULL){
...
-1
votes
2
answers
2k
views
Getting Error in CodeIgniter RESTful API
defined('BASEPATH') OR exit('No direct script access allowed');
require('application/libraries/REST_Controller.php');
use Restserver\Libraries\REST_Controller;
class demo extends REST_Controller {
...
2
votes
0
answers
796
views
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 ...
1
vote
1
answer
2k
views
Codeigniter install rest api with composer
I install codeigniter with this:
https://github.com/kenjis/codeigniter-composer-installer
When I try to install rest API:
https://github.com/chriskacerguis/codeigniter-restserver
works fine when I ...
0
votes
1
answer
1k
views
CodeIgniter Rest Server vs Amazon AWS
I have to create an API (JSON REST) for a project that has recently moved onto AWS, with a PHP CodeIgniter code-base, and an RDS database.
I have a bit of a dilemma, because I'm unsure what route to ...
0
votes
0
answers
96
views
How to access database of different servers from one server?
I would like to wrap all database related process stuff in models and host it in an server(Master).
Then, Host the App in another server. The App consist only controller and view files. CRUD ...
0
votes
0
answers
783
views
How to set x-api-key in codeigniter Restserver_controller for POST request?
How to setup x-api-key for Post request, I got the following error in postman plugin.
Post request error in postman google chrome plugin (Screenshot)
Any Suggestions? What is wrong here?
2
votes
1
answer
3k
views
RestServer in Codeigniter: 401 Unauthorized response when loading in view
I'm using the restserver in Codeigniter from Chris Kacerguis and I setup rest_auth with session.
When I'm logged in, I access the page whose view.php get the response through file_get_contents and it'...
-1
votes
1
answer
7k
views
Debugger tool for Codeigniter [closed]
I would like to develop API calls using Codeigniter. To view the GET/POST/DELETE requests came recently, I would like to have one Debugging Tool, like Yii2 - Debugger.
PF Below for Yii-Debugger
...
0
votes
1
answer
651
views
PHP Codeigniter How to set up Rest Server And Client
How to set up rest server and client.
I read the tutorial https://code.tutsplus.com/tutorials/working-with-restful-services-in-codeigniter--net-8814.
I got idea about restfull services , and rest ...
0
votes
1
answer
4k
views
RestApi Post request using CodeIgniter
I am implementing my own API. I’m following the tutorial here. Even though I follow it I had a hard time to make my API working.
I didn’t get what is the difference with CodeIgniter REST Server and ...
2
votes
1
answer
4k
views
How to integrate instamojo payment gateway with codeigniter rest server?
I am trying to integrate Instamojo Payment Gateway within Chris Kacerguis’ REST Server.
Problem:
The below code:
public function instamojotest_post()
{
$api = new Instamojo\Instamojo(‘abcd1234’,...
1
vote
1
answer
949
views
New session entries are being created in database even when codeigniter session library is not loaded. Why?
I am having a rather weird problem with Chris Kacerguis’ CodeIgniter REST Server.
Problems:
1) I am NOT loading the CodeIgniter session library, even then new entries are being created in the ...
2
votes
3
answers
2k
views
How to show form validation message for particular field in codeigniter
Here I want to show validation message for different fields
$this->form_validation->set_rules('email','Email','trim|required|valid_email');
$this->form_validation->set_rules('password', '...
2
votes
3
answers
7k
views
Angular 2 Request header field Authorization is not allowed by Access-Control-Allow-Headers in preflight response
I'm using codeigniter REST API for my server application. And client as Angular2, in my REST API I have given basic auth. I have set like
$config['rest_auth'] = 'basic';
And
$config['...
0
votes
2
answers
3k
views
Codeigniter Not allowing to post data in REST API post method via url. it's showing error like unknown method
I am trying to send data through url like
http://localhost/api/index.php/society/?date=20/04/2017&s_name=ssr
but it's showing error message:
{"status":false,"error":"Unknown method"}
When I ...
13
votes
2
answers
27k
views
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 ...
0
votes
0
answers
193
views
Codeigniter Restserver basic autentication always valid
I've a problem with Codeigniter Restserver (https://github.com/chriskacerguis/codeigniter-restserver) because I've enabled basic autentication but it returns always results even if credentials are ...
0
votes
1
answer
112
views
codeigniter-restserver how to put json into the response
I'm trying to put json data into the codeigniter-restserver response, but the json code is put into double quotes effectively rendering it unreadable.
I'm trying to set the response like this ...
2
votes
1
answer
5k
views
REST User registration and Login through Api Key
I am not new to codeignitor , but still i didn't used they feature called 'API keys' authentication.
What i want to do ?
Register a user in my_users table and there is apikey as column that should ...
0
votes
2
answers
581
views
Codeigniter 3 + Restserver always performs get request
I am using Codeigniter 3.1.0, Restserver downloaded from here with documentation from here. I am also using Chrome's extension Postman.
The problem is that even if i choose POST from the drop down ...
0
votes
0
answers
114
views
Codeigniter rest server implementation error
I am using codeigniter rest ful api service for my website
and using json response. We implemented it with ajax. The code is perfectly working in localhost but it is not working in online. It is ...
1
vote
1
answer
926
views
angularjs and codeigniter pagination
I use angularjs for UI and codeigniter for backend(REST Server). When I'm using only codeigniter I know how to make pagination, but I can figure out how to make for this situation. For that purpose I ...
9
votes
2
answers
7k
views
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 ...
0
votes
1
answer
32
views
Can I use same param name multiple times in the URL for codeigniter-restserver?
http://example.com/api/transfer/transfers/code/456/code/234
When using $this->get('code') on a url like above I expect the REST library to return an array or a list of the codes.
Instead it returns ...
0
votes
1
answer
1k
views
How to make login in codeigniter restserver
I'm using Codeigniter rest-server library.
I'm having some doubts about authentication of this library.
//In config file
$config['rest_valid_logins'] = ['admin' => '1234'];
I want know how to ...
0
votes
1
answer
188
views
In Moqui: How insert data using rest service
I've implemented an application using Moqui Framework.I can able to get json response by the bellow url
http://localhost:8080/moqui/rest/s1/moqui/users
now i need to insert data into table how can ...
0
votes
1
answer
107
views
restful put method getting wrong result in codeigniter?
I'm creating the android app for my code igniter web site and i want to save data through restful web service but when i send request to my put method it's giving me wrong result.
this is my to view ...
1
vote
1
answer
223
views
Moqui Framework To Call Rest Service for "Age" between From And To:
I've implemented an application using Moqui Framework.I have a field named as "age" in entity.I am trying to get all record from entity where the age between 20 to 25. How to create rest service in ...
2
votes
2
answers
5k
views
Codeigniter RESTServer session
I'm building an API with CodeIgniter and the RestServer implementation from https://github.com/chriskacerguis/codeigniter-restserver
I want to use the 'session' authentication mode so I set this in ...
6
votes
2
answers
1k
views
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:
<?...
0
votes
3
answers
736
views
Codeigniter Rest Server JSON multidimension issue
I'm using Codeigniter rest server to create an api. one of my clients is sending the following JSON array to my api
{
"code": "TEST",
"store": "DBNG0024",
"total": "50.00",
"...
0
votes
1
answer
405
views
Android volley chat with out Google Cloud Messaging
As the title of this topic says, is there a way to make in Android a live chat (sending/ receiving text messages) only using Volley?
P.S. I'm not sure, but my server should be a Java Restful web ...
2
votes
1
answer
5k
views
Invalid API key as a reponse of PUT method using RESTServer codeigniter
I am using the codeigniter rest server api library.
When I enter http://localhost/RESTapi/api/question?X-API-KEY=XXX in Postman with the PUT method
I'm getting:
{
"status": false,
"error": "...
0
votes
0
answers
151
views
How to create path for restservice in codeigniter(rest_controller)
I am trying to create a studentdb in restful service in codeigniter(rest_controller). I had copied files like
Rest_contoller.php in libraries
Format.php in libraries
Rest.php in config and
...