We have a use case that we want to programmatically publish or unpublish the image on scene 7 ,
But I found that there is something aem dynamic media IPS Api.
I am not sure if we can use this to achieve my usecase .
But if it can be used to achieve my usecase then how can I call these api from my code .
Like what endpoint and authentication method shall I use to call these api.
https://experienceleague.adobe.com/docs/dynamic-media-developer-resources/image-production-api/operation-methods/operation-parameters/r-set-asset-publish-state.html?lang=en
I found this one ips api that can be useful but I am not sure if it can be used to achieve my usecase.
Thanks in advance
I am still searching for a best solution
Related
I am currently building on Vercel an use the serverless functions as an API.
All functions are available in <URL>/api/<FUNCTION_NAME>. I want to only allow my web page the access to the API but I have no idea how. I don't have any Authentication / JWT system in place because it is a fairly simple app.
In AWS I normally use something like IAM authentication or a simple API Key.
What are best practices for that or what is the suggested way to do this? I am not sure if I look at the problem completely wrong but I don't find many resources for that.
Thanks!
Sandro
As mentioned in here, you actually can use a simple method using QUERY. For example you can run a function to authorize it if QUERY.SECRET_KEY is equal to the secret key that you saved somewhere else on your code eg. env variable. Or using the same method, you can now use the authorization header that is sent by client. Here the example. You can use anything that suits you. It's just about personal preference. Hope it helps.
My aim is to select some text from a web page, start a google chrome extension and give the text to a google cloud api (Natural Language API) in my case.
I want to do some sentimental analysis and then get back the result to mark/ highlight positive sentences in green and negative ones in red.
I am new to this and do not know how to start.
The extension consists of manifest, popup etc. How should I call an API from there that does Natural Language Processing?
Should I create a Google Cloud Application with an API_KEY to call? In that case I would have to upload my credentials right?
Sorry sounds a bit confusing I know but I just don't know how I can bring this 2 things together an would be more than happy about any help
The best way to authenticate your app will depend on the specific needs and use cases of your application. You can see an overview of all the different methods here.
If you are not planning on identifying users nor on using a back end server that handles authenticating (as I assume to be your case), the best option would indeed be to use API keys. They do not identify the user, but are enough for the Natural Language APIs.
To do this you will need to create an API key for the services you want and add the necessary restrictions to make the key as secure as possible. Detailed instructions on how to do this and how to use the key in a url can be found here.
The API call could be made from within the Chrome extension with any JavaScript method capable of performing POST requests. For example using XMLHttpRequest or the Fetch API. You can find an example of the parameters that need to be included in the request here.
You may run into CORS issues when making the request directly from the extension. I recommend reading this answer, where a couple of workarounds for these issues are suggested.
how do i get information from this page 'https://console.cloud.google.com/iam-admin/quotas' programmatically, i couldn't find any API service to do this, is there a way to do it?
Currently, this is not possible to achieve, however, there's a feature request to consider having this functionality.
The use case is a frontend application that does not have any backend so normally I would expect to use an api key ( https://cloud.google.com/docs/authentication/api-keys ) but in the complete text to speech documentation ( https://cloud.google.com/text-to-speech/docs/ ) I can't find any information about if (and how) its possible to use api keys for the Cloud Text-to-Speech API.
I don't think its such an uncommon use case to use the text to speech functionality in a standalone frontend (especially with the new WaveNet voices), so I thought I would ask the question here if anyone has some tips where to look for this information or if it's currently really only ment as an API usable in the backend.
If you have the same problem that I am facing right now then I can help you. I have the same issue asked in this question.
If you are using webpage to translate then you have to send your API key in URL of the request. The one way I tried is,
https://texttospeech.googleapis.com/v1beta1/text:synthesize?fields=audioContent&key={Your key goes here}.
I hope this will solve your problem.
I have 2 different Rails application and I want these apps to send and receive information via an API. What is the correct way to do this?
I was trying to use this resource but I don't quite understand it: http://api.rubyonrails.org/
(I am not sure how to make the call for the different methods. Some methods show an URL which I guess I wouldn't have too much problem implementing, but what if the application is within the same server, what would be the correct way to call a corresponding API method.)
Is there a recommended beginners resource out there?
Thanks.
api.rubyonrails.org is Ruby on Rails documentation, so this is API of RoR. What you want is external HTTP, probably REST and probably JSON API.
There are many resources on building REST API's. In general you have to prepare some endpoints that application can send request to and handle responses.
Take a look i.e. on railscast about using active model serializers. This would be the part where you give other application endpoints to get or change data.
Normally you would stop here because in most cases you set API for other applications (like mobile or javascript applications). But in your case you will need something to send requests. There are many gems that allow that, but I find Faraday gem most useful.