<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://ivs.help/wiki/index.php?action=history&amp;feed=atom&amp;title=API_Get_Comment_File</id>
		<title>API Get Comment File - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://ivs.help/wiki/index.php?action=history&amp;feed=atom&amp;title=API_Get_Comment_File"/>
		<link rel="alternate" type="text/html" href="https://ivs.help/wiki/index.php?title=API_Get_Comment_File&amp;action=history"/>
		<updated>2026-06-17T18:51:18Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://ivs.help/wiki/index.php?title=API_Get_Comment_File&amp;diff=17607&amp;oldid=prev</id>
		<title>IVSWikiBlue: Created page with &quot;This API call retrieves a specific file attached to a comment as a direct binary download. The response body contains the raw file bytes. The &lt;code&gt;Content-Disposition: attach...&quot;</title>
		<link rel="alternate" type="text/html" href="https://ivs.help/wiki/index.php?title=API_Get_Comment_File&amp;diff=17607&amp;oldid=prev"/>
				<updated>2026-06-11T20:54:25Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;This API call retrieves a specific file attached to a comment as a direct binary download. The response body contains the raw file bytes. The &amp;lt;code&amp;gt;Content-Disposition: attach...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This API call retrieves a specific file attached to a comment as a direct binary download. The response body contains the raw file bytes. The &amp;lt;code&amp;gt;Content-Disposition: attachment&amp;lt;/code&amp;gt; response header instructs the client to download the file, and the &amp;lt;code&amp;gt;Content-Type&amp;lt;/code&amp;gt; header will reflect the type of the file (e.g. &amp;lt;code&amp;gt;application/pdf&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;image/png&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===Resource URL===&lt;br /&gt;
&amp;lt;pre&amp;gt;http://valt.example.com/api/v3/comment/{commentId}/files/{fileId}&amp;lt;/pre&amp;gt;&lt;br /&gt;
''Replace {commentId} with the ID of the comment and {fileId} with the ID of the file.''&lt;br /&gt;
&lt;br /&gt;
===Resource Information===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Method'''&lt;br /&gt;
|GET&lt;br /&gt;
|-&lt;br /&gt;
|'''Headers'''&lt;br /&gt;
|Content-Type: application/json&lt;br /&gt;
|-&lt;br /&gt;
|'''Response Type'''&lt;br /&gt;
|Binary File Download&lt;br /&gt;
|-&lt;br /&gt;
|'''Authentication Required'''&lt;br /&gt;
|Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
====Path Parameters====&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Parameter&lt;br /&gt;
!Description&lt;br /&gt;
!Example&lt;br /&gt;
|-&lt;br /&gt;
|'''commentId'''&lt;br /&gt;
|The ID of the comment that owns the file.&lt;br /&gt;
|42&lt;br /&gt;
|-&lt;br /&gt;
|'''fileId'''&lt;br /&gt;
|The ID of the file to retrieve.&lt;br /&gt;
|20&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Response===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Code&lt;br /&gt;
!Reason&lt;br /&gt;
|-&lt;br /&gt;
|200&lt;br /&gt;
|File Retrieved Successfully&lt;br /&gt;
|-&lt;br /&gt;
|400&lt;br /&gt;
|Invalid Request (See Response for Specific Error)&lt;br /&gt;
|-&lt;br /&gt;
|401&lt;br /&gt;
|Unauthorized&lt;br /&gt;
|-&lt;br /&gt;
|404&lt;br /&gt;
|Comment or File Not Found&lt;br /&gt;
|-&lt;br /&gt;
|500&lt;br /&gt;
|Internal Server Error&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A successful response returns the binary contents of the file as a direct download. Notable response headers include:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Header&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|'''Content-Type'''&lt;br /&gt;
|The MIME type of the file (e.g. &amp;lt;code&amp;gt;application/pdf&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;image/png&amp;lt;/code&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
|'''Content-Disposition'''&lt;br /&gt;
|Set to &amp;lt;code&amp;gt;attachment; filename=&amp;quot;...&amp;quot;&amp;lt;/code&amp;gt;, instructing the client to download the file.&lt;br /&gt;
|-&lt;br /&gt;
|'''Content-Length'''&lt;br /&gt;
|The size of the file in bytes.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file IDs associated with a comment can be obtained from the &amp;lt;code&amp;gt;files&amp;lt;/code&amp;gt; array returned by the [[API View Comment]] or [[API View All Comments by Recording]] endpoints. Each file entry in that array contains the &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;size&amp;lt;/code&amp;gt; (in bytes) of the attachment.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
===Request===&lt;br /&gt;
&amp;lt;pre&amp;gt;https://ivstest1.ad.ipivs.com/api/v3/comment/42/files/20?access_token=e82632d19c523678fea3d1016c6df9e9&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===cURL Examples===&lt;br /&gt;
When making this request via the command line with cURL, the raw binary will be dumped to the terminal by default. Use one of the following approaches to save the file instead.&lt;br /&gt;
&lt;br /&gt;
Save with a manually specified filename:&lt;br /&gt;
&amp;lt;pre&amp;gt;curl -o myfile.pdf &amp;quot;https://ivstest1.ad.ipivs.com/api/v3/comment/42/files/20?access_token=e82632d19c523678fea3d1016c6df9e9&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save using the filename provided by the server in the &amp;lt;code&amp;gt;Content-Disposition&amp;lt;/code&amp;gt; header:&lt;br /&gt;
&amp;lt;pre&amp;gt;curl -J -O &amp;quot;https://ivstest1.ad.ipivs.com/api/v3/comment/42/files/20?access_token=e82632d19c523678fea3d1016c6df9e9&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-J&amp;lt;/code&amp;gt; flag instructs cURL to use the filename from the &amp;lt;code&amp;gt;Content-Disposition&amp;lt;/code&amp;gt; header, and &amp;lt;code&amp;gt;-O&amp;lt;/code&amp;gt; writes the response to a file rather than stdout.&lt;br /&gt;
&lt;br /&gt;
===Not Found Response===&lt;br /&gt;
Returned when no comment or file exists with the specified IDs.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;title&amp;quot;: &amp;quot;An error occurred&amp;quot;,&lt;br /&gt;
  &amp;quot;status&amp;quot;: 404,&lt;br /&gt;
  &amp;quot;detail&amp;quot;: &amp;quot;Not Found&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Failure Response===&lt;br /&gt;
Sample response is shown with line breaks to make it more readable. Actual responses will not include line breaks.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;error&amp;quot;: {&lt;br /&gt;
    &amp;quot;code&amp;quot;: 500,&lt;br /&gt;
    &amp;quot;message&amp;quot;: &amp;quot;Internal Server Error&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>IVSWikiBlue</name></author>	</entry>

	</feed>