Get Attachments
You can get attachments from business objects.
Base URL:
https://{tenant url}/api/rest/Attachment?ID={business object unique key}
Here is an example to get attachments from a particular business object.
| URL | https://{tenant url}/api/rest/Attachment?ID=05B5CD2DFAE54D86A04C74DBF616C1DE | 
| 
                                                                 Method  | 
                                                            
                                                                 GET  | 
                                                        
| Header Name | Authorization: JWT Token/Session Key/REST API Key | 
| Status Code | 
                                                                 200  | 
                                                        
The attachment is displayed in the message body.
Unsuccessful Responses
Scenario: Trying to get attachments when the business object's RecID is invalid.
https://{tenant url}/api/rest/Attachment?ID=abc123
Header Name:
Authorization: Sessionkey
| Code | ISM_4000 | 
| Description | Invalid Request | 
| Message | 
                                                                 [ "Attachment for the object "abc123" not found. Provide a valid RecID and try again." ]  | 
                                                        
| 
                                                                 HTTP STATUS CODE  | 
                                                            
                                                                 400  | 
                                                        
Scenario: Trying to get attachments without providing the business object's RecID.
https://{tenant url}/api/rest/Attachment?ID=
Header Name:
Authorization: Sessionkey
| Code | ISM_4000 | 
| Description | Invalid Request | 
| Message | 
                                                                 [ "RecID cannot be blank. Provide a valid RecID and try again." ]  | 
                                                        
| 
                                                                 HTTP STATUS CODE  | 
                                                            
                                                                 400  |