Hilfedokumentation 〉API 〉

/projects/:document_identifier/messages/:message_uuid/attachments/:attachment_uuid

Tut uns leid, dieser Hilfe-Artikel ist zurzeit nicht in Deutsch verfügbar. Wenn Sie möchten, können Sie eine Übersetzung von Google versuchen.

This resource supports the GET and DELETE methods.

URL Parameters

Label Description
:document_identifier The project's document identifier
:message_uuid The UUID of the message
:attachment_uuid The UUID of the attachment

GET

Returns information about the attachment.

GET Request Query String Parameters

Name Required Description
fields No A comma-separated list of the keys you want returned for the attachment. Default is to return all keys.

GET Response Status Codes

Code Description
503 Service Unavailable Server is undergoing maintenance and is unavailable
429 Rate Limited Rate limiting in effect, try again later
404 Not Found The resource could not be found or your API key has not been granted access to it
403 Forbidden Direct Mail account is disabled
401 Unauthorized API key, secret, or authentication method is incorrect
200 OK Success

GET Response Body

A JSON object representing the attachment.

Key Value Description
uuid String The UUID of the attachment
display_name String The human-readable name of the file. Suitable for display.
file_name String The name of the file, including file extension. Not suitable for display.
date_modified String The date and time the file was last modified, in ISO 8601 format
content_length Integer The length, in bytes, of the file content
links Array of Object URLs for the file content (rel:content) and for the attachment itself (rel:self)

GET Example

GET /api/v2/projects/187812f26ba37d9769d8691d2a83c95c/messages/F7ADD5FB-6AB3-49A7-AA2B-233A7C750FE7/attachments/07846D22-F0F7-4A39-96FD-A7FACC022FB8 HTTP/1.1
Authorization: Basic QzFENDREMjEtNTA4MC00NTM3LUFFOD
Accept: application/json; charset=utf-8
Host: secure.directmailmac.com

HTTP/1.1 200 OK
Date: Wed, 22 Apr 2015 21:15:13 GMT
Content-Type: application/json; charset=utf-8

{
    "content_length": 154766,
    "date_modified": "2011-07-11T23:03:48+0000",
    "display_name": "Seating Chart",
    "file_name": "0E03BBC3-97C7-4168-A9B9-B3D4DD9D7088.pages",
    "links": [
        {
            "href": "https://secure.directmailmac.com/api/v2/projects/187812f26ba37d9769d8691d2a83c95c/messages/F7ADD5FB-6AB3-49A7-AA2B-233A7C750FE7/attachments/07846D22-F0F7-4A39-96FD-A7FACC022FB8",
            "rel": "self"
        },
        {
            "href": "https://e3cloud.s3.amazonaws.com/1/187812f26ba37d9769d8691d2a83c95c/4B3E4F34-6177-492E-A1F9-DD99AE6EA839/8d0a639a7b948d41a1998428ef3572f2?AWSAccessKeyId=AKIADJWNDHFYWJDNCIQWJD&Expires=1429738213&Signature=gXuwVvcpPUej0Xy7huYhKNuCyT8%3D",
            "rel": "content"
        }
    ],
    "uuid": "07846D22-F0F7-4A39-96FD-A7FACC022FB8"
}

DELETE

Deletes the attachment.

DELETE Response Status Codes

Code Description
503 Service Unavailable Server is undergoing maintenance and is unavailable
429 Rate Limited Rate limiting in effect, try again later
404 Not Found The project could not be found
403 Forbidden Direct Mail account is disabled or the message is not editable
401 Unauthorized API key, secret, or authentication method is incorrect
400 Bad Request One or more of the values in the request body is invalid
202 Accepted The request has been accepted for processing

DELETE Response Body

A JSON object representing the merge task.

Key Value Description
links Array of Object URL for the merge task.

DELETE Example

DELETE /api/v2/projects/187812f26ba37d9769d8691d2a83c95c/messages/F7ADD5FB-6AB3-49A7-AA2B-233A7C750FE7/attachments/07846D22-F0F7-4A39-96FD-A7FACC022FB8 HTTP/1.1
Authorization: Basic QzFENDREMjEtNTA4MC00NTM3LUFFOD
Host: secure.directmailmac.com

HTTP/1.1 202 Accepted
Date: Wed, 22 Apr 2015 21:16:44 GMT
Content-Type: application/json; charset=utf-8

{
    "links": [
        {
            "href": "https://secure.directmailmac.com/api/v2/projects/187812f26ba37d9769d8691d2a83c95c/merge-task?s=35&m=DELETE&r=https%3A%2F%2Fsecure.directmailmac.com%2Fapi%2Fv2%2Fprojects%2F187812f26ba37d9769d8691d2a83c95c%2Fmessages%2FF7ADD5FB-6AB3-49A7-AA2B-233A7C750FE7%2Fattachments%2F07846D22-F0F7-4A39-96FD-A7FACC022FB8",
            "rel": "merge-task"
        }
    ]
}

Fanden Sie diesen Artikel hilfreich? Ja | Nein