Media Files

Attachment

GET /v1/resources/attachment/{idatt}
Request Headers:
 
Parameters:
Query Parameters:
 
Response Headers:
 
Response JSON Object:
 
  • author (string) – Partner ID
  • content_type (string) – MIME type
  • created_at (datetime) – File creation timestamp
  • id (string) – Attachment ID
  • length (number) – File content length
  • md5 (string) – MD5 hash from file`s content
  • updated_at (datetime) – File update timestamp
  • url (string) – Direct URL to the file
Status Codes:

Request:

GET /v1/resources/attachments/53f1d8ab9437bdca80a97882 HTTP/1.1
Accept: application/json
Authorization: key my-very-secret-key
Host: ticketscloud.org

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Transfer-Encoding: chunked

{
    "author": "8ab53f1d94dca37b8088a972",
    "content_type": "image/gif",
    "created_at": "2014-10-02T10:42:28.288000+00:00",
    "id": "53f1d8ab9437bdca80a97882",
    "length": 4201,
    "md5": "bfd55d7efd971d30d1b429cfebde0b71",
    "removed": false,
    "updated_at": "2014-10-02T10:42:28.288000+00:00"
}

Attachments

GET /v1/resources/attachments
Request Headers:
 
Query Parameters:
 
Response Headers:
 
Response JSON Array of Objects:
 
  • author (string) – Partner ID
  • content_type (string) – MIME type
  • created_at (datetime) – File creation timestamp
  • id (string) – Attachment ID
  • length (number) – File content length
  • md5 (string) – MD5 hash from file`s content
  • updated_at (datetime) – File update timestamp
  • url (string) – Direct URL to the file
Status Codes:

Request:

GET /v1/resources/attachments HTTP/1.1
Accept: application/json
Authorization: key my-very-secret-key
Host: ticketscloud.org

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Transfer-Encoding: chunked

[
    {
        "author": "8ab53f1d94dca37b8088a972",
        "content_type": "image/gif",
        "created_at": "2014-10-02T10:42:28.288000+00:00",
        "id": "53f1d8ab9437bdca80a97882",
        "length": 4201,
        "md5": "bfd55d7efd971d30d1b429cfebde0b71",
        "removed": false,
        "updated_at": "2014-10-02T10:42:28.288000+00:00"
    }
]
POST /v1/resources/attachments

Creates a new file.

Request Headers:
 
Parameters:
  • idevent (string) – Event ID
Query Parameters:
 
Response Headers:
 
Response JSON Array of Objects:
 
  • created_at (datetime) – Deal creation timestamp
Response JSON Object:
 
  • event (string) – Event ID
  • id (string) – Deal ID
  • obj (string) – Partner ID
  • reversed_deal (boolean) – Deal made from subj to obj
  • status (string) – Deal status
  • subj (string) – Partner ID
  • term (object) – Deal Deal Terms
  • title (object) – Title and description
  • updated_at (datetime) – Deal update timestamp
Status Codes:

Request:

POST /v1/resources/attachments HTTP/1.1
Accept: application/json
Authorization: key my-very-secret-key
Content-Length: 4201
Content-Type: image/gif
Host: ticketscloud.org

<...data...>

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Transfer-Encoding: chunked

{
    "author": "8ab53f1d94dca37b8088a972",
    "content_type": "image/gif",
    "created_at": "2014-10-02T10:42:28.288000+00:00",
    "id": "53f1d8ab9437bdca80a97882",
    "length": 4201,
    "md5": "bfd55d7efd971d30d1b429cfebde0b71",
    "removed": false,
    "updated_at": "2014-10-02T10:42:28.288000+00:00"
}

Оглавление

Предыдущий раздел

Geo Data

Следующий раздел

Orders

Эта страница