I have 2 different restful api-s, and I would like to use Tyk for gateway.
My plan is to have a common url (like: http://viktorservices) which can towards messages to those two api endpoints.
For example, the first api is a user manager api, and has an endpoint:
GET: http://localhost:8080/usermanager/users
And the other api is a car manager api, and it's endpoint:
GET: http://localhost:8081/carmanager/cars
Is it possible somehow, to upload a Swagger JSON for the Tyk Catalog (For developer portal) to be able to se only one API called: User and Car Manager?
And when I click on "View Documentation" in Tyk's developer site, all of the endpoints from both APIs are visible, grouped by their main API names?
I tried to put the two swagger jsons into one as an array, but then it is not visible on the Developer Site.
I am able to upload the swaggers one by one, but then I will have two API-s on the Dev site of Tyk.
I think the main point here is that developer portal documentation/swagger does not have to correlate with the actual APIs you have. Portal gets organized by catalogues/policies. So you can have multiple internal Tyk APIs, but expose them as the single catalog in Portal, by creating Policy which gives access to both APIs. So, just create new "public" swagger file for documentation purpose, which includes endpoints from both of your internal APIs.
Does it make sense?
Related
I'm looking to use Azure API Management (APIM) to publish my REST API endpoints to be consumed by external partner apps. I also have an app I own. I would like my app to consume the same endpoints as well as a few additional endpoints. I don't want to expose those additional endpoints to partner apps. Basically, I would like to end up with two packages of endpoints in APIM where I only expose the extra endpoints to my company's apps. My company's client apps are accessible over the Internet and are not isolated in an internal network.
This feels like a common use case, but I wasn't able to find anything directly addressing this. I'm assuming it's because I'm somewhat new to APIM.
See Products: https://learn.microsoft.com/en-us/azure/api-management/api-management-key-concepts#--products They're created specifically for the case of packaging same or different APIs into separate offerings. You can control product visibility as well, so that only users of specific group would be aware of some product, i.e. your own product can be made visible only to service administrators - you.
I have an enpoint in my MERN app which I would like to expose to developers.
I came across APIM and would like to use it.
After going to the documentation I would like to know how do I can use APIM for my specific enpoint and where I allow users to generate API's in my client side react app.
I am also going through the API management API. but don't know how to generate user specific API keys...
You could simply mimic what the Developer Portal does using APIMs REST API.
If you are using the Consumption Tier of APIM, you can just create a standalone subscription using the Create or Update Subscription API. Yon don't have to set properties.ownerId in the request payload here.
On the other tiers, standalone subscriptions are not supported yet (but will be as mentioned in the official announcement blog under New Features), so you will have to create a user first using the Create or Update User API and then create a new subscription mentioning this user under properties.ownerId as /users/{userId}.
Since these REST APIs call the Azure Management API, you shouldn't be making these requests from the client and instead should be calling this from your backend.
I'm the administrator of a Bim360 Docs Hub,and i'm trying to retrieve some data from the forge API. I've already created a test app, and i get a Bim 360 Account Id.
I'm not able to get an authentication bearear token (OAuth), to make simple get requests towards projects.
Where do i get the auth token ?
Thanks
See tutorial here to aquire OAuth tokens and note that you will need different permutations of OAuth scopes (esp. data:read data:write etc.) for different operations, as is specified in the docs of each and every API, see an example here.
You may use a RESTful client like Postman to talk to our APIs and manage the authentication flow and operate on response data with JavaScript as you like so as to build workflows such as to create a new project.
Last but not least before you can access BIM360 APIs make sure you provision access to your app.
I'm experimenting with the automatic setup of projects in BIM 360 Field using the Autodesk Forge API. The code is designed to run on internal systems and currently uses the two legged authentication method. I've managed to get a project setup, I'm now trying to add a project admin using the recommended V2 import endpoint:
POST projects/:project_id/users/import
As I'm using two legged authentication I'm specifying my x-user-id in the header. When I run this I receive the following error:
{fault.name} - The client_id specified does not have access to the api product
This happens no matter which V2 endpoint I use; even though all services are enabled in the Forge Dev Centre for the app. I've looked at this answer and Mikako's solution works, but this is by using the V1 endpoint, I'd like to be able to use this endpoint, and other V2 endpoints. What could be going wrong with my V2 implementations?
I think it is because your project is Field classic. Field classic is a pre-Forge era web services. It's not a part of Forge.
You may try Field API:
https://bim360field.autodesk.com/apidoc/index.html#api/v1/project_users_method_3
The newer version of Field is under preview right now for customers who has Field.
For more info about what is Forge, what is not, please refer to this post:
https://fieldofviewblog.wordpress.com/2017/01/17/bim-360-and-forge-overview/
or about Field classic in general:
https://fieldofviewblog.wordpress.com/forge/
I am trying to get the policies for all the resources so I can view the roles and members associated with them. Any method of getting all the policies through the API would work for me.
I am currently trying to list the organizations (resources) so that I can then get the policies for each resource with a command like GetIamPolicy. However, the organizations.list command returns null. Let me know if any of you have had success getting any policy.
I am using the C# API with a service key to connect to my Google Cloud account.
If I understand correctly, you're trying to get the list of all of your GCP Organization resources so that you can cycle through the list to get the IAM policy bindings for each organization.
Get organizations from Cloud Resource Manager API:
To accomplish this, you would first use organizations.search (with no filter) to get a list of all of your organizations.
Try it here with the API Explorer.
Get organization IAM policy from the Cloud Resource Manager API.
Then, for each organization, you would use the organization name to call organizations.getIamPolicy in order to get the IAM Policy for that organization.
Try it here with the API Explorer (update the resource to reflect your organization name).
Note: IAM Policy is how you control access to resources in GCP. There are various levels at which you can manage IAM Policies, including organizations, folders and projects. There is a entirely separate concept called Org Policy, which allows you to control which API services can be enabled in each of your projects.