Retrieve specific version of document using Alfresco REST API - api

I'm using Alfresco Community 5.0b, but when I try to get the list of versions, using
GET /alfresco/service/api/node/{store_type}/{store_id}/{id}/versions,
I simply get an HTTP 404 error. According to https://wiki.alfresco.com/wiki/Repository_RESTful_API_Reference#Retrieve_all_versions_.28getAllVersions.29, this is the recommended way to get the list of versions.
the Content and MetaData queries both work fine when I try
GET /alfresco/service/api/node/{store_type}/{store_id}/{id}/content and
GET /alfresco/service/api/node/{store_type}/{store_id}/{id}/metadata. What am I missing?

Give a try to this,
/alfresco/service/api/version?nodeRef={noderef}

Related

Dropbox getTemporaryLinks API errors description

I received an email from Dropbox states from middle of october get temporary links api will returns an email_not_verified error in case user not verified her email address, so far so good.
I'm able to get the response body from the doc https://www.dropbox.com/developers/documentation/http/documentation#files-get_temporary_link
Since I'm using dropbox java sdk and I'm used to code test first, I was trying to simulate the scenario, but having the json inside the http response, I've an error parsing the json inside dbx library. So I tried changing the status code and, having 409 I got com.dropbox.core.v2.files.GetTemporaryLinkErrorException: Exception in 2/files/get_temporary_link: "other"
but it is not enough, since I need to manage the scenario.. Can someone help me understanding what I can check in the code but first of all, what is the response I've to simulate in my unit test?
Thanks in advance
The other error case indicates that it's an error that the SDK you're using does not recognize. The GetTemporaryLinkError.email_not_verified error is relatively new, so you'll need to make sure you're using a recent enough version of the SDK to be able to identify it. For the GetTemporaryLinkError.email_not_verified error, that is v3.1.0 or later of the Dropbox Java SDK. (It's best to just get the latest anyway, which is currently v3.1.1.)
If you're are using an updated version of the SDK, it's also possible you're just not setting valid JSON for the GetTemporaryLinkError.email_not_verified error case when you're trying to simulate this. You can find the valid JSON for this error case in the /2/files/get_temporary_link documentation. Make sure you copy that as shown there if you're trying to simulate this.
Lastly, to actually catch that error with the Dropbox Java SDK, you'll want to catch GetTemporaryLinkErrorException thrown by getTemporaryLink. To check for the specific case, check the GetTemporaryLinkErrorException.errorValue. The GetTemporaryLinkError.isEmailNotVerified will return true for the unverified email case.

How to get the list of all the issues in a project in JIRA using REST API?

I am trying to get the list of all the issues irrespective of their status in a JIRA project.
I am doing a GET requset to the following URL:
https://jira.org.com/rest/api/2/search?jql=project={projectID}&issuetype=all
But, this doesn't return all the issues in response.
Where am I going wrong? Is the URL format above wrong?

Create issue : Test link integration with jira

I've integrated Testlink with Jira using below xml
<issuetracker>
<username>xyz</username>
<password>#123</password>
<uribase>abc.net/projects/KEY/</uribase>
<uriapi>abc.net/rest/api/latest/</uriapi>
<uriview>abc.net/browse/</uriview>
<projectkey>KEY</projectkey>
<issuetype>1</issuetype>
</issuetracker>
I am able to link existing jira issue in to test link.
But create issue window contains Version field which would not alow me to enter any value or not giving any suggestion as displayed in below image.
I've tried to create version in jira but it doesn't work.
So,
What value i should enter/configure for version field ?
What is use of <issuetype>1</issuetype> ? can we provide any other value?
How to link new field on create Issue window?
4.Version is mismatched with jira field Versions.
I'm not sure which version of JIRA REST API you are using but the tutorial for the v2 says:
Just like everyone else in the real world, we're faced with time and resource constraints. Supporting two serialisation formats requires more time than just a single one. Hence, for our initial release of the JIRA REST API, we decided to provide "more stuff in JSON" rather than "less stuff in JSON and XML".
So I'm not sure about the XML support. I have no experience with Testlink, but I guess it's using some kind of serialiser at the back end.
If you check the Create issue endpoint, there is no version field. I guess it will be the versions field instead. In JIRA projects can have multiple versions. You can get a list of versions from the Get project eversions endpoint.
Issue type is an ID of issue type you want to use for your issue. You can get a list of project specific issue types from the Get issue all types
endpoint.
I'm not sure about this
Check the first point
This version field is empty because you have not specified any version for your project in JIRA. In my case it was Fix version in JIRA. Currently the rest API is getting an empty list of versions. You can try
curl -X GET http://example.com/rest/api/2/project/KEY/versions
-H 'authorization: Basic dtgzkisVlbyhsuYWhtYijdsdidjjsidDkw'
This will give you an empty list.
Once you set FixVersion in for your project in JIRA, this API will return the list of available versions for your project and the Version field will be populated with those versions.
PS: use your own authorization headers. You can use [Postman][1] for this purpose.

How to get all indexes from database in ravenDB?

Since i HATE the fact that i have to run VM with IE in order to connect to ravendb web (made with horrible silverlight) i'm loking to use ravendb's http API. So far, only conclusion is that it's docs is horrible and i can't find some options.
Right now, i would need to get the list of index-es. in certain database. However, i can't find that as an option in official docs. http://ravendb.net/docs/2.0/http-api
Does that option exist and how to get that list?
Endpoint for index list:
curl http://localhost:8080/indexes/?start=0&pageSize=256

Using Google maps API via SSL

So, I know just recently that google maps API is now available in SSL (here).
My question is, how do I retro-fit my http google maps api script to use this?
So my http Google maps API script call looks like this:
http://maps.google.com/maps?file=api&v=3&sensor=false&key=########
They suggest via this link that to use SSL it should be this:
https://maps-api-ssl.google.com/maps/api/js?v=3&sensor=false
I've tried retro-fitting this into my old URL format like so:
https://maps-api-ssl.google.com/maps/api/js?v=3&sensor=false&key=########
but that no longer displays the map.
Does anyone have any suggestions on what the URL should be?
Thanks
Try this line:
https://maps.google.com/maps/api/js?v=3.5&sensor=true
Google btw suggests that you explicitly enter what version of the api you are going to use. Just entering v=3 will always return the latest version, at the moment 3.5. I believe that the current stable version is 3.3.
As Trott wrote in his answer, api key is no longer needed.
You don't need an API key to use v3, but I suppose it probably doesn't hurt. General things to try:
Open your browser's JavaScript console and see if it is reporting any problems when you load the page.
Remove the API key
Change & to just &
Copy and paste the exact link text you put above into your code, because that link text is working for me. I'm referring to this:
https://maps-api-ssl.google.com/maps/api/js?v=3&sensor=false&key=########
Of course, change ######## to your API key (or just remove it altogether).