How to update a status message on the lotus connections server from the other web application? - lotus-domino

I have found the following info "To update a status message, send an updated status document in Atom format using an HTTP PUT request"
but i don't underctand how to sent the xml file to the lotus connections server. I tried to submit a form with xml data...I tried to call ajax query..
Please anybody help - give me an example how I can do it?

you can probably grab some sample code from this project over at OpenNTF.org

Related

How to handle attachment and JSON data passed through form-data of postman to ESB flow?

Working on Mule 3.8
For emailService with attachment I have referred one of the earlier post (question) (how to upload a file and json data in postman) which has answer by #gce user. I followed the same. But now I am facing different issue. My JSON data is also getting considered as an attachment. How to avoid this inboundAttachment from getting attached to email. I am using simple SMTP component for sending emails.
Tried to use componenet attachment and triued to remove this attachment forcefully but it is still getting attached. #Gaurav Sharma How you avoid the JSON data from getting attached to email? This is the earlier post for reference
This is expected since you are sending json in form/data as seen in the image.
form/data will always send as attachment.
Try sending it as raw in the body part of postman:

How can I send messages with attachments from circuit unify?

I need to send messages with attachments to the conference, also update messages for all users with an event.
Can somebody help me?
any example please
It would help if you specify what you have tried so far with a code example as this would also tell whether you are using the REST API or JS SDK (or Node.js SDK).
I'll assume you are using the JS SDK.
To send attachments use the addTextItem API. As seen on that page the attachments attribute is a regular File object.
An example app with file upload is available at https://github.com/circuit/circuit-sdk/blob/master/examples/js/messaging.html and running live at https://rawgit.com/circuit/circuit-sdk/master/examples/js/messaging.html.
This example is listed on our examples page at https://circuit.github.io/jssdk.html
Note that if you are referring to Node.js SDK file upload see example https://github.com/circuit/node-sdk-example
I am not clear what you mean "also update messages for all users with an event". The event raised when sending a message (with or without attachment) is itemAdded.
Subscribe to it via:
client.addEventListener('itemAdded', evt => {
console.log(evt);
});

Update HP QC Defect comment using API

Can anyone help me as my HP QC Update comment API is returning http_code: 401 which is "user not authenticated". But I am sending the request after login only.
The flow is as below:
I hit qcbin/api/authentication/sign-in API which stores LWSSO_COOKIE_KEY, QCSession, ALM_USER and XSRF-TOKEN on my browser and temp file.
Then I am calling qcbin/rest/domains/domain_name/projects/project_name//defects/{id}
This time it returns 401
But in the same way I am able to create new defects.
Thank you.
If you want to UPDATE a defect, then you should use PUT instead of POST!
The POST is used to create a new defect, a PUT to update. Please refer always to the HP ALM library in order to be sure which action to follow.
Last but not least you have to send back in the header the LSSWO-Cookie in order to keep the authentication, but this should be already ok if you say that you can create or send other kind of action.
Please try to use the PUT to update and have a nice day!

Tableau REST API Download Workbook

Tableau has some REST API calls
Question 1: Does anyone know how to use the following call to download an online workbook? Sample code will be appreciated.
Question 2: Does any one know how to read and parse this twbx file?
Thanks.
You will need to send a GET request to a URL such as
https://YOURDOMAIN/api/2.0/sites/SITE-LUID/workbooks/WORKBOOK-LUID/content
You also need to send a header of your authorisation token like which is named X-Tableau-Auth
I suggest getting chrome and postman installed to test this kind of stuff out. Importing https://github.com/TableauExamples/Tableau_Postman as a collection will help

POSTing to web service API in Objective C?

I'm writing one of my first apps for consuming a web service in Objective C, it's a Lighthouse API client. I'm able to execute all the GETs and XML parsing correctly and quickly, but I'm having extreme trouble trying to create a new ticket via POST (http://lighthouseapp.com/api).
I'm using ASIHTTPRequest.
I tried including the parameters on the URL (i.e. POST /projects/#{project_id}/tickets.xml?title=boo).
I've tried putting the ticket XML in the request body.
<ticket><title>boo</title></ticket>
Nothing is working. (server always sends a response back saying it needs a title) I'm very new to web services - am I missing something obvious?
I had a quick look at the Lighthouse API and here's how you go about creating a new ticket.
Request URL is http://{yourCustomURL}.lighthouseapp.com/projects/{ProjectID}/tickets.xml where {ProjectID} is a 5 digit number - in my case 72945.
Method is POST
Content type should be set to application/xml
Body should be in the format below. All fields are optional so I only included the title
<ticket> <assigned-user-id type="integer"></assigned-user-id> <body></body> <milestone-id type="integer"></milestone-id> <state></state> <title>Testing new ticket creation</title></ticket>
(sorry about the formatting of the code above, SO doesn't seem to like XML formatted code somehow?
This worked for me with a new ticket created under projectID 72945 - response received was 201 Created
If you want to make sure your POST request is working before diving into ASIHTTPRequest, download a Firefox add-on called POSTER from here. This will allow you to send an authenticated post request with all the fields above. Once you get that working, it should be a piece of cake to get ASIHTTPRequest to do the same.