Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Get a devDuck
Rubber duck debugging has never been so cute! Get your favorite coding language devDuckBuy Now
Search - "restful api"
Anyone seen this? https://www.foaas.com/ FOAAS (Fuck Off As A Service) provides a modern, RESTful, scalable solution to the common problem of telling people to fuck off. An API for telling people to fuck off.4
Wow, what a fucking mess this sunday was.
My boss wrote me an email that one route of a RESTful API we wrote for a customer was not working anymore and puking back a status 500 with some error mentioning invalid UTF-8 characters.
Not one single person has had touched nor changed the code on production in some 6 months, so what the fuck could it be?
Phpunit did not give any errors (running only locally), the code had no syntax errors and the DB dump did not contain any invalid bytes (tested with a hex editor).
WHAT THE FUCK?!
OK so I started to comment out lines (all tested directly on production of course) until the error vanished.
Guess what was the culprit?
In the code (PHP) we used strftime(...) to get nice time strings. Of course we set the correct locale on the server, thus having months and days formatted in German.
So, in Geman there is this one mysterious month called "März" which contains an umlaut character.
Calling strftime generated the date with März in it, but the server locale was de_CH.iso-8859-1 and not fucking de_CH.utf8, so the "ä" was returned as 0xE4 instead of 0xC3A4 (valid UTF-8), which json_encode(...) did not want to swallow but instead threw an exception.8
I have replied to them with scripts, curl commands, and Swagger docs (PROVIDED TO SUPPORT THEIR API), everything that could possibly indicate there's a bug. Regardless, they refuse to escalate me to level 1 support because "We cant reproduce the issue in a dev environment"
Well of course you can't reproduce it in a dev environment otherwise you'd have caught this in your unit tests. We have a genuine issue on our hands and you couldnt give less of a shit about it, or even understand less than half of it. I literally gave them a script to use and they replied back with this:
"I cannot replicate the error, but for a resource ID that doesnt exist it throws an HTTP 500 error"
YOUR APP... throws a 500... for a resource NOT FOUND?????????!!!!!!!!!! That is the exact OPPOSITE of spec, in fact some might call it a MISUSE OF RESTFUL APIs... maybe even HTTP PROTOCOL ITSELF.
I'm done with IBM, I'm done with their support, I'm done with their product, and I'm DONE playing TELEPHONE with FIRST TIER SUPPORT while we pay $250,000/year for SHITTY, UNRELENTING RAPE OF MY INTELLECT.12
My devGoals for 2018:
- Build a RESTful API with NodeJS just for learning.
- Finish my first product (electronics sideproject).
- Convert more people to use CraftCMS or at least not use Joomla or WP.
- Get a raise.
- Add Continuous Integration to more projects.
- Add more unit testing where appropriate.
- Create and release a mobile app.
To be continued...
*playing to be continued meme sound*9
After two extensive talks with a potential employer (they lasted for hours), I decided to accept the offer, although the salary was ~25% lower than at my previous job. Everything else sounded fantastic and I needed that desperately since at the previous company everything was toxic for years.
These new guys wanted a senior php dev because they had none of them, except only wordpress and drupal people who were not skilled enough to take other types of projects (they called them "custom php"). I liked it and thought I'm gonna shine there and quickly earn a raise because the agency will start earning more by getting projects that they were unable to even bid for.
First day at work and I got assigned to a new Drupal project, although it was supposed to be a simple restful API for a simple iOS app. It could be done in a week or less, with no rushing at all. But it had to be Drupal. And I happened to be around to hear that there is a queue of Drupal projects waiting. After 2 days leaving the office late and having my brain melted by nonsense I was looking at, I quit the job.
No offense to Drupal people, I really do admire you, but I just could not stand it after 8 years "doing custom php". It felt too much like being downgraded. But more than that I was pissed off by the fact that I have been shamelessly lied to and tricked to accept something I clearly said that I dont want.
This happened a year ago. I now earn 2.5x more money than those guys offered and work in a very healthy environment. In the meantime, I heard that the other guys shut their company down.2
I'm thinking about doing a live coding stream on twitch this saturday, late afternoon or evening (CET).
I've never done a live stream before.
Do you have any suggestions or interests?
I'm thinking about something like a small RESTful API with Angular4/TypeScript (frontend, single page application) and CraftCMS/PHP (backend) with somebasic theory about HTTP requests / response, redirecting, data transfer and interfaces et cetera...
The duration will be around 2-4 hours, maybe longer if I have enough Mate & Beer.
But it's all just an idea at the moment. 😉
I will create an empty project for the stream on my Github and push to it during streaming, so you can pull it live or later.17
So at the moment I'm developing a RESTful API for an internal project at work and I'm starting to learn and understand about HTTP status codes.
It's these kind of developers that I find are lazy or have no motivation to improve themselves, which is disappointing.5
Top 3 times:
1) When I amazed myself by solving a problem using recursion.
2) When I taught myself how to make my a restful api and consumed it using Ajax.
3) When I converted a psd in to a responsive pixel perfect webpage.
Writing code makes me feel I am worth something in this world.1
Spent a lot of time designing a proper HTTP (dare I even say RESTful) API for our - what is until now a closed system, using a little-known/badly-supported message-over-websocket protocol to do RPC-style communications - supposedly enterprise-grade product.
I make the API spec go through several rounds of review with the rest of the dev team and customers/partners alike. After a few iterations, everybody agrees that the spec will meet the necessary requirements.
I start implementing according to spec. Because this is the first time we're actually building proper HTTP handling into the product, but we of course have to make it work at least somewhat with the RPC-style codebase, it's mostly foundational work. But still, I manage to get some initial endpoints fully implemented and working as per the spec we agreed. The first PR is created, reviews are positive, the direction is clear and what's there already works.
At this point in time, I leave on my honeymoon for two weeks. Naturally, I assume that the remaining endpoints will be completed following the outlines/example of the endpoints which I built. When I come back, the team mentions that the implementation is completed and I believe all is well.
The feature is deployed selectively to some alpha customers to start validation testing before the big rollout. It's been like that for a good month, until a few days ago when I get a question related to a PoC integration which they can't seem to get to work.
I start investigating and notice that the API hasn't been implemented according to the previously agreed upon spec at all. Not only did the team manage to implement the missing functionality in strange and some even broken ways, they also managed to refactor my previously working endpoints into being non-compliant.
Now, I'm a flexible guy. It's not because something isn't done exactly as I've imagined it that it's automatically bad. However, I know from experience that designing a good/clear/future-proof API is a tricky exercise. I've put a lot of time and effort into deliberate design decisions that made up the spec that we all reviewed repeatedly and agreed upon. The current implementation might also be fine, but I now have to go over each endpoint again and reason about whether the implementation still fulfills the requirements (both soft and hard) that we set out to meet.
I'm met with resistance, pushback and disbelief from product management and dev co-workers alike when I raise the concern that the API might actually not be production-ready (while I'm frantically rewriting my integration tests and figuring out how the actual implementation works in comparison to what was spec'ed).
Oh, and did I mention that product management wants to release this by end-of-week?!7
*Client calls and asks for a restful api in php*
Me: So the client called and asked for a restful service specifically in php
Co-worker: I'm gonna write it in python.
Me: *disowns co-worker*
The best kind of team work.3
Idea: Corruption as a service.
RESTful API where you send a URL to a file, an intensity and a method, and if the file's under some size, we return a URL to the now-corrupted file on the server, which is removed after like 5 minutes of inactivity or something.
Depending on method and intensity, corruption amount varies from one byte to every byte being either replaced or added to/subtracted from by a certain amount.23
I don’t just want to learn how to scrap together applications.
I want to become an engineer; one that can wear that badge properly.
I spent a day or two reading my peers code base in .NET Core to start learning its wizarding ways. I found myself emulating some of the patterns.
Then I found a tutorial series on putting together a correctly decoupled RESTful API...the same chap wrote an SDK for Azure CosmoDB.
THIS is what I am talking about.
I can’t believe these guys at work have twenty years C# experience between them and they are churning out this shit for more than 1.5x my salary.
I want to become this but I swear half the coding world does NOT care.4
So, as most of you know from my previous rants, I just came back from Scotland where I worked with a colleague to get a C# middleware up and running that calls a restful api and either pushes data to it, or pulls data and inserts it in a database.
I built the api calls and also the data mapping to data tables and vice versa.
My colleague built the interface to the database. We had a week to do it. Easy right? Well, it should have been, we should have definitely been done in a few days.
The crux of the problem:
We had no easy way to share code. I was using most up to date jetbrains rider ide and he was using VS 2012. Apparently VS 2012 compiles differently than the newer versions.
Instead of using a repo, or using something like TeamViewer or anything that would make it easy to share code, which I suggested, he just asked me to put my project on a thumb drive, and give it to him.
If there was a change that would be needed in my code he would save to thumb drive hand to me, i would make the change, save to thumb drive, hand to him. He would then recompile the library i created to interface with the api and use it in his db interface.
This drove me nuts, the entire process took 30 minutes, now imagine doing this 20 times a day, for minor code changes?
All our work time was used up by swapping a thumb drive, and this was ok for him.
No wonder they came back and said it would take 6 months for that team to create the necessary interface to the api. (I wrote it in 3 days, and that was learning C# in the process)
We got 95% done, have just have one part left, which i need this guy to do since i don't have access to database.
He is here at my office this week, for another project on his side, but he promised to give me a few hours of his time something this week.
I've set up a repo on github, given him access and he still wants to use the thumb drive option. It's killing me. VS has something called TeamViewer or something to share code, so today, I'm switching to VS from Rider just to set this up and get him to use it we have literally maybe two hours max if work to do to launch this and I need him to cooperate.
I seem to be the only one who cares that this gets done, but next week I'm going to be asked why it isn't, and I'll have to explain all this. It should have been 100% compete in Scotland, and would have been if we used a better method to share code.2
The world: we found a cure for AIDS.
Hacker news: I don't see a RESTful api endpoint for that, so it's useless.
So I spent the last 2 hours trying to figure out why my co-workers source when hitting the API I built was not working. They kept saying that the problem was the API and I kept saying that it's their implementation.
Turns out it was their implementation and as well as the API. Their implementation problem was not setting the "Accept" in the header. The API problem is how Laravel will return a JSON error response ONLY IF the "Accept" is set in the header.
I actually documented this into the API documentation but it's obvious that none of my co-workers read that you need to set the headers correctly. I think the more scary thing is that they didn't know the difference between Accept and Content-Type!!7
So I was tasked with building an API for a client, they had a working solution, but it's not as good as it could be. I started rebuilding it last week, and then I remembered that I already built the API 4 months ago and never told anyone for fear of getting in trouble.... Whoops.... Yay past me!! I just saved myself thousands of hours of work... 😂😂
The database has 130+tables and they wanted each table to have their own restful evening endpoint. I generated the API in about 2 hours...🙃
So lately I am learning about APIs and REST/ful architecture (I'm a plain beginner). I must say it's very interesting.
I find this website very very helpful as a practical implementation of the theory I've been consuming. I'd truly appreciate any recommendation on the subject.
Last night i had to write sms center for a panel for my client
I was awake till 5 am 😧 why you ask ?
They had a restful api and also a webservice but neither was complete 😑
And the documents of it was f*#$& worst
They had UserName as parameter but the actual one was userName 😑😐 thats not just it they had more
Also they missed some parameters for some functions 😑
They had parameters for Count and instead of int they said its a Bool and on the description it said 1-100
Im so frustrated1
It's a really interesting discussion, when your boss tells you that it's a perfectly fine idea to directly use a Firebase DB from an Angular web app by storing the Admin Auth Token in a variable in JS.
Thank the spaghetti monster, I was able to argue against it and use the already partially implemented RESTful API with the already used auth.
He basically wanted to save time and omit extra login routes.
It's OK to save time and not implement $randomFeatures.
BUT DON'T FUCKING TRY TO SAVE TIME ON SECURITY!
If it wasn't for me, this web app would turn into a bigger gaping (security) asshole than Sasha Grey's...6
If I ever have to write a RESTful API form scratch again I'm gonna throw myself out of the window.7
It is time for my own dumbass's favorite pastime: not letting go on retro tech.
I am gonna build a small and complete RESTful web API with Vbscript and Classic ASP with errrthing thrown in this mfker including JWT authentication and i am gonna see how the idea of an ORM goes. I know that COM interop was a thing, dunno if it still is.
I am fucking bored. The graduate degree is killing me and I need a distraction.
Thinking about being a purist and keeping the COM libraries to be made with VB.NET :P
Fuck yeah for being a masochistic retard.
I legit love vb net tho4
I regret moving to backend. I loved the days when I used to write lines of code and refresh my browser for the changes to be displayed on the screen. I loved seeing the output of my code, the code flow, the light weight text editor, the visual satisfaction and the chrome debugger.
Now I am fucked up, I am working on creating microservices for restful api. I am hating everything about it. The fact that I should compile the entire war, manually copy them to a webapp folder, restart my tomcat and wait for 5 minutes just to see my code, and the text editors are just a pain in the ass, the debugger sucks too.
I was so looking forward to being a backend Dev because I thought Java was cool and I also was fedup with cross browser optimizations on the front end. Now I would gladly write a streaming service foe ie6. Spring has fucked me up so hard
God save me from this mess.6
My dumbass colleague thinks the best idea to a Restful API backend is to store some kind of session based on the token.
It'd be great if that remained as an idea instead of this 11 month-old system he built before I got in.
Yes, it does mean that if the server boots for whatever reason, everyone has to login again to get a valid token LOL6
RESTful API Question
Let's say when a user do an action, I need to insert a record into a table and then update a record in different table.
Should I write two API routes (PUT, POST) or one route (POST) ?18
I would like to present new super API which I have "pleasure" to work with. Documentation (very poor written in *.docx without list of contents) says that communication is json <-> json which is not entirely true. I have to post request as x-www-form with one field which contains data encoded as json.
Response is json but they set Content-Type header as text/html and Postman didn't prettify body by default...
I'm attaching screenshot as a evidence.
I can't understand why people don't use frameworks and making other lives harder :-/3
Converting 1.5 million lined web app to a rest API....realizing it would be so much easier to just re-develop the web application....at least we're finally starting to move away from coldfusion and heading to node!
Company hires an intern with Java experience to "help" with the back end of a simple project. Waste the next week trying to teach them what a RESTful web API is. Intern doesn't come back.1
What is REST?
The Legendary : Its stands for Representational State Transfer
Me : That's what i need right now.7
I'm implementing a RESTful API to display search results based on a huge number of parameters. There are so many of them at this point that using a HTTP GET method feels quite cumbersome.
I was wondering whether it is okay to use a HTTP POST method to POST these parameters all at once at every request in exchange of a result set instead of bothering with so many GET parameters.
Some of these GET requests are even blocked by certain firewalls for being too long.10
I always end up building my own wrapper using the REST API rather than using the already existing SDKs to just avoid going through the docs!1
our team are responsible to build backend restful API for other team to look up data in DB.
the consumer team just sit beside us.
the interface definition came from our pm in a different time zone. btw he did not have any programming background.
and he insisted that just build what he said and ignore the noise from the consumer team. because each interface change should be considered as new features and need him to prioritize and create user story and he will review the schema with the pm from consumer team and so called architecture who did not coding real shit for years.
we ended up with building shit code not useable by our real consumer.
yes he do manage to keep our team busy building worthless shit and accomplishmented lots of jira items to show we have value to change a useless shit into very hard to use shit1
After 3 days of digging through the documentation of CraftCMS and Yii Framework I got the hang out of how these Controllers, Actions and other RESTful api stuff works on Craft3.
As some of you may have noticed, I am a big fan of CraftCMS (v2) since it was introduced to me. A few days ago we discussed a new project and the option go for Craft3, as it has been released for some time now.
The changes from v2 to v3 are huge... I didn't expect to almost reach my limit to give up on it!
But since the RESTful routes finally work, with proper data serializing and all, I will now go drink a Whiskey or ten and wish you all an awesome, client-disturbance-free, decadent, beerful weekend!
I have implemented RESTful API using expressJS, and another React app which will use the API's to fetch data.
I'm getting a problem of Allow-Origin Header.
what's the proper way of calling a API ?
do I use a CORS middleware and allow all origin ('*') and use Api-key as way of check authorization to prevent mis-use. ?
any other tricks ?2
I want to start with Web development and for that I want to code a dashboard for finances with a connection to an Restful API.
I know HTML, CSS, TS and some JS. But I don't know which framework to use.
The framework should:
- have an easy way to separate HTML from JS or TS code.
- easy way to break down a single page into different html files.
- not have to use npm or Node.JS. Preffered is a CDN solution.
- HTML Templating
Maybe also tutorials on how to setup the coding enviroment.8
Hi I am a mobile developer and it really sucks when I have to consume a non RESTful API and uses custom HTTP codes. I really want this to change but I need to present a compelling reason why this is bad practice and the possible real world implications of such practice. Perhaps more experience devs can help me out?1
Optimizing my RESTful API plugin, used in a CMS to make it headless, was extremely satisfying.
Thanks to caching and alorithm improvements, I brought the response times down by a factor of 150.
The caching also includes dependency tags thus it will automatically invalidate on changes in the dependent element.1
Django vs laravel for restful api ? Or any other framework ?
With a lot of req per sec
I'm so comfortable with laravel but don't mind using Python
No more coding tonight. 10hrs straight today. 😴 My project can host images but the RESTful setup has fucked up my comments API to hell and back.
I think this senior thesis is one of those points where I seriously wonder if I made the wrong career choice. 🤯😬3
Anyone have books or blogs about microservices and APIs they like?
I spent so much time focusing on front end frameworks and technologies and now I'm having to teach myself RESTful API structures and micro service stuff. I should have spent more time on this earlier on...6
first some background. I'm an intern coming in on the end of my internship (tomorrow's my last day). I've been working on a reasonably important project, more specifically a restful API. We have automation set up so that any commits to master on GitHub are pushed out into a live, accessible version. Some guy (let's call him dumbass) joined our team last week, and has had a few ideas
Dumbass: *opens pull request to my repo*
My boss: *requests changes*
Me: *requests different changes*
(All this before even testing his code, mind you)
Dumbass: *makes requested changes*
Me: *approves changes*
A day passes
My boss: *approves changes*
Me (not even 10 seconds after my boss approved changes): *requests more changes*
(Still haven't tested his code, I just ran A PEP8 compliance test)
Dumbass: *MERGES CHANGES TO MASTER*
Literally EVERYTHING breaks because he was importing a module that's not available
We don't notice until later that day (I'm still working on writing the tests for the automation, for now changes get put on live version even if everything breaks -- tool is still in beta, so everyone working on it (a whole 3 people) knows to TEST THEIR SHIT BEFORE MERGING TO MASTER.)
WHY EVEN BOTHER WITH THE PULL REQUEST IF YOU WERE GOING TO MERGE TO MASTER YOURSELF ANYWAY??!??!??
My frustration cannot be properly conveyed through text, but let's just say this guy's been there a week, I already didn't like him, and then he fucking does this.
Lead dev asks me to take on the restful api aspect to a new internal tool UI I have been building. Happy for the challenge, I spend the 4 days (half of that in my own time), writing out 1k lines of C# that I endeavoured to keep clean, thoroughly decoupled and something I can be proud of.
I give regular updates.
This morning he responds to my last update “we already have most of that code in place”.
This stuff happens a lot. Back of a fagpacket planning and then cries all around when it INVARIABLY goes wrong.
Does this kind of bullshit happen in a properly organised, Agile team? We are about to take on a huge project and frankly I want to save myself the ballache and go find a well oiled team if what I am witnessing isnt just how things are in software land, but as I rather suspect a product of lack of communication and organisation.1
It's 2019 and companies still create apis without any hypermedia controls /hateoas. They require you to read some id from the responses body and use it at the other endpoint. Like wtf. Do people even know how webAPIs work?!4
The integration of technologies project I have this year. Not yet finished but I already learned a lot of very cool stuff.
First, I learned a new programming language + framework (Ruby on Rails)
Second, for the first time, I implemented a continuous deployment pipeline with Capistrano and Travis ci.
Third, first time I programmed a Restful API.
And more cool stuff coming up ! :D
I freaking love learning !
As I will have a new job soon and it seems likely that it will be in network api design I wonder if you have good book recommendations on the topic.
I already have "clean code", "clean architecture" and "design patterns" in my pipeline, so I need something more specific on designing network (restful) service apis.
(This is a follow up to https://devrant.com/rants/1828903/...)3
Need some assistance with Drupal and Dreamfactory.
Dreamfactory is an amazing piece of software that basically turns any database into a REST API. I mean any DB from SQL Server to MySQL and all kinds of others. For a connection to the API it uses JWT (JSON Web Tokens) which expire momentarily.
On Drupal, there's wsdata and rest client modules. Restclient is a module where you configure a connection via OAuth or HybridAuth to a rest server. The problem is that the rest server for dreamfactory uses JWT and i'm not sure how to get Drupal and restclient to connect that way.
Freaking RESTful API's.
Never worked with one before and I'm using Django Rest Framework.
Currently working (trying to) with Angular 2.
Spent lots of time trying to make angular work because ng needs arrays instead of objects when I finally realized it was a matter of the API.
Have no idea what I'm doing5
This is not a rant. Rather just a question or an ask for advice, as I have seen a lot of people talk about web development around here. I am planning to create a website for my search engine. I created a Rest API for my VPS so I can do http requests and retrieve some links for certain key words. But I need some good ideas to do this from a website. As I am not sure what would be the best way to do http requests. As far as I know it's possible with Js and PHP, but I am not sure what's better, more secure or convenient? So here I am to ask you guys, especially those who have experience with this, what I should consider to do.
Oh and please forgive me my limited knowledge about Js and PHP 😅😊3
just 'Hello world' me trying to make a restful api.
*Got Ktor, loved the koltin, hated the deploy, quit.
*Got Django, loved the python, hated the sql migration, quit.
*Got Node, loved everything, hated mongo, can't quit now...
*Got Firebase DB now, I feel the hate monster...ghostly voices, saying, Work my slave, build it... dont stop, 'cause we're right behind you...
....and we're waiting for you5
I'm planning to make a dashboard web app with data analytics. It'll also include subscription option. So I'm trying to decide which language to use on the back end which I planing to make as RESTful api.
Current options for the backend are python, Ruby and php.
I'm not really sure about python. Ruby seems interesting, but I've read its a bit slow and some of the codes does look like magic. I'm very familiar with php, so I'm very biased toward it right now to use php with Lumen framework.
I'm also hoping to scale up the system in the future.
So, can you guys gimme a little help here in choosing a language and framework.1
I'm competent at back end (in Java) but need to whip up a Web front end. Aim is a simple but beautiful UI for admin settings and basic stuff like that, but might extend to some visuals for graphs etc.
Back end already exposes a RESTful API (JAX-RS).
Given that there appears to be about a million front end frameworks, where would you suggest I head given the use case above?7
A module for molecules, which take an OPEN API definition and creates a restful API and graph definitions.
So all the proxy database stuff on a rest API can be done easily inside a microservices architecture.3
Does Really Nodejs - js environment is the best environment in the world ? i mean why people create their RESTful API in js ? from singular to microservices ? does it really that scalable ?
do i have any alternative ? i can't stand anymore change working with js anymode :(32
What is a RESTful API? I didn't come from the web world, and to me every HTTP response with some json as content is RESTful, is that the idea?3
Project is a headless eCommerce platform RESTful API. A managed eCommerce back-end is provided so that you and your team can develop design focused shops for your clients or your own products with any language you desire that supports cURL requests.
There's been an uprising in articles about migrating to GraphQL from REST. Is this the new cool shit?4
Hey guys! From a Ruby on Rails Restful API programer’s perspective which should I learn? Scala or Golang? Why do you like Scala/Golang? Do you use any frameworks? Why should I choose Scala over Goland or vice versa?
Many thanks! o/6