JS Client API
Search…
Getting Started
Rule Engine Unique Functions
Custom Form Window Functions
Known Issues
Use Cases & Code Samples
Retrieving Data
Retrieving Standard Resources
Retrieving User Defined Tables
Retrieving Attachments
Retrieving Items in Transaction Scope
Retrieving Transaction Lines
ADAL
Updating Data
Adding Objects to Standard Resources
Updating Standard resources
Updating User Defined Table
Updating Items in Transaction Scope
Adding Transaction Lines
Removing Transaction Lines
Powered By
GitBook
Retrieving Attachments
Retrieving attachments
Attachments should be retrieved in 2 steps:
1.
getting the attachment UUID from the object's field . e.g: Transaction.TSAMyImage1
2.
call
pepperi.api.attachments.get
( while search can be used to get multiple images of certain item or category)
Get single attachment and list of attachments
Attachments are retrieved like a standard resource - the difference is in their optional fields and their response :
1
pepperi
.
api
.
attachments
.
get
(
{
key
:
{
UUID
:
""
},
fields
:
[
"UUID"
,
"URI"
,
"URL"
]}
)
Copied!
Returns:
1
{
UUID
:
"659a8f38-9f8a-4286-b3dd-1973dd8c35b2"
,
2
URI
:
""
3
URL
:
""
}
Copied!
Getting list of attachments :
1
pepperi
.
api
.
attachments
.
search
(
2
{
3
fields
:
[
"UUID"
,
"URI"
,
"URL"
],
4
filter
:
{
ApiName
:
"URL"
,
Operation
:
"Contains"
,
5
Values
:
[
"MyItem"
]}
,
6
}
7
);
Copied!
Returns:
1
{success: true, objects:
2
[ {UUID: "aefb523e-74ac-4041-8bb1-a76a3b5e78d8" , URI:"" ,URL:"" },
3
{UUID: "aefb523e-74ac-4041-8bb1-a76a3b5e78d8" , URI:"" ,URL:"" }
4
] }
Copied!
URI
: In case of native app it will return the base64 of the Binary Content in
data-URI format
(embedded base64 URI)
URL
: Will always return the attachment's web URL- no matter what is the app type - web or native
Retrieving Data - Previous
Retrieving User Defined Tables
Next - Retrieving Data
Retrieving Items in Transaction Scope
Last modified
2yr ago
Copy link
Contents
Get single attachment and list of attachments