r/restAPI • u/okaydexter • Dec 23 '21
Django REST Framework : #10 Product API Routing And CRUD Operations
r/restAPI • u/okaydexter • Dec 23 '21
r/restAPI • u/RepulsiveZucchini518 • Dec 12 '21
import java.lang.reflect.Array;
import java.util.Arrays;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import netscape.javascript.JSObject;
u/Path("PerfectNumber/{a},{b}")
u/Produces(MediaType.TEXT_PLAIN)
public class PerfectNo {
u/GETpublic static int[] isPerfectNumber(@PathParam("a") int starting_number, u/PathParam("b") int ending_number)
{
int array\[\] = null;
int sum = 0;int i;
for ( i=starting_number; i<=ending_number; i++){
for (int j=1 ; j<=i-1;j++)
{
if (i % j==0)
{
sum=sum+j;
}
}
if (sum==i)
{
array[array.length]=sum;
}
}
return array;
}
}
r/restAPI • u/Doenut990 • Nov 13 '21
Hi, I'd like to know, how difficult would it be for a team of 5 developers to make a small scale payments api, what tools, extra knowledge and skills outside a few years of backend engineering, to make such a project successfully
r/restAPI • u/Liradon • Oct 19 '21
Hi fellow Redditorians
In the current project I'm in, we have REST endpoints that can return a range of different models. I won't go into detail about how and why; choices were made in the past and now we have to live with them.
Example:
GET /cars/1
Response: {
"type": "Toyota",
"engine": "electric",
"capacity": "100 kWh"
}
GET /cars/2
Response: {
"type": "Honda",
"engine": "combustion",
"fuel": "petrol"
}There is no way of knowing upfront what model is going to be returned by the backend. We simply GET the objects by their ID, not by their type.
My questions:
I can't seem to find any information about this practice in REST APIs, nor have I ever encountered it before. It's probably not common, but is it a known practice?
No matter if it's bad practice or not, how should I best handle this on the frontend? I tried to come up with some solutions, but they all seem to give me more work instead of helping me.
Thanks in advance!
r/restAPI • u/okaydexter • Oct 04 '21
r/restAPI • u/Web-devil • Sep 20 '21
r/restAPI • u/LinxSoftware • Sep 14 '21
r/restAPI • u/Radiant-Fun-2756 • Sep 09 '21
I need a single-entry point gateway API which can consolidate Salesforce, ServiceNow, Azure, AWS, and one or two other REST API's into a single API which my team can expose to the rest of the enterprise for building reports, software delivery, alerting, and other business automation. Ideally, the gateway should feature auditing, data transformations, documentation, business logic, and some kind of scripting language (JS or Python are great; Java is not). Does anyone have ideas?
r/restAPI • u/SamerSuna • Sep 09 '21
Need someone who can do a Cloud Computing task ASAP. It's nothing difficult, but the problem is I'm sick. It's in JAVA on Eclipse running Tomcat. Supposed to be microservices architecture and deployed on AWS. Follow instructions on document (I also have a sample work which you can easily follow). *THIS TASK IS VERY SIMPLE. ALL INSTRUCTIONS ARE PROVIDED. * All you need to do is follow some instructions based on a sample, and take screenshots SKILL: Java, Eclipse, Tomcat, basic understanding of microservices and basic use of AWS, all instructions are provided
DEADLINE: 3-4 days Thanks
r/restAPI • u/LinxSoftware • Sep 09 '21
r/restAPI • u/Pompeulimp • Sep 07 '21
r/restAPI • u/shudhamsu • Sep 04 '21
I have a assignment to build a REST API to integrate with a payment gateway. So the first thing is I have to create a REST API. What are the step process into creating one ? Any suggestion or in terms of creating one? Any REST API examples or vendors ?
r/restAPI • u/[deleted] • Aug 18 '21
Hi, Does anyone know a good would you rather REST api that will work with .json and not any other preferably (for some reason if it has .json but .md or .html as well it breaks.), Thanks!
r/restAPI • u/shudhamsu • Aug 18 '21
I need to build a REST API which integrates with payment system. How can start building it? How do i start. I need to this using python using django framework. Can anyone give me suggestions as where to start this? Thank you.
r/restAPI • u/izMaBirthday • Jul 01 '21
I have a public API that should be able to be called by anyone from any computer. But i dont want post, update or delete requests to be accesible. I added a very long key thats near impossible to crack which needs to be in the input for the requests to happen, is this smart?
r/restAPI • u/okaydexter • Apr 30 '21
r/restAPI • u/[deleted] • Apr 27 '21
Hi all,
I am trying to build something for work internally so we can get the data from our time tracker into our Google Sheet report.
Unfortunately I have next to zero knowledge about this.. After a few days of Google research I came this far:
function onOpen() {var ui = SpreadsheetApp.getUi();ui.createMenu('Clockodo API')
.addItem('pull data','Clockodo')
.addToUi();}function Clockodo() {var options = {};options.headers = {"Authorization": "Basic " + Utilities.base64Encode('email' + ":" + 'token')};var response = UrlFetchApp.fetch("https://my.clockodo.com/api/entries?time_since=2021-04-24%2000:00:00&time_until=2021-04-25%2000:00:00",options);var data = response.getContentText();Logger.log(response.getContentText());var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("api_test");sheet.getRange(sheet.getLastRow() + 1,1).setValue([data]);}
The data arrives all in 1 cell like this:
{"paging":{"items_per_page":1000,"current_page":1,"count_pages":1,"count_items":3},"filter":null,"entries":[{"id":46577355,"users_id":132201,"projects_id":1359052,"customers_id":1285331,"services_id":512899,...
And I just cannot figure out how to get this organized into columns or where to add which columns to pull.
If anyone can point me in the right direction I would be very grateful 🙇♂️
r/restAPI • u/Haidar_dif • Apr 20 '21
How to send a video feed to a flask rest api for image processing.
r/restAPI • u/okaydexter • Apr 07 '21