<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>mmoales さんのアクティビティ</title><link>https://www.aras.com/community/members/mmoales</link><description>mmoales さんの最近のアクティビティ</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>Conversion task not triggered after REST upload</title><link>https://www.aras.com/community/f/development/3961/conversion-task-not-triggered-after-rest-upload</link><pubDate>Tue, 09 Oct 2018 15:30:34 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:5c38d88f-1151-466a-89fe-3827a249faae</guid><dc:creator>mmoales</dc:creator><description>I am uploading files using the REST API. However, after a successful upload, the conversion task that is associated with the specified file type is not being triggered. If I upload the same file using the client, the task is triggered. Has anyone done this before? Is there something I should be setting in the commit request to trigger the conversion task? I tried including &amp;#39;@aras.serverEvents&amp;#39;:&amp;#39;1&amp;#39; in the request body, but it did not make any difference.

Thanks,

Mark&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Ask A Question I</title><link>https://www.aras.com/community/achievements/460ac7df-7ccc-4c42-a204-9e05eef3be09</link><pubDate>Wed, 12 Dec 2018 22:57:24 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:d1b96f93-58fe-4e5d-b210-bb3afc245744</guid><dc:creator /><description>Ask a question in a forum.</description></item><item><title>Update relationship via REST API</title><link>https://www.aras.com/community/f/development/3862/update-relationship-via-rest-api</link><pubDate>Wed, 01 Aug 2018 15:04:36 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:445529b4-ee13-40f5-808f-03d32286763b</guid><dc:creator>mmoales</dc:creator><description>I&amp;#39;m trying to change the file that a Document/Document File relationship is using with the REST API. According to the documentation:
&lt;blockquote&gt;In order to set a value for an Item property, the client must send a PUT request to the Item property
reference:
&lt;pre&gt;PUT host/.../$ref
Prefer: return=minimal
{
&amp;quot;@odata.id&amp;quot;: &amp;quot;&amp;quot;&amp;gt;host/.../User(‘C542FC153AE647A59CD6F6967295EF6B’)&amp;quot;
}&lt;/pre&gt;
&lt;/blockquote&gt;
Here is how I am trying to do this for the Document File relationship:
&lt;pre&gt;PUT host/.../Document File(&amp;#39;7E15...F5E9&amp;#39;)/related_id/$ref
{
&amp;quot;@odata.id&amp;quot;: &amp;quot;&amp;quot;&amp;gt;host/.../File(&amp;#39;0284...3BA0&amp;#39;)&amp;quot;
}&lt;/pre&gt;
This results in an Aras.Server.Core.ItemIsNotLockedException.  I also tried adding the @aras.action:lock to the JSON and this gave the same error. Is this the correct way to modify the Document File relationship?

&amp;nbsp;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Upload using RESTful API</title><link>https://www.aras.com/community/f/development/3618/upload-using-restful-api</link><pubDate>Thu, 08 Mar 2018 08:24:49 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:c3f672d0-4cc1-42fc-95da-2f67f610fcf7</guid><dc:creator>mmoales</dc:creator><description>I&amp;#39;m trying to write a python script to upload a file to the vault using the RESTful API in 11SP12. Here is the doc specific to the upload operation:

&lt;em&gt;&lt;strong&gt;The vault.UploadFile Method uploads the file chunk within a given transaction. The File ID is generated&lt;/strong&gt;&lt;/em&gt;
&lt;em&gt;&lt;strong&gt;on the client and passed to the vault server using the fileId query option.&lt;/strong&gt;&lt;/em&gt;

Here is a sample HTTP post from the doc:

&lt;em&gt;&lt;strong&gt;POST vault/.../vault.UploadFile&lt;/strong&gt;&lt;/em&gt;
&lt;em&gt;&lt;strong&gt;Content-Type: application/octet-stream&lt;/strong&gt;&lt;/em&gt;
&lt;em&gt;&lt;strong&gt;Content-Length: 37410&lt;/strong&gt;&lt;/em&gt;
&lt;em&gt;&lt;strong&gt;transactionid: 8970e933322d1328537f645d3683214c&lt;/strong&gt;&lt;/em&gt;
&lt;em&gt;&lt;strong&gt;… file chunk content&lt;/strong&gt;&lt;/em&gt;

When I try to upload, my POST looks pretty much identical to this since I first start a transaction to the the transaction ID and then do the upload. For the fileId, I am generating a MD5 hash of the file&amp;#39;s content. However, when I execute the upload operation, I get the following error:

{&amp;#39;error&amp;#39;: {&amp;#39;code&amp;#39;: &amp;#39;500&amp;#39;, &amp;#39;message&amp;#39;: &amp;quot;Can&amp;#39;t bind model.&amp;quot;}}

I&amp;#39;ve tried tweaking a number of things in my request, but I always get the same error. Aras support suggested I include Content-Disposition and Content-Range headers in my request, but I get the same result. Here&amp;#39;s a an example POST from my script:

&lt;em&gt;&lt;strong&gt;POST localhost/.../vault.UploadFile HTTP/1.1&lt;/strong&gt;&lt;/em&gt;
&lt;em&gt;&lt;strong&gt;Host: localhost&lt;/strong&gt;&lt;/em&gt;
&lt;em&gt;&lt;strong&gt;User-Agent: python-requests/2.18.3&lt;/strong&gt;&lt;/em&gt;
&lt;em&gt;&lt;strong&gt;Accept-Encoding: gzip, deflate&lt;/strong&gt;&lt;/em&gt;
&lt;em&gt;&lt;strong&gt;Accept: */*&lt;/strong&gt;&lt;/em&gt;
&lt;em&gt;&lt;strong&gt;Connection: keep-alive&lt;/strong&gt;&lt;/em&gt;
&lt;em&gt;&lt;strong&gt;DATABASE: InnovatorSolutions&lt;/strong&gt;&lt;/em&gt;
&lt;em&gt;&lt;strong&gt;LOCALE: en-US&lt;/strong&gt;&lt;/em&gt;
&lt;em&gt;&lt;strong&gt;TIMEZONE_NAME: Eastern Standard Time&lt;/strong&gt;&lt;/em&gt;
&lt;em&gt;&lt;strong&gt;AUTHUSER: admin&lt;/strong&gt;&lt;/em&gt;
&lt;em&gt;&lt;strong&gt;AUTHPASSWORD: 607920b64fe136f9ab2389e371852af2&lt;/strong&gt;&lt;/em&gt;
&lt;em&gt;&lt;strong&gt;transactionId: 4f1006553c262ee2a05b4ce3de57948a&lt;/strong&gt;&lt;/em&gt;
&lt;em&gt;&lt;strong&gt;Content-Type: application/octet-stream&lt;/strong&gt;&lt;/em&gt;
&lt;em&gt;&lt;strong&gt;Content-Disposition: attachment; filename=&amp;quot;test-data.txt&amp;quot;&lt;/strong&gt;&lt;/em&gt;
&lt;em&gt;&lt;strong&gt;Content-Range: bytes 0-45/45&lt;/strong&gt;&lt;/em&gt;
&lt;em&gt;&lt;strong&gt;Transfer-Encoding: chunked&lt;/strong&gt;&lt;/em&gt;

&lt;em&gt;&lt;strong&gt;2d&lt;/strong&gt;&lt;/em&gt;
&lt;em&gt;&lt;strong&gt;This data is test data that I need to test.&lt;/strong&gt;&lt;/em&gt;

&lt;em&gt;&lt;strong&gt;0&lt;/strong&gt;&lt;/em&gt;

Has anyone tried this out and got it working?

&amp;nbsp;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>