Add Attachment trough API

Add Attachment trough API

Hi. 

We have very small expertise with API scripting, but we are trying to learn as much as possible in order to provide some options to our SDP customers. I wonder if you can help us with the next couple of questions:


We want to close a ticket, adding the resolution and also adding an attachment to the closed ticket.

I wonder if this can be done with only one operation: PUT /api/v3/requests/{request-id}/close
 and adding the rest of the attributes.? Or do we have to use an additional operation: PUT /api/v3/requests/{request_id}
 and with this one adding the attachment and also adding the resolution?

Is there some example that can resembles this multipart operation?

Also we found the next example of attachment operation, 

In v3, 

       "attachments": [
                  {
                      "id": "1",
                      "file_name": "sample descrip.txt",
                      "content_url": "/api/v3/attachments/1",
                      "size": "520.45KB"
                  }
              ]

Regarding this I wonder if we must always indicate the size of the file?


Regards

                  New to ADSelfService Plus?