Accessing attachments using API

Is there a way to access data inside .json file, which is uploaded as attachment to one of the folder inside folders tab, using api2?

@Mabaega @lubos Can you please help? I tried to access data by directly taking attachment url, but it works only on local environment. Program (browser) cannot even access data if in incognito mode due to CORS policy.

So I thought may be we can access same data using api2 somehow

It seems impossible at the moment.

I’ve checked the Api2 path for transaction , I don’t see any attachment linked to transaction record.

It looks like the Key transaction is linked in attachments record, but we don’t have /attchments path in Api2.

Tried via old Api, but still can’t, because the content of the attachment is not there.

It’s not possible to work with attachments using API. But I think it should be possible to be able to upload or retrieve attachments. Added to ideas.

@romangarg can you shed some light on your use-case?

Which is a good thing. Actually I am pretty worried about both API1 and API2 as implemented, The “security” is based on a token or username and password. API Attacks (search Google) are frightening and when dealing with business accounts even more. Not so much that an API Attacker can manipulate the accounts but they can harvest huge amount of information. I think there needs to be a thorough security review of Manager API and JSON usage.

The original API will be eventually removed and there will be new API only.

If you don’t create any access tokens, then nobody will be able to access any data over API. So API can be
“switched off” if you don’t trust it.

I use .json attachments to define different discount for different brand products our company trade in, & use them in sales & purchase invoice form to autofill discount column accordingly.

please anyone can share any .json file to api2 like an example to know how it work

Please read the thread

It will remain in ideas until that’s resolved