204 No Content response code when setting a property in Artifactory - httprequest

Trying to add the property in maven local repository in JFrog Artifactory using Artifactory REST API but received the
response code
HTTP/1.1 204 No Content when using the below PUT method:
Artifactory_url/api/storage/repo-name/abc.jar?properties=jiraID=DO1234&recursive=1

HTTP/1.1 204 No Content is the expected response.
You will receive 404 Not Found if path doesn't exist.
You should be able to see the properties on the artifact in Artifactory.

Related

Azure API management always returning 404 resource not found

I have an API instance in AZURE where the configurations are as below.
API endpoint : corol.abpparking.domain.com
API suffix : myaboutpage
Backend Webservice URL : http://10.20.10.2:8080/api/v1/
What works
If i call the webservice URL directly as below for the operation GET to /about, i get response code 200
http://10.20.10.2:8080/api/v1/about
Response: 200
What does not work
If i perform the same operation via APIM, i get a 404 resource not found.
http://corol.abpparking.domain.com/myaboutpage/about
Response: 404 Resource not found
I could not figure our what could be the reason. Note that i do not have any basepath in the Swagger definition.
Make sure to check that your API in Azure APIM is configured to accept HTTP in addition to HTTPS. You can set this in API settings, on the same page where you set API backend URL

OneDrive API 2.0 for buisness returns http status code 200 instead of 302 for download API

Download API for OneDrive for business 'GET /drive/items/{item-id}/content' returns file content with 200 HTTP status. Document 'https://dev.onedrive.com/items/download.htm' says, It will return 302 Found response with Location.
I am trying to hit the request using rest client.
even i tried providing if-none-match header with etag value, where in i was expecting an HTTP 304 Not Modified. in turn it returned 200 OK response.
Is it a known issue?
Thanks
Sonia

PUT/POST request in SOAPUI giving 403 forbidden, while same request working fine in rest client Postman

There is no authentication on server side so authentication should not be issue.
URL format: PUT
https://localhost/api/v1/protections?integrationKey=111&userKey=1111&group=111&category=foo
Payload:
{"action":"BLOCK"}
This is working fine in Postman.
In SOAP UI , I am giving input as under:
EndPoint: https://localhost
Resource: /api/v1/protections
Parameters:?integrationKey=111&userKey=1111&group=111&category=foo
in Media type, I am selecting "application/json"
and entering {"action": "BLOCK"} but getting "Wed Jan 20 16:25:27 PST 2016:DEBUG:Receiving response: HTTP/1.1 403 Forbidden
"
Is there any suggestion to get the output in SOAP UI.
Depending on the server where the rest is exposed service generates an HTTP 403, you should verify that server is and thus find the fastest response.
Also try making a GET request from the browser to see if you can answer correctly because problem lock your machine to the server.
As is https, it may be that you lack some certificate set SOAPUI. possibly Postman you use already has configured. Try to check this setting.
In my case, I missed the Header "User-Agent" and "accept". I put in Soap UI and Works.
In Postman, this headers it put automatically.

Add file programmatically to IBM Connections Community

I am trying to upload files programmatically to an IBM Connections Community File library.
I am able to upload to files and then share with the community, but unfortunately is not the desired behavior.
I followed the API documentation (http://www-10.lotus.com/ldd/lcwiki.nsf/xpAPIViewer.xsp?lookupName=IBM+Connections+5.0+API+Documentation#action=openDocument&res_title=Creating_community_files_ic50&content=apicontent)
I am sending a POST to this URL: /files/basic/api/community/{community_uuid}/introspection
I tried using a file Atom Entry document, and Content-Type:application/atom+xml
But it's not working and giving me a 405 with following error:
UnsupportedOperation
-> Request sent
POST /files/basic/api/community/00f04081-f000-4752-bd88-8b73d281fb19/introspection
Content-Type: application/atom+xml
<?xml version='1.0' encoding='UTF-8'?>
<entry
xmlns:thr='http://purl.org/syndication/thread/1.0'
xmlns:opensearch='http://a9.com/-/spec/opensearch/1.1/'
xmlns:snx='http://www.ibm.com/xmlns/prod/sn'
xmlns:td='urn:ibm.com/td'
xmlns='http://www.w3.org/2005/Atom'>
<td:label>test-restore20</td:label>
<title type="text">test-restore2</title></entry>
I tried using the same method than for stand alone file, with a basic header but still giving me a 405 with following error:
UnsupportedOperation
-> Request sent:
POST /files/basic/api/community/00f04081-f000-4752-bd88-8b73d281fb19/introspection
Content-Type: binary/octet-stream
X-Update-Nonce:<Nonce>
Slug:TMap_Next_Book.pdf
Filename: /Users/Downloads/TMap_Next_Book.pdf
When I upload to myfile, works fine
-> request sent:
POST https://greenhouse.lotus.com/files/basic/api/myuserlibrary/feed
X-Update-Nonce: <Nonce>
Slug: test-restore2
Content-Type: application/binary
Filename: /Users/Downloads/client-error-log.zip
I tried the Playground, but not well documented for that part, so so far no success.
Any of you were able to do that, and would be able to share the solution?
Thanks.
Rightfully this document should be called working with IBM Connections Community Files
http://www-10.lotus.com/ldd/lcwiki.nsf/xpAPIViewer.xsp?lookupName=IBM+Connections+5.0+API+Documentation#action=openDocument&res_title=Creating_community_files_ic50&content=apicontent
The introspection endpoint should be called to get the "community collection document feed"
it doesn't look like you have the URL parameter which is required. You should use the URL with a GET /files/basic/api/community/3a246a15-b4d6-44e1-a01d-1c3d89f1f9a4/introspection?communityUuid=3a246a15-b4d6-44e1-a01d-1c3d89f1f9a4
Then you'll look for
Community Collection
Documents Feed
/
You'll then POST your file to the href --- https://greenhouse.lotus.com/files/basic/api/collection/e78ba00e-cee6-460f-a9ee-0350bf344e0b/feed
I've asked the team to change the title of the page.

How does one download from archiva 2.1.1 rest api?

I always get 204 while trying to search for an artifact via the API.
example url:
http://archiva.mydomain.com/restServices/archivaServices/searchService/artifact?a=test&g=com.mydomain.test&v=1.0
The groupId, artifactId and version all match up in the pom and also show up on the archiva web interface properly.
In order to download this artifact directly I use this link:
http://archiva.mydomain.com/repository/internal/com/mydomain/test/test/1.0/test-1.0.war
Consult the following .wadl:
http://< your_host_name>:<
your_port>/archiva/restServices/archivaServices?_wadl
After some trial and error using the provided .wadl, I was able to successfully query the REST API for a known, existing artifact using Chrome's Postman. I started with observableRepoIds, since it doesn't require parameters. Next, I moved on to a resource with only 1 parameter: getAllGroupIds. Using those successful attempts as baselines, I attempted the artifact resource.
The following query worked for me:
http://< your_host_name>:< your_port>/archiva/restServices/archivaServices/searchService/artifact?g=com.atlassian.xmlrpc&a=atlassian-xmlrpc-binder&v=0.11
Within the Header, I specified the following:
Accept = text/html
Authorization = Basic < your encrypted credentials here>