DEV Community

Roshan Rai
Roshan Rai

Posted on

Extent of API Endpoint

Hi All,

I have a question regarding API Endpoints. So I work with CRM systems and each CRM has their own availabe Endpoints on their developers docs. My question is if the data I want to either Post or Get on certain properties do not have the endpoint, is that the limitation or I can create my own custom API to do that?

Thanks

Top comments (9)

Collapse
 
josunlp profile image
Jonas Pfalzgraf

Moin,

if I understand your question correctly, you have different APIs that you want to work with, but they differ in structure. Of course, you can write a proxy API, which then makes the individual queries. The only question you have to ask yourself is if your project size justifies such a step.

Collapse
 
roshanflow profile image
Roshan Rai

Since I am new to API please go slow with me. So you are saying for example my client uses HubSpot for their CRM. They have sheets of data they want to post via API but on the HubSpot API endpoint documentation, there isn't and endpoint avaiable to post data into the particular property/Field on their API documentation. So are you saying I can create my own API to post into that particualt property/field?

Thanks

Collapse
 
josunlp profile image
Jonas Pfalzgraf

First, what API at HubSpot are you talking to? Are you using the REST endpoints directly or are you using one of the language specific packages (Node.JS, PHP, Ruby, or Python)?

Thread Thread
 
roshanflow profile image
Roshan Rai

REST endpoints.

What does the language specific packages API give then REST endpoints doesn't?

Thread Thread
 
josunlp profile image
Jonas Pfalzgraf

In most cases, it is better to document this via in-code/code completion comments, or you use something like VS Code. The methods used to effectively communicate with the API are included in these packages. On the one hand, using them speeds up development time, and on the other hand, they also provide some security.

Thread Thread
 
josunlp profile image
Jonas Pfalzgraf

Now, if you want to use the REST endpoints, but they don't offer an endpoint that meets your expectations, you have 2 options. Either you find a workaround to get your data into the system via alternative endpoints, or you have to find a solution that is not based on the API.

My original question was based on whether you want to serve multiple APIs with one query schema. In that case, if the project is large enough, you would build a proxy API that accepts queries according to a schema and rebuilds them to the appropriate endpoints.

Since this doesn't seem to be the case, my final advice is:
See if you can find an up-to-date Open API documentation for HubSpot. That would at least be a clear start, better than their doc.

Thread Thread
 
roshanflow profile image
Roshan Rai

Ok, All the software we use are third party for instead Pipedrive, Hubspot, Active Campaign etc. I cannot develope a new endpoint right?

Thread Thread
 
josunlp profile image
Jonas Pfalzgraf

Since it isn't your System and also not your source code, how would you?

Thread Thread
 
roshanflow profile image
Roshan Rai

Thank you very much @josun, really appreciate your time and help. You answered my question that I was looking for some time now.

You have an amazing day!