Delete and recreate API in API Manager - wso2-api-manager

I have a problem with API Manager 1.8.0 around the functionality of deleting an API and recreating it.
Let's say I've created the "file" API version 1.0.0 and after that I've deleted it and recreated it with the same name but version 1.0.1.
When I try accessing the "file/1.0.1" API I get a 404.
I know I could've done the version update for this but that's beside the point ( I believe so).
I've created a new API named "file1" with version 1.0.1 using the same parameters as for the "file" API above and "file1/1.0.1" works as expected.
I'm using an wso2 API Manager 1.8.0 as it comes OOTB no additional database or anything else.
Could you please advise how I could get the "file" API working again?
Thanks

Delete file API from publisher.
Go to /repository/deployment/server/synapse-configs/default and delete the file API.
Then you will be able to create it again

Related

WSO2 API Manager Sequences are getting overidded with initial version

I had created Message Mediation policy on an API published in WSO2 API Manager 1.10.0. Due to new requirements, I modified the policy in the /synapse/default/sequences/API-Name.xml .It works as expected but it gets reverted to the initial version when wso2am is restarted.
I am facing issue using the WSO2 Plugin with eclipse and hence updating the sequence in this manner. Is this the right way to update or Is there any other change i am missing?
It seems like the file is getting replaced with the value in the registry. This looks like a bug.
As a workaround, you can edit sequence saved in the registry.
Navigate to carbon console.
Home->Resources->Browse.
Go to path /_system/governance/apimgt/customsequences/in/
Edit as xml.
Save and restart.

How can I fetch the build versions from Artifactory repository

I have to fetch the list of builds present here : https://openmrs.jfrog.io/openmrs/public/org/openmrs/api/openmrs-api/
I am new to artifactory and its api. I need to know the curl command for fetching all the version numbers mentioned there please? How do I go about it? It's worthwhile to know that the repo doesn't belong to me and hence I do not have the username and password for it(Incase that's needed).
In the artifactory rest API documentation they use localhost for this purpose and do not have such a link. I haven't set this repo up so I do not know how it's done. Basically I am new to this and hence any help would be appreciated.
Thanks
Assuming you would like to get the list of versions available in this folder, there are 2 possible options:
1) Use the folder info REST API method to get a list of all the sub-folders
curl https://openmrs.jfrog.io/openmrs/api/storage/public/org/openmrs/api/openmrs-api/
2) Download and parse the maven-metadata.xml file inside this folder. This file contains information about available versions.

How to use Rest Api in kaa with version 0.10.0 with document in ver 0.9

i try to use rest api in kaa ver 0.10.0 but document is empty https://kaaproject.github.io/kaa/docs/v0.10.0/Programming-guide/Server-REST-APIs/
I use document in ver 0.9 but something not work.How i can reference rest api with kaa ver 0.10.0
Please share the error msg that you are getting. Mostly it's a case of incorrect appender config or field name mismatch with those mentioned in your DB. I was facing following errors with REST log appender but was able to solve them as mentioned below:
Error 500: I found two errors with my configuration of RestLogAppender in the admin panel. First, I had put http:// before my host. Had to remove the same. Second, I should have mentioned Relative URI path starting and ending with a forward slash /.
Error 400: I had given slightly different names to the JSON fields in the Django models. The sequence of the fields did not matter but the name of fields did matter.
I used this API http://docs.kaaproject.org/display/KAA/Admin+REST+API#AdminRESTAPI-Getuserprofile and was successfully able to use it. Please specify the specific problem you are facing?
Edit: and dont forget to check the api using PostMan if you find any issue.
The Kaa 0.10.0 documentation server REST API uses JS scripts that are hosted on third-party servers. Unfortunately, those servers are now down and that is why the REST API documentation page is rendered empty at the moment.
Kaa team has already prepared a fix for this. The respective JS files will be hosted along with the documentation. But, this requires some additional work to be done before the updated documentation become available.

How to get version history using One Drive API

I am using LiveSDK 5.6 to get file and folder info stored in One Drive. I am able to get these info, but Now, I am trying to find file version history. I am not able to find a way to get version history of a file stored in One Drive.
Can anyone suggest me a way to get version history of a file (using Live SDK or REST API ?
Rest API documentation API: https://msdn.microsoft.com/en-us/library/dn659752.aspx
Thanks in advance.
The LiveSDK, unfortunately, won't return version history but will return created_time, updated_time, etc. The new OneDrive API has a new feature for checking changes made to an item and its children (http://onedrive.github.io/items/view_changes.htm).
As Toan-Nguyen says, we can't get version number from One Drive APIs now (July 8 2016).
https://dev.onedrive.com/resources/item.htm
I want to get file version information from API, so I requested from Request page. If you want to get version, please vote.

Upload file to Alfresco in ProcessMaker

I am trying out a mashup of Alfresco and ProcessMaker. I intend to use Alfresco's document management capabilities over ProcessMaker.
Here is the scenario:
A user fills up a form in ProcessMaker and a file is uploaded in Alfresco.
I followed the wiki in this link. The problem is that, my result variable is always false. I also checked my input. I am able to access Alfresco via the address I provided, but it still does not work. I also ensured that the file exists in my directory.
Is there a way I can check (probably from logs or console) the error being returned by Alfresco or ProcessMaker so I can continue?
Alfresco is installed in a Japanese version of Windows 7.
Alfresco version is 4.2.c.
Process Maker version is 2.0.45.
I have no experience with ProcessMaker, but here's a couple of things you can try to investigate your issue:
inspect the network traffic between ProcessMaker and Alfresco (e.g. with Wireshark) to see if there's any hint available in the HTTP responses from Alfresco
enable DEBUG logs on Alfresco side
as far as I can see, ProcessMaker users Alfresco CMIS REST APIs to implement its triggers. Have a look at class.pmAlfrescoFunctions.php in ProcessMaker and try the calls yourself with some REST client (e.g. curl, Chrome REST console, htty)
This should give you an idea of what's going wrong in your case.
UPDATE
After reading that the Japanese language pack changed a folder name from "Sites" to "/サイト", and double checking the Alfresco triggers code, it's indeed the case that localized versions of Alfresco are not supported OOTB by ProcessMaker, which hardcodes "Sites" in its CMIS queries.
While the workaround provided by #nmenego would be enough in most cases, I opened a bug to ProcessMaker to let them know of the limitation.
I discovered that the problem was in the encoding used by my installed Alfresco. Instead of the default folder /Sites, the default directory was /サイト (sites in Japanese). Apparently, upon installation, the names of the default folders are translated to Japanese.
What I did was I added a folder named /Sites, and it all works now.
Of course, the points pointed out by skuro are all valid as well.
We just confirmed that this is a bug in the ProcessMaker connector triggers for Alfresco, thank you for reporting it.
I've just opened ticket 11003 in ProcessMaker's Main Support Portal for the developers to work on fixing it.
Please register for free in ProcessMaker's Main Support Portal in order to follow up on the resolution of this bug.
Best regards,
Arturo A. Robles
Customer & Partner Support Manager
Colosa Inc. - ProcessMaker

Resources