I'm trying to setup a Documentation for my API specification in Postman. My problem right now is that if I modify something on the Open API screen, my documentation does not get updated.
Right now the only way to update it is to delete it and create it again. Any idea how to auto refresh it without doing that? (if it's possible)
I have added this screenshot to help understand what exactly I am using:
You don't have to delete the collection every time, you can update previously generated API elements (such as Documentation, Tests etc) through the UI:
Open the Documentation tab
Click Validate against Definition at the top-right
Click Issues Found and access the Issue summary
Select the changes and Apply
The documentation for that can be found here: https://learning.postman.com/docs/designing-and-developing-your-api/validating-elements-against-schema/#updating-api-elements
And here's a video showing you how to do it: https://youtu.be/BUZiRtGRHj0?t=340
At the moment it is not possible to trigger an update automatically whenever the schema is changed, but you could use the Postman API to pull changes on a regular basis using the Sync relation with schema endpoint:
https://www.postman.com/postman/workspace/postman-public-workspace/documentation/12959542-c8142d51-e97c-46b6-bd77-52bb66712c9a
Related
Now i am using postman Version 7.34.0.
I imported swagger 2.0 api and create collection, create mock server and mock example data for the api request.
Everything works well.
But when i found that our api changes, i update the API in the postman. But there is no way to update collection.
I checked this Webinar tutorial at time of 25:35, adding the parameters in the header, then it demo how to update to collection.
But for my case, i tested with our swagger api changes or create a new yaml of openapi 3.0 api, made the changes in query param or add/remove the request. But there is nowhere I can update collection.
I only saw to 'Generate Collection' button, i don't want to generate a new collection, because there can be lots of api I already added the example response data, so I don't want to generate new collection for the api changes, I just want to update the existing collection and later i can manually modify the example response data.
But now I can only manually change the collection for the api changes, not very convenient to use. I also see the posting api to get and update collection with body. But it is more difficult to use.
Is there any button click to update collection anywhere else?
Thanks a lot.
I have a Google Document that has a custom UI menu with an option to add a new page to the Doc and populate it with some data. I use this Doc as template for creating numerous other Docs for a single user via webapp.
So my user comes to my webapp, clicks to generate this Document, the document is created from the aforementioned template Doc (containing the bound script to allow the user to add more pages with additional data). The user clicks in the custom menu to create a new page, and before that chunk of code is executed, he gets the 'Authorization Required' screen. I've already prepared him for this so he know how to proceed - no big deal. he goes on to use the Document for his tasks and closes it when he's finished.
He now needs to generate a new Document from the same template and add additional pages just as before. Once again, he gets the 'Authorization Required' screen. Now he's thinking 'I just authorized this... what's gong on?' and is now confused.
Since these Docs are generated on the fly from within the webapp, I have no way to go in and authorize anything but the script in the template before the user gets to it. But is there really no way to authorize that script in the template doc and have it carry over to all the new docs created from it?
Instead of including the code as a bounded project publish it as an add-on. This way the user only will have to authorize the code once.
Related
How to avoid re-authorization request for a copied Google Spreadsheet + script
I am trying to run some queries on Microsoft Academic Graph using their API. I cannot figure out what to use for the Ocp-Apim-Subscription-Key. (I have seen this question and it did not help.) When I try to run queries I get the following message (401: access denied): Access denied due to invalid subscription key. Make sure you are subscribed to an API you are trying to call and provide the right key.. This happens either using curl on the command line:
curl -v -X GET "https://westus.api.cognitive.microsoft.com\
/academic/v1.0/evaluate?\
expr=stochastic&model=latest&count=10&offset=0&attributes=Id" \
-H "Ocp-Apim-Subscription-Key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
or using the API testing console.
So what am I using for the Ocp-Apim-Subscription-Key? (Not a lot of Xs!) I've tried two things. First, I've tried using the key that you can get by going to https://labs.cognitive.microsoft.com/en-us/project-academic-knowledge and clicking on the subscribe link (either Key 1 or Key 2).
Second, I've tried using a key generated by going to the cognitive services on my azure portal, and trying to create a subscription to a suitable service. However, nothing that I can see matches the Academic Search API that I want to use, so I used a generic bing search subscription.
Neither of these grants me access to the API. What am I missing?
EDIT:
After first response by #ali-heikal, I tried going to here: https://dev.labs.cognitive.microsoft.com/docs/services/56332331778daf02acc0a50b/operations/5951f78363b4fb31286b8ef4/console. A red warning box appears at top of page: You are not subscribed to this API and will get a '401 Access Denied' response. To subscribe, go to the Products page and click on the desired product containing this API.. If I go to the Products page, and go on to the Project Academic Knowledge - Preview page, I am offered the chance to subscribe. Clicking subscribe takes me to a generic MS sign in (I am signed in, choose that account), I am taken to a page which says:
We're unable to complete your request
Microsoft account is experiencing technical problems. Please try again later.
So this does not work for me. Where is it documented that I should use this endpoint? Can someone provide further instructions on how to use it?
EDIT2:
There is this answer which describes using a different endpoint: https://stackoverflow.com/a/49318405/54557. However, changing my curl request to use this does not work (with same Access denied error).
You're using the wrong endpoint, since you're using the Preview API, then you should use the Preview endpoint as well.
It should work if you follow those steps:
Regenerate a key from here (do not use an old key this time) and confirm by clicking the Yes, regenerate this key button
Open the Testing Console from here
Insert the key you just generated into the Ocp-Apim-Subscription-Key field
Insert the following into the Request body field: expr=Composite(AA.AuN=='ali heikal')&count=2&attributes=Ti,Y,CC,AA.AuN,AA.AuId
Click the Send button
Check the Entity Attributes documentation here to understand the attributes I included following the Evaluate Method documentation here
I think the problem is that you are using an old key with the wrong endpoint and attribute values.
I am seeing interesting behavior with the WSO2 Publisher for both Governance Registry as well as Enterprise Server when I am using self-defined asset types. There are two items of concern - the one is that I can successfully save an asset type and capture details against it within the Carbon admin console. This works and works well.
However, when I view the asset in the Publisher, only some of the values that has been captured in the admin console are visible. All of the fields (labels) show up, however some are empty. I can however view them successfully in the Admin Console. What I also find interesting is that if I then update the entry in the Publisher and capture new values for the fields that aren't being displayed, I can see the changed values in the Admin Console - so certainly updating from the Publisher is reflected. Once I've done the Publisher update, the values reflect as they've been captured.
The other dilemma is that when I want to capture a new asset from the Publisher itself, I get an error that the asset cannot be created. The error is "Error while creating asset for the request due to overView_version is not provided. Please provide a value for overview_version since it is a required field". I don't have an overview_version field defined within the asset definition. Actually, there is no version information being captured at all as the asset won't go through a version change.
Any idea what could be causing this? I've tried this under both WSO2 GREG (v5.0.0) as well as WSO2 ES (v2.0.0) and both exhibit the same behaviour. At the moment I am using the Admin Console primarily to capture data, however I would prefer to use the Publisher as the dependency graphs are very useful.
I know it may be a bit too late but I believe this is caused by the versionAttribute property defined in the {CARBON_HOME}/repository/deployment/server/jaggeryapps/publisher/extensions/assets/default/asset.js:configure function [1].
Can you try setting this property to an empty string.
[1] https://github.com/wso2/carbon-store/blob/master/apps/publisher/extensions/assets/default/asset.js#L209
This occurs because you haven't indicated that your not using version attribute in your artifact. To overcome the issue please find below code line in asset.js which is located in here(1).
versionAttribute: 'overview_version',
and change it to an empty string like below.
versionAttribute: ' ',
Now you have to restart the carbon server.
(1) - CARBON_HOME/repository/deployment/server/jaggeryapps/publisher/extensions/assets/default/asset.js
I have a Glass application that is activated by a voice command. The user requests a product and the request is then passed on to a node.js server, which handles the bulk logic of my application. When the node server is done, it builds some HTML templates that it passes on to the Mirror API, which then puts those cards into the timeline of the Glass app.
Now the problem I have is this:
When a user requests something from within the application, he just stays within that application but the cards from the Mirror API are put onto the timeline.
Is it possible to navigate the user from within the application to the timeline item that has just been inserted?
As I build the Mirror API timeline item, I know ahead of time what the bundleId will be on the timeline, so can I use that somehow to navigate to that item on the timeline?
I've had a look here on Stackoverflow, the Glass forums and the official documentation and couldn't see anything that would help.. Anybody here have any ideas?
Currently the only way for forcing a specific card to show in the timeline is by using a LiveCard (https://developers.google.com/glass/develop/gdk/reference/com/google/android/glass/timeline/LiveCard). Live cards will automatically be given focus when published and you can force the timeline to give your card focus after publishing by calling LiveCard.navigate().
So unfortunately unless you want to change some of the fundamentals of your app, this isn't going to be much help.
Though from the sounds of it, you may be able to use a LiveCard to show what is returned from your server. If you want to perform inserts via the mirror API, this could still be done in addition.