<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Creating a tracker item with attachments (Image PNG , jpg) in description using rest API in V2/V in Codebeamer</title>
    <link>https://www.ptcusercommunity.com/t5/Codebeamer/Creating-a-tracker-item-with-attachments-Image-PNG-jpg-in/m-p/1034627#M975</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;not exactly sure how the Python would look like but a corresponding cUrl command would look like this:&lt;/P&gt;
&lt;P&gt;curl -X POST "https://&amp;lt;fqdn host&amp;gt;:&amp;lt;port&amp;gt;/cb/api/v3/items/&amp;lt;itemID&amp;gt;/attachments" -u "&amp;lt;user&amp;gt;:&amp;lt;password&amp;gt;" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "attachments=@Capture.PNG;type=image/png"&lt;/P&gt;</description>
    <pubDate>Thu, 18 Sep 2025 13:04:53 GMT</pubDate>
    <dc:creator>aseifert</dc:creator>
    <dc:date>2025-09-18T13:04:53Z</dc:date>
    <item>
      <title>Creating a tracker item with attachments (Image PNG , jpg) in description using rest API in V2/V3</title>
      <link>https://www.ptcusercommunity.com/t5/Codebeamer/Creating-a-tracker-item-with-attachments-Image-PNG-jpg-in/m-p/1034615#M974</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello Team,&lt;BR /&gt;&lt;BR /&gt;I am working with Code beamer version 22.2.1.0 and trying to upload an image (PNG/JPG) as an attachment to a tracker item using the REST API.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I can list attachments successfully using:&lt;BR /&gt;GET /cb/rest/v3/items/{item Id}/attachments&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But when I try to upload using:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;POST /cb/rest/v3/items/{ item_Id}/attachments&lt;BR /&gt;with multipart/form-data, I either receive 400/415 errors&amp;nbsp; or the request succeeds but no file appears under the "Attachments" tab in the UI.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Example I tried in Python:&lt;BR /&gt;```python&lt;BR /&gt;with open("test.png", "rb") as f:&lt;BR /&gt;&amp;nbsp; &amp;nbsp;files = { "attachments": ("test.png", f, "image/png") }&lt;BR /&gt;&amp;nbsp; &amp;nbsp;resp = session.post(f"{base_url}/v3/items/{item_id}/attachments", files=files)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Sep 2025 12:36:20 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Codebeamer/Creating-a-tracker-item-with-attachments-Image-PNG-jpg-in/m-p/1034615#M974</guid>
      <dc:creator>SS_14152782</dc:creator>
      <dc:date>2025-09-18T12:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a tracker item with attachments (Image PNG , jpg) in description using rest API in V2/V</title>
      <link>https://www.ptcusercommunity.com/t5/Codebeamer/Creating-a-tracker-item-with-attachments-Image-PNG-jpg-in/m-p/1034627#M975</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;not exactly sure how the Python would look like but a corresponding cUrl command would look like this:&lt;/P&gt;
&lt;P&gt;curl -X POST "https://&amp;lt;fqdn host&amp;gt;:&amp;lt;port&amp;gt;/cb/api/v3/items/&amp;lt;itemID&amp;gt;/attachments" -u "&amp;lt;user&amp;gt;:&amp;lt;password&amp;gt;" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "attachments=@Capture.PNG;type=image/png"&lt;/P&gt;</description>
      <pubDate>Thu, 18 Sep 2025 13:04:53 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Codebeamer/Creating-a-tracker-item-with-attachments-Image-PNG-jpg-in/m-p/1034627#M975</guid>
      <dc:creator>aseifert</dc:creator>
      <dc:date>2025-09-18T13:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a tracker item with attachments (Image PNG , jpg) in description using rest API in V2/V</title>
      <link>https://www.ptcusercommunity.com/t5/Codebeamer/Creating-a-tracker-item-with-attachments-Image-PNG-jpg-in/m-p/1034839#M978</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thanks for the guidance. My main requirement is to upload an image as an attachment to a tracker item using the REST API.&lt;BR /&gt;Could you please share an example of how this can be done in any programming language (preferably Python, Java, or even curl for Windows)? I’m specifically looking for a solution where the image is posted as an attachment along with the tracker item via the REST API.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Sep 2025 09:37:31 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Codebeamer/Creating-a-tracker-item-with-attachments-Image-PNG-jpg-in/m-p/1034839#M978</guid>
      <dc:creator>SS_14152782</dc:creator>
      <dc:date>2025-09-19T09:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a tracker item with attachments (Image PNG , jpg) in description using rest API in V2/V</title>
      <link>https://www.ptcusercommunity.com/t5/Codebeamer/Creating-a-tracker-item-with-attachments-Image-PNG-jpg-in/m-p/1035396#M980</link>
      <description>&lt;P&gt;Above cUrl example already works attaching images as attachment. If it gives error, there may be something odd which needs to be investigated.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Sep 2025 13:19:11 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Codebeamer/Creating-a-tracker-item-with-attachments-Image-PNG-jpg-in/m-p/1035396#M980</guid>
      <dc:creator>aseifert</dc:creator>
      <dc:date>2025-09-23T13:19:11Z</dc:date>
    </item>
  </channel>
</rss>

