Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Pobranie za??cznika

...

Downloading the attachment

To download an attachment, send a GET request to the address /attachment/ID, gdzie za ID nale?y podstawi? identyfikator za??cznika.

Metoda wymaga autoryzacji za pomoc? basic authentication. Nale?y u?y? loginu i has?a do konta SIP.

W odpowiedzi otrzymamy:

...

where the ID should be replaced by the attachment identifier.

The method requires authorization using basic authentication. Please use your SIP account login and password.

In response we will receive:

  • when HTTP status = 200 - w body otrzymamy strumie? za??cznikakiedy we will receive an attachment stream in the body
  • when HTTP status = 404 - attachment Not found

Pobranie miniaturki

...

Downloading the thumbnail

To download the thumbnail, send a GET request to the address /attachment/thumbnail/ID, gdzie za ID nale?y podstawi? identyfikator za??cznika. 

Metoda wymaga autoryzacji za pomoc? basic authentication. Nale?y u?y? loginu i has?a do konta SIP.

W odpowiedzi otrzymamy:

...

where the ID should be replaced by the attachment ID.

The method requires authorization using basic authentication. Please use your SIP account login and password.

In response we will receive:

  • when HTTP status = 200 - w body otrzymamy strumie? za??cznikain the body we will receive the attachment stream
  • kiedy HTTP status = 404 - attachment Not found

...

Uploading the attachment

Code Block
languagetext
POST https://domena.com/attachment HTTP/1.1
Host: domena.com
User-Agent: {user-agent}
Authorization: Basic {login:password}
Content-Type: multipart/form-data; boundary=xxBOUNDARYxx
Content-Length: {POST body length in bytes}

--xxBOUNDARYxx
Content-Type: text/plain
Content-Disposition: form-data; name="r"

{recipients}
--xxBOUNDARYxx
Content-Type: video/mp4
Content-Disposition: form-data; name="file"; filename="attachment.ext"

{attachment file data bytes}
--xxBOUNDARYxx--
Content-Disposition: form-data; name="thumbnail"; filename="thumbnail.jpg"
Content-Type: image/png
 
{thumbnail file data bytes}
--xxBOUNDARYxx
  


Metoda POST na adres https://domenaPOST method to the address  /attachment

Metoda wymaga autoryzacji za pomoc? basic authentication. Nale?y u?y? loginu i has?a do konta SIP.

W odpowiedzi otrzymamy:

...

The method requires authorization using basic authentication. Please use your SIP account login and password.

In response we will receive:

  • when  HTTP status = 200 - nagranie skasowane recording deleted
  • kiedy when HTTP status = 404 - Not found

Dodanie odbiorców do za??cznika

...

Adding recipients to the attachment

To add recipients to the attachment, send a PUT request to the address /attachment/ID, gdzie za ID nale?y podstawi? identyfikator za??cznika. Natomiast w parametrze r (tak samo jak w przypadku POST) nale?y poda? SIP loginy oddzielone ?rednikiem.

Metoda wymaga autoryzacji za pomoc? basic authentication. Nale?y u?y? loginu i has?a do konta SIP

 where the ID should be replaced by the attachment ID. However, in the r parameter (as in the case of POST), you must provide SIP logins separated by a semicolon.

The method requires authorization using basic authentication. Please use your SIP account login and password


Message format 

~[ATT RID:'%d' type:'%d' ext:'%s' or:'%d' caption:'%s']%s

...

~[ID:d2f472]~[ATT RID:'1013820' type:'6' ext:'.doc' or:'0']{"filename":"sample.doc","size":32768,"contentType":"application\/msword"}