Amplify cant find api though deployed to aws - amazon-web-services

Though I have added this configuration in my _app.js file the app doesn't seem to pick up the configuration!
I am calling the api in my file,such as
Its working with fetch but I really want to call it with API.get()...Its A rest api and not graphql
Thank you!

Related

How to intergarte react native front end with django backend

Post Method Used In ReactNative
Error raised
Forbidden: /api/login/
I created a user API using djangorest framework and it is functioning well, however i dont know how to add it to my react native front end for authentication. I would like users to login and the drf to authenticate them. Is there a tutorial i can follow, i tried to look at a few but they didnt work for me. I'm new to react native. Would appreciate elaborate answers and shared resources
Currently using expo cli and unable to fetch data from drf(django rest framework).
is there a way i can request my post method to use djangosessions for authentication instead of auth tokens
the method in the image only works if
'rest_framework.authentication.SessionAuthentication',
is disabled and this is used to get data in api so it cannot be excluded
welcome to ReactNative
You can use different libraries to handle an api request.
Take a look at axios:
https://github.com/axios/axios

AspNet Core 6.0 getting ApiGatewayRequest RequestContext Authorizer

I really have no clue how to continue from this. I have spent some hours googleing and found nothing. I am trying to get access to: apiGatewayRequest.RequestContext.Authorizer like described here: Extracting Identity from lambda authorizer response
The problem being I am inside my Controller and have several endpoints in 1 lambda to simplify my deployments. All Products API are deployed as one. All User API's etc. deployed as one.
Would love if anyone had some feedback

WSO2 API Manager: need to create API from backend using swagger file

I have a requirement where I need to create APIs in wso2 api manager using swagger file for an API. Also, this should be created from backend.
I have been able to create APIs from backend as per the link https://docs.wso2.com/display/AM1100/apidocs/publisher/#!/operations#APICollection#apisPost
but it does not take swagger file for an API. How can I create an API using swagger file from backend.
Please help as I am stuck here.
Thanks
This cannot be done. You will have to follow the payload definition which is defined in the Post request.
Even if you try to import a Swagger file in API Manager publisher, still you need to manually change the API name, throttling policies and etc when creating the API.

OAuth 2 - Authenticate with JSON file without directory

So im trying to set up un lambda from amazon web services a javascript that consults data from google analytics and drops it on a S3 Bucket, so far the script works fine since im authenticating with a client_secrets.json from my computer but now that im trying to do it from lambda i cant figure out how can i copy&paste the JSON content into the script and use it in order to authenticate? The main issue is that is should be able to authenticate itself without human intervention.
In the code i show above if you remove the from_json() and just leave the json_data it would work just fine, hope it helps.

WSO2 APIM - api file deployment

deploying the WSO2 APIM 2.1.0 using puppet, we consider to deploy the API itself with the CICD as well.
In theory - I could copy (template) the synapse files (proxy, api) and the api is available for the call, however - the API is not visible in the store. I assume there's more data in the database than just a synapse config file.
Is there a way to define / deploy API (including to the store) using the configuration files or it needs to be done manually?
Edit:
I thought there's a way to deploy API using the API Admin Services. But when calling addAPI with the metadata XML, looks ok. But trying to see the API in the publisher throws an exception
ERROR - index:jag org.wso2.carbon.apimgt.api.APIManagementException: Unable to find the API: admin-myapi-v1.0.0 in the database
Thank you for any hint
g.
Based on your requirements it looks like you can use one of the following options.
Migrate APIs - You can export APIs from one environment and import those APIs to the new environment. When you import APIs in the new environment, those APIs will be in created state. You need to manually publish those APIs. May be using the jaggery API or REST API you will be able to publish the APIs.
REST API
Jaggery API - This is deprecated at the moment and discourage for using this.
Once you create the APIs, APIs related details will be saved in the database. Additionally, synapse configuration can be found in the file system. If you point the previous database to the new deployment and deploy the synapse artifacts, APIs will work. But then again API creation/publishing and entire flow will not be tested. For CICD, you need to consider above mentioned options. In the future releases, there is more focus towards the REST API and it will be more useful for the CICD.