Skip to content

Tag: rest

Docusign error: “unable to get local issuer certificate”

We’re using the Docusign RestAPI (PHP SDK) from our app and it works great. Authentication mode is JWT. I want to use all the code I’ve written on a different subdomain, but I get this error: API call to failed: SSL certificate problem: unable to get local issuer certificate Both domains, and have SSL certs installed. What

REST convention when transforming data

I use Laravel as a REST API service for uploading and storing books. The book service follows the standard REST convention: GET: /api/books and /api/books/<book_id> for retrieving book(s) PUT: /api/books/<book_id> for updating a book POST: /api/books for adding a new book DELETE: /api/books/<book_id> for deleting a book So far so good. Now I need another endpoint which should be used

Perfexcrm api return 419 status code, how solve it?

I use perfexcrm api in my web application. As its document I pass the URL in postman and also pass authentication token in headers of postman and company name in params in postman. I try to fetch all customers so I use api/customers as a URL and as a method I use POST for this. But as a output postman

Laravel PUT relationship

Fiddling with Laravel and coming from Symfony, I’m trying to replicate some code. I’m trying to PUT a Suggestion model (overwritting anything, even relationships) and wanted to know the proper way to overwrite the model. Since tags attribute in fillable doesn’t exist, I certainly get an error (Undefined column: 7 ERROR: column “tags” of relation “suggestions” does not exist). Suggestions

Custom Endpoint API based on attribute gutenberg block

Viewed 4 times 0 I need to return all posts that have the value of a specific attribute that is saved in the custom block attributes gutenberg. This value in the query will be according to the endpoint below. http://idinheiro.local/wp-json/idinheiro/v1/blocks-posts/id-here-attribute-gutenberg-block below my callback function. In short, how do I look for this attribute and put it there in get_posts? Register

api versioning page not found

I’m trying to create my 1st API on Laravel 8, and want to create versioning that would look like this My user controller looks like this in my config/app.php i have this ‘api_latest’ => ‘1’, in my middleware (appHttpMiddlewareAPIVersion.php) in my kernal (app/http/kernel.php) in my /app/Providers/RouteServiceProvider.php and in my routes/api_v1.php i have this I’m getting a 404 error when i

What are the ways of sending images to my server?

I’m mostly a PHP backend / HTML/CSS frontend developer, so I’ve always sent images to my server from the client using either form enctype: multipart/formdata or through a FormData object when uploading through ajax requests. After that I would receive the file in the $_FILES array. Lately I’ve been working with REST APIs and I’ve been doing some research about

Can’t perform a PHP POST request on mysql database

I’m struggling into do my first API in php and I’m facing some problems with a simple POST request. I’ve searched almost everywhere for some alternatives to my code, but it seems to be ok. Can you guys check it for me the last time? Thank you! method: create.php: Answer ok, so I managed to resolve with this code in