Asana API - Get attachment file size - api

Is it possible to get attachment sizes from the Asana API without downloading them?
Currently all my attachments for asana are on S3, but I cannot do a HEAD request on them. I get a 403, I'm assuming this is because the signature is for a GET request.

Related

Attach files larger than 5MB using GMAIL API resumable upload

I am trying to upload an attachment which is greater than 5MB size, hence using resumable upload option of the gmail API using the REST API option.(https://developers.google.com/gmail/api/guides/uploads#resume-upload).
In the API spec it is not clear on what should be the request body of the resumable upload request and the request body of the upload URI.
I have tried all possible ways of adding parameters to the body of the request, but couldn't succeed in attaching the file to the email.
has anyone able to successfully attach files using the resumable upload api,
Also should the attachment file needs to be uploaded as base64 encoded ?
developer guide doesn't provide much information, so unable to get a working solution.
Can anyone provide a snippet of request of the resumable upload request and the request of upload URI ?

Azure logic app API http response with excel file download using Postman

Created azure logic app HTTP request it gives response for normal JSON schema However, I want to attach SharePoint excel sheet when I trigger the request from Postman.
1.How to used content type or schema to download the attached file. when postman request sent.
2.is that possible to download when you hit API through logic app
3.Generated HTTP POST URL is working
For your requirement, I test it in my side. It seems we do not need to set any value for "Content-Type" in headers of response. Please refer to my logic app below:
Then when you request the logic app url in postman, please choose "Send and Download" instead of "Send".
After that, you can download the file when request the url in postman.

How to upload pdf to S3 bucket?

I recorded jmeter script with blazemeter to upload a pdf file to the s3 bucket.When I parameterize the required values and execute the script to upload the file I am getting the error response
Response code: 403
Response message: Forbidden
All the parameters have correct values passed.
You should also get an appropriate Error Code which provides way more information regarding what's wrong, i.e. Access Denied or All access to this Amazon S3 resource has been disabled., once you know the root cause you should be able to figure out what needs to be done in order to resolve the issue.
Also double check all the request parameters using Debug Sampler and View Results Tree listener, for example you cannot record and replay X-Amz-Signature, you need to generate a proper one for each and every request, see How to Handle Dynamic AWS SigV4 in JMeter for API Testing article for more details

400 error when I send Document url toTelegram bot with api

I want to send MP3 file in telegram with my bot but some files return 400 error.
foe example this url
http://www.dl.noisera.com/files/musics/1586023395/introhanditdown.mp3
is not send and return 400 error but this url
http://www.dl.noisera.com/files/musics/1586023929/hardknocklifeghettoanthem.mp3
is send.
my api code is:
$url = 'https://api.telegram.org/bot'.$bot_id.'/sendDocument?chat_id='.$chat_id.'&document=http://www.dl.noisera.com/'.$_POST["musicFile"];
file_get_contents($url);
what is problem?
Telegram servers have cache problems, it takes a few hours for new links to be found by their servers. You should manually download the file with your server and upload it when you get that error.

Couldn't call aws api gateway from postman

I have created an api in amazon api gateway service with s3 proxy, and created a method post to upload a file to s3 using the document. Deployed the API and then using that url i tried to call the api from postman. But i couldn't post the file and it returns an error 'missing authentication token'.
I set authorization as NONE.
Then it returns an Unexpected "<" error.
Ah, okay. S3 only supports POST from an HTML form, which is why you see the error where it is expecting multipart formdata.
The method you need to use is PUT, instead of POST. PUT requires an item path, so you'll need to change the resource path to have a bucket and key, or get those from other places.
I have some more info on how to set this up in upload binary from api gateway to S3 bucket
It sounds like the document you're uploading isn't JSON. By default, API Gateway expects UTF-8 encoded JSON.
What content type are you sending with your Postman request?