<?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>lilnobp さんの グループ アクティビティ</title><link>https://www.aras.com/community/members/lilnobp</link><description>lilnobp さんの グループ ユーザーの最近のアクティビティ</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>Token Authentication using the REST API</title><link>https://www.aras.com/community/b/english/posts/token-authentication-using-the-rest-api</link><pubDate>Thu, 02 May 2019 12:30:00 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:3cef7e0d-c20c-4e1d-8938-82e633d39d2e</guid><dc:creator>Christopher Gillis</dc:creator><description>&lt;p&gt;Aras Innovator&amp;nbsp;introduced an Authentication Server feature in 11.0 SP12 and has been fleshing it out with each new service pack. In 11.0 SP15, it is possible to request an OAuth token from this server that can be used with the &lt;a href="/b/english/posts/tech-tip-using-the-aras-restful-api"&gt;RESTful API&lt;/a&gt; as an alternative to basic authentication.&amp;nbsp;Using tokens is preferred for external apps as they don&amp;#39;t require you to keep your users&amp;#39; passwords in memory while your app runs. Because tokens expire after a set time, you can also rest assured that if a malicious party later acquires&amp;nbsp;the token, they won&amp;#39;t have access to your system.&lt;/p&gt;
&lt;p&gt;In this blog post, we&amp;#39;ll be going over examples of both requesting an OAuth token from the Aras Innovator server as well as using that token to authenticate additional requests. You can also check out this&amp;nbsp;&lt;a href="https://github.com/ArasLabs/rest-auth-example"&gt;Authentication Example&lt;/a&gt; on GitHub for a simple app that will&amp;nbsp;request a token and use that token to query the Parts in a database.&lt;/p&gt;
&lt;h2 id="register-your-app"&gt;Register Your App&lt;/h2&gt;
&lt;p&gt;One of the features of the Authentication Server is to limit what apps can request a token.&amp;nbsp;The Authentication Server keeps a list of registered apps that are able to request tokens, so external applications cannot get tokens by default. If you don&amp;#39;t wish to do any additional configuration, you can use the default &amp;quot;IOMApp&amp;quot; client registry.&amp;nbsp;However, we recommend adding a new client registry to register your app with the server by following the steps below.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open the \OAuthServer\OAuth.config in your preferred text editor&lt;/li&gt;
&lt;li&gt;Scroll down to the bottom until you see &lt;strong&gt;&amp;lt;clientRegistry id=&amp;quot;IOMApp&amp;quot;&amp;gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;/strong&gt;Copy this node and all of its child nodes&lt;/li&gt;
&lt;li&gt;Paste them as a new section just below the original node&lt;/li&gt;
&lt;li&gt;Give a new ID to this registry corresponding to the purpose of your app&lt;/li&gt;
&lt;li&gt;Make sure this new registry has&amp;nbsp;&lt;strong&gt;enabled=&amp;quot;true&amp;quot;&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;Make note of the ID you give this new registry. You will need to use it in the body of your request for a token which is covered later in this blog.&lt;/p&gt;
&lt;h2&gt;Get the OAuthServer URL&lt;/h2&gt;
&lt;p&gt;The first thing we&amp;#39;ll want to do is query for the location of the OAuthServer.&amp;nbsp;Because Aras Innovator allows most of its components to exist on separate servers, the OAuthServer may not be available from the same server as our Instance URL. However, the Innovator Server does have a way to query for this information by appending&amp;nbsp;&lt;strong&gt;/Server/OAuthServerDiscovery.aspx&lt;/strong&gt; to the end of your Instance URL:&amp;nbsp;&lt;strong&gt;&lt;/strong&gt;http://localhost/InnovatorServer/Server/OAuthServerDiscovery.aspx&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;If you&amp;#39;re using something like &lt;a href="https://www.getpostman.com/"&gt;Postman&lt;/a&gt;&amp;nbsp;to follow along with this blog, you can simply perform a get request on this URL with an empty body. The result of this request should look something like below.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;{&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;quot;locations&amp;quot;: [&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; {&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "uri": "http://localhost/InnovatorServer/oauthserver/"&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; }&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; ]&lt;/code&gt;&lt;br /&gt;&lt;code&gt;}&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The URL we will use is stored in the&amp;nbsp;&lt;strong&gt;uri&lt;/strong&gt; property of the JSON returned from our request. The JSON path you can use to retrieve this information is&amp;nbsp;&lt;em&gt;locations[0].uri&lt;/em&gt;.&lt;/p&gt;
&lt;h2&gt;Get the Token Endpoint&lt;/h2&gt;
&lt;p&gt;Now that we have the URL of the OAuthServer, we will need to retrieve the exact URL that we can use to query for the token. This next URL is based on the &lt;a href="https://openid.net/specs/openid-connect-discovery-1_0.html"&gt;OpenID discovery specification&lt;/a&gt;. We will take the OAuthServer URL from our previous step and append&amp;nbsp;&lt;em&gt;.well-known/openid-configuration&lt;/em&gt; to the end of it: http://localhost/InnovatorServer/oauthserver/.well-known/openid-configuration. Again, we can query on this URL with a simple GET request without passing anything through the body.&lt;/p&gt;
&lt;p&gt;The response to this request is significantly longer, but it should contain our token endpoint somewhere near the top.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;{&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;quot;issuer&amp;quot;: &amp;quot;OAuthServer&amp;quot;,&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;quot;jwks_uri&amp;quot;: &amp;quot;http://localhost/InnovatorServer/oauthserver/.well-known/openid-configuration/jwks&amp;quot;,&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;quot;authorization_endpoint&amp;quot;: &amp;quot;http://localhost/&lt;span&gt;InnovatorServer&lt;/span&gt;/oauthserver/connect/authorize&amp;quot;,&lt;/code&gt;&lt;br /&gt;&lt;strong&gt;&lt;code&gt;&amp;nbsp; &amp;quot;token_endpoint&amp;quot;: &amp;quot;http://localhost/&lt;span&gt;InnovatorServer&lt;/span&gt;/oauthserver/connect/token&amp;quot;&lt;/code&gt;&lt;/strong&gt;&lt;code&gt;,&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;quot;userinfo_endpoint&amp;quot;: &amp;quot;http://localhost/&lt;span&gt;InnovatorServer&lt;/span&gt;/oauthserver/connect/userinfo&amp;quot;,&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;quot;end_session_endpoint&amp;quot;: &amp;quot;http://localhost/&lt;span&gt;InnovatorServer&lt;/span&gt;/oauthserver/connect/endsession&amp;quot;,&lt;/code&gt;&lt;br /&gt;&lt;code&gt;...&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The JSON path to retrieve this data is simply&amp;nbsp;&lt;em&gt;token_endpoint&lt;/em&gt;.&lt;/p&gt;
&lt;h2&gt;Get Token&lt;/h2&gt;
&lt;p&gt;The final request we&amp;#39;ll use to retrieve our token will use the token endpoint URL retrieved in the previous step. Because this token will be linked to a user&amp;#39;s credentials, we will need to pass in additional information before making our request. If you&amp;#39;re following along with Postman, you can use the Multipart Form to specify the following pieces of information in your body.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;grant_type&lt;/strong&gt; : &amp;quot;password&amp;quot;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Currently, I believe&amp;nbsp;&lt;strong&gt;&lt;/strong&gt;&amp;quot;password&amp;quot; is the only authentication type allows. Aras as a whole is moving towards more types of authentication in 12.0, so this is likely to change in the upcoming releases.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;scope&lt;/strong&gt; : &amp;quot;Innovator&amp;quot;
&lt;ul&gt;
&lt;li&gt;The scope of information this token will be able to access. &amp;quot;Innovator&amp;quot; will be used for almost all purposes.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;client_id&lt;/strong&gt; : &amp;quot;IOMApp&amp;quot;
&lt;ul&gt;
&lt;li&gt;The ID of your client app you configured in the first step of this blog.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;username&lt;/strong&gt; : &amp;quot;YOUR_USER_NAME&amp;quot;
&lt;ul&gt;
&lt;li&gt;Any requests made using the returned token will share the same permissions as this user&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;password&lt;/strong&gt; : &amp;quot;YOUR_MD5_HASHED_PASSWORD&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;database&lt;/strong&gt; : &amp;quot;YOUR_DATABASE_NAME&amp;quot;
&lt;ul&gt;
&lt;li&gt;This should be the name of the database that this token will be able to access. &amp;quot;InnovatorSolutions&amp;quot; is the default name of Aras databases.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After configuring your body, you can send a POST request to the token endpoint URL with the body containing the properties defined above. The response will contain both the OAuth token as well as how long you will have until that token expires.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;{&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;quot;access_token&amp;quot;: &amp;quot;YOUR_TOKEN&amp;quot;,&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;quot;expires_in&amp;quot;: 3600,&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;quot;token_type&amp;quot;: &amp;quot;Bearer&amp;quot;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;}&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The JSON path to this token will be&amp;nbsp;&lt;em&gt;access_token&lt;/em&gt;. By default, the IOMApp token expires in 3600 seconds or 1 hour.&lt;/p&gt;
&lt;h2&gt;Make Request with Token&lt;/h2&gt;
&lt;p&gt;If you&amp;#39;ve ever used our previous &lt;a href="/b/english/posts/tech-tip-using-the-aras-restful-api"&gt;RESTful blog&lt;/a&gt;, you&amp;#39;ll know that we authenticated previously by passing in the username and hashed password into the &lt;strong&gt;AUTHUSER&lt;/strong&gt; and &lt;strong&gt;AUTHPASSWORD&lt;/strong&gt; headers respectively. With the token, we will authenticate using the standard HTTP&amp;nbsp;&lt;strong&gt;Authorization&lt;/strong&gt; header. Token authentication using this header follows the format below.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;Authorization : Bearer {YOUR_TOKEN}&lt;/p&gt;
&lt;p&gt;Note that the word &amp;quot;Bearer&amp;quot; must come before your token in the header. If you&amp;#39;re using Postman, there should be a way to configure authentication differently than other headers which should automatically add in this word for you. Alternatively, depending on the programming language you&amp;#39;re using to perform this request, there may be a special authentication class or library which will automatically add &amp;quot;Bearer&amp;quot; into the header for you as well.&lt;/p&gt;
&lt;p&gt;Regardless, once you have your Authorization header configured,&amp;nbsp;you can follow along with our previous RESTful blog, and you should notice that you can query for all of the same information. You can also confirm that the permission model is still in place by querying for items to which you do not have access.&lt;/p&gt;
&lt;hr /&gt;
&lt;h3&gt;LOOKING FOR MORE ARAS INSPIRATION?&lt;/h3&gt;
&lt;p&gt;Subscribe to our blog and follow&amp;nbsp;&lt;a href="https://twitter.com/araslabs"&gt;@ArasLabs on Twitter&lt;/a&gt;&amp;nbsp;for more helpful content! You can also find our latest open-source projects and sample code on the&amp;nbsp;&lt;a href="https://github.com/ArasLabs"&gt;Aras Labs&amp;nbsp;GitHub&amp;nbsp;page&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Aras REST API - How do you navigate / create a BOM Structure using the REST API?</title><link>https://www.aras.com/community/f/development/35970/aras-rest-api---how-do-you-navigate-create-a-bom-structure-using-the-rest-api</link><pubDate>Wed, 16 Sep 2020 14:52:02 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:9c4fe97a-6c37-431a-84ad-7c568d19db8c</guid><dc:creator>manasbuilds</dc:creator><description>&lt;p&gt;Hello Aras Community Members&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Does the ARAS REST API allow you to navigate the BOM structure, starting with a&amp;nbsp;Part? For example, if I have a BOM structure as shown below, I would like to start with any Part in the structure and navigate down the BOM tree. Can anyone share the REST API endpoint&amp;nbsp;for making this work, or point to a specific section in the&amp;nbsp;API guide?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Part A&lt;/p&gt;
&lt;p&gt;- Part A1&lt;/p&gt;
&lt;p&gt;- Part A2&lt;/p&gt;
&lt;p&gt;--- Part A21&lt;/p&gt;
&lt;p&gt;--- Part A22&lt;/p&gt;
&lt;p&gt;------Part A221&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Second question:&amp;nbsp;Does the REST API allow users to create a BOM structure, e.g. a BOM tree as above?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Third question: Does the REST API allow users to update the BOM structure?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Uploading Files via the Aras Innovator REST API</title><link>https://www.aras.com/community/b/english/posts/uploading-files-via-the-aras-innovator-rest-api</link><pubDate>Tue, 25 Jun 2019 19:30:00 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:326b3e74-cc63-4611-9b65-4bf0abad21c3</guid><dc:creator>Eli Donahue</dc:creator><description>&lt;p&gt;If you&amp;#39;ve been following our previous posts on the Aras Innovator RESTful API, you know just about everything you need to implement your own custom integrations, clients, tools, and mobile applications. You can perform basic &lt;a title="What is CRUD?" href="https://www.codecademy.com/articles/what-is-crud" rel="noopener noreferrer" target="_blank"&gt;CRUD&lt;/a&gt; operations to &lt;a title="Using the Aras RESTful API" href="/b/english/posts/tech-tip-using-the-aras-restful-api" rel="noopener noreferrer" target="_blank"&gt;create and modify Innovator data&lt;/a&gt;, and you can &lt;a title="Token Authentication using Aras Innovator" href="/b/english/posts/token-authentication-using-the-rest-api" rel="noopener noreferrer" target="_blank"&gt;use OAuth tokens to authenticate requests&lt;/a&gt;. All that&amp;#39;s missing is file handling!&lt;/p&gt;
&lt;p&gt;Files behave a little differently than other items in Innovator, so the Aras Innovator RESTful API includes some special actions for uploading files to the vault. In this post, we&amp;#39;ll cover these vault-specific endpoints to show how you can add file uploading to your custom projects.&lt;/p&gt;
&lt;p&gt;As in our previous posts about the RESTful API, we&amp;#39;re using an API development tool to demonstrate the HTTP requests needed to upload files. That way each, the example is language-agnostic and you can follow along without jumping right into code. If you want to follow along with the blog, you can download &lt;a title="Postman homepage" href="https://www.getpostman.com/" rel="noopener noreferrer" target="_blank"&gt;Postman&lt;/a&gt; for free.&lt;/p&gt;
&lt;p&gt;If you want to see how you can use these HTTP requests in code, check out &lt;a title="Uploading Files via the Aras RESTful API" href="https://github.com/ArasLabs/rest-upload-example" rel="noopener noreferrer" target="_blank"&gt;the rest-upload-example project&lt;/a&gt; on the &lt;a title="Aras Labs GitHub page" href="https://github.com/ArasLabs" rel="noopener noreferrer" target="_blank"&gt;Aras Labs GitHub&lt;/a&gt;. The project provides a simple HTML form that allows the user to enter the credentials for an Aras Innovator instance and select a file to upload. The included submitForm() JavaScript function authenticates the user and uploads the file to the specified vault via the HTTP requests covered below.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screenshot of the rest-upload-example community project on GitHub" src="https://github.com/ArasLabs/rest-upload-example/blob/master/Screenshots/screenshot.png?raw=true" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Screenshot of &lt;a title="Uploading Files via the Aras RESTful API" href="https://github.com/ArasLabs/rest-upload-example" rel="noopener noreferrer" target="_blank"&gt;the rest-upload-example community project&lt;/a&gt; on the Aras Labs GitHub&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Authentication&lt;/h2&gt;
&lt;p&gt;We&amp;#39;ll use OAuth to authenticate the HTTP requests in this example, so the first thing we need to do is get a new token from Innovator&amp;#39;s OAuth server. We&amp;#39;ve covered using OAuth tokens with Aras Innovator in &lt;a title="Token Authentication in Aras Innovator" href="/b/english/posts/token-authentication-using-the-rest-api" rel="noopener noreferrer" target="_blank"&gt;a previous blog post&lt;/a&gt;, so I won&amp;#39;t dive into the details here. Basically, you&amp;#39;ll need a POST request with the following information passed in the body:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;grant_type&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;: &amp;quot;password&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;scope&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;: &amp;quot;Innovator&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;client_id&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;: &amp;quot;IOMApp&amp;quot;
&lt;ul&gt;
&lt;li&gt;&amp;quot;IOMApp&amp;quot; is the default client id for new Aras Innovator instances. You can find out how to change it or add a new client id &lt;a title="Register Your App" href="/b/english/posts/token-authentication-using-the-rest-api#register-your-app" rel="noopener noreferrer" target="_blank"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;username&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;: &amp;lt;Innovator User&amp;gt;
&lt;ul&gt;
&lt;li&gt;Any requests made using the returned token will share the same permissions as this user&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;password&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;: &amp;lt;MD5 password hash&amp;gt;
&lt;ul&gt;
&lt;li&gt;The rest-upload-example project demonstrates one way to create the hash from the password string entered by the user. Check out&amp;nbsp;&lt;span class="pl-en"&gt;getConnectionInput&lt;/span&gt;&lt;span&gt;() in &lt;a title="my-upload.js in the rest-upload-example project on GitHub" href="https://github.com/ArasLabs/rest-upload-example/blob/master/Code/js/my-upload.js" rel="noopener noreferrer" target="_blank"&gt;my-upload.js&lt;/a&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;database&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;: &amp;lt;database name&amp;gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you&amp;#39;re using Postman to test or follow along, your request and reply should look something like this:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Postman screenshot showing the token request" border="0" src="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-04/1768.get_2D00_token.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;Request a new OAuth token from the Aras Innovator OAuth server.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;Once you get the request back from the vault server, you can get the token from the JSON object that&amp;#39;s returned. To authenticate our subsequent requests, we just need to include this token in the &amp;quot;Authorization&amp;quot; header.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p style="text-align:left;"&gt;&lt;span style="background-color:transparent;color:#11171a;float:none;font-family:inherit;font-size:inherit;font-weight:400;letter-spacing:normal;line-height:24.64px;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;Note: You could use basic authentication to send these requests, but OAuth tokens are the preferred authentication approach moving forward.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Uploading the File&lt;/h2&gt;
&lt;p&gt;Now that we have our token for authenticating requests, there are just three basic steps to upload a file to Innovator via the RESTful API: get a transaction id, upload the file contents, and commit the transaction.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;1. Begin the Upload Transaction&lt;/h3&gt;
&lt;p&gt;The first step to upload a file to Innovator is to get a transaction id from the vault server. All we need to do to is send a POST request, authenticated with our token, to the vault.BeginTransaction endpoint. The result will be a JSON object with a &amp;quot;transactionId&amp;quot; property.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Postman screenshot showing the call to retrieve a transaction id from the vault server" border="0" src="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-04/0211.start_2D00_transaction.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Get a new transaction id from the vault server with the vault.BeginTransaction endpoint.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;We&amp;#39;ll include the transaction id in all of the calls to upload the file. This string should be unique to each file that you upload. If you need to upload multiple files, you&amp;#39;ll need to request a new transaction id for each. This helps the vault server process each file upload transaction.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="background-color:transparent;color:#000000;float:none;font-family:inherit;font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;Note: Postman does have an &amp;quot;Authorization&amp;quot; tab where you can choose the type of authentication you want to use and enter the token or credentials. That works, but I&amp;#39;ve opted to explicitly define the Authorization header to show how to use the OAuth token without a specific client feature.&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;2. Upload the File&amp;nbsp;&lt;/h3&gt;
&lt;p&gt;Now that we have started a transaction with the vault server, we can start uploading the file. In this example, we&amp;#39;re uploading a small, simple text file to Innovator with a single HTTP request. However, you can also upload a file in &amp;quot;chunks&amp;quot; if you have a large file or network constraints. The &lt;a title="rest-upload-example source code" href="https://github.com/ArasLabs/rest-upload-example/blob/master/Code/js/my-upload.js" rel="noopener noreferrer" target="_blank"&gt;uploadFile() function&lt;/a&gt; in the rest-upload-example community project demonstrates how you can programmatically split your file upload into multiple requests.&lt;/p&gt;
&lt;p&gt;In the screenshot below, you can see we&amp;#39;re passing 5 headers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Content-Disposition:&lt;/strong&gt; attachment; filename*=utf-8&amp;#39;&amp;#39;&amp;lt;filename&amp;gt;
&lt;ul&gt;
&lt;li&gt;If your filename includes spaces or special characters, you&amp;#39;ll need to encode them. Check out &lt;a title="W3Scools url encoding" href="https://www.w3schools.com/tags/ref_urlencode.asp" rel="noopener noreferrer" target="_blank"&gt;this reference&lt;/a&gt; for character codes.&lt;/li&gt;
&lt;li&gt;Be sure to include the two single quotes before the file name (not a single double quote).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Content-Range:&lt;/strong&gt; bytes &amp;lt;start index&amp;gt;-&amp;lt;end index&amp;gt;/&amp;lt;length&amp;gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Content-Type:&lt;/strong&gt; &amp;quot;application/octet-stream&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;transactionid:&lt;/strong&gt; &amp;lt;transaction id from previous step&amp;gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;strong&gt;Authorization:&lt;/strong&gt; Bearer &amp;lt;OAuth token&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you&amp;#39;re uploading a file in a single HTTP request, setting the Content-Range header is pretty simple. The start index will be 0, end index will be length-1, and length will be the file size in bytes. For a 53 byte file, the Content-Range header will be set to &amp;quot;bytes 0-52/53&amp;quot;.&lt;/p&gt;
&lt;p&gt;If you&amp;#39;re uploading a file with multiple HTTP requests, you&amp;#39;ll need to calculate the Content-Range for &lt;em&gt;each&lt;/em&gt; request. If I were uploading the 53 byte file in 10 byte chunks, I would use the chunk&amp;#39;s original start and end index, as well as the file size. For example, the third 10 byte chunk of a 53 byte file would have the Content-Range header &amp;quot;bytes 20-29/53&amp;quot;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;The body of each request should contain the bytes referenced by the Content-Range header. In this case, I&amp;#39;m uploading a whole text file so I can just paste the contents into the body of the Postman request.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Postman screenshot showing the headers for the vault.UploadFile request" border="0" src="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-04/3835.upload_2D00_chunk.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;Upload one or more file chunks using the vault.UploadFile endpoint.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;/i&gt;You&amp;#39;ll notice that the vault.FileUpload request above returned an empty body. This is expected. To check whether the upload succeeded or failed, check the status code that is returned. A 200 status code indicates success. If you&amp;#39;re getting a 40* or 500 error, double check your server credentials and request headers.&lt;/p&gt;
&lt;h3&gt;3. Commit the Upload Transaction&lt;/h3&gt;
&lt;p&gt;Once the contents of the file have been uploaded, we can commit the transaction. Committing the transaction tells the server we&amp;#39;re done uploading file content and the file can be moved from the transaction folder to its final destination in the vault. The file doesn&amp;#39;t exist in the vault until we get a successful response from the commit transaction request.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;The headers of the vault.CommitTransaciton request are pretty straightforward. We&amp;#39;ll use the same transactionid and Authorization headers that we used to upload the file contents, however the Content-Type header will look a little different.&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;strong&gt;Content-Type:&lt;/strong&gt; multipart/mixed; boundary=&amp;lt;boundary string&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;strong&gt;transactionid:&lt;/strong&gt; &amp;lt;transaction id&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;strong&gt;Authorization:&lt;/strong&gt; Bearer &amp;lt;OAuth token&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;We need to define a boundary string to help the vault server parse the contents of the request body. You can use a randomly generated GUID, the item id, etc. Just make sure that the boundary you define in the header and the string you use in the request body match.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Postman screenshot showing the headers of the vault.CommitTransaction request" border="0" src="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-04/3835.commit_2D00_transaction_2D00_headers.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;Headers for the vault.CommitTransaction endpoint&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;The body of the vault.CommitTransaction request is composed of specially formatted text. Here&amp;#39;s the general format:&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffff00;"&gt;&lt;code&gt;--&amp;lt;boundary string&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;br /&gt; &lt;code&gt;Content-Type: application/http&lt;/code&gt;&lt;br /&gt;&lt;br /&gt; &lt;code&gt;POST http://&lt;span style="background-color:#ffff00;"&gt;&amp;lt;server&amp;gt;&lt;/span&gt;/&lt;span style="background-color:#ffff00;"&gt;&amp;lt;web alias&amp;gt;&lt;/span&gt;/Server/odata/File HTTP/1.1&lt;/code&gt;&lt;br /&gt; &lt;code&gt;Content-Type: application/json&lt;/code&gt;&lt;br /&gt;&lt;br /&gt; &lt;code&gt;{&amp;quot;id&amp;quot;:&amp;quot;&lt;span style="background-color:#ffff00;"&gt;&amp;lt;file item id&amp;gt;&lt;/span&gt;&amp;quot;,&amp;quot;filename&amp;quot;:&amp;quot;&lt;span style="background-color:#ffff00;"&gt;&amp;lt;filename&amp;gt;&lt;/span&gt;&amp;quot;,&amp;quot;file_size&amp;quot;:&lt;span style="background-color:#ffff00;"&gt;&amp;lt;total size in bytes&amp;gt;&lt;/span&gt;,&amp;quot;Located&amp;quot;:[{"file_version":1,"related_id":"&lt;span style="background-color: #ffff00;"&gt;&amp;lt;vault id&amp;gt;&lt;/span&gt;"}]}&lt;/code&gt;&lt;br /&gt; &lt;code&gt;&lt;span style="background-color:#ffff00;"&gt;--&amp;lt;boundary string&amp;gt;&lt;/span&gt;--&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;A couple things to note about the body format:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The strings highlighted in yellow will specific to your Innovator instance and the file you&amp;#39;re uploading.&lt;/li&gt;
&lt;li&gt;The &amp;lt;boundary string&amp;gt; parameter should be replaced with the boundary string defined in the request&amp;#39;s Content-Type header.&lt;/li&gt;
&lt;li&gt;The spacing in the body text is very important. All line endings should be carriage returns (\r\n). Depending on how you&amp;#39;re building the request body, you may or may not need to explicitly enter these line ending characters.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img alt="Postman screenshot showing the body of the vault.CommitTransaction request" border="0" src="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-04/6558.commit_2D00_transaction_2D00_body.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;A sample request body and result for vault.CommitTransaction&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;/i&gt;A successful request will return a 200 status code and some body text about the new File item. You can parse the body text to get the JSON object and access the item&amp;#39;s properties.&lt;/p&gt;
&lt;h2&gt;Confirming the Upload&lt;/h2&gt;
&lt;p&gt;The commit request will return some metadata about the new File item, but you can perform a GET request if you want to get specific metadata. The screenshot below shows how to request a File item from Innovator, just like any other ItemType. You can also retrieve the contents of a file by adding &amp;quot;/$value&amp;quot; to the end of the request url.&lt;/p&gt;
&lt;h2&gt;&lt;img alt="Postman screenshot showing how to get the file we just uploaded" border="0" src="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-04/6558.confirm_2D00_file_2D00_upload.png" /&gt;&lt;/h2&gt;
&lt;p&gt;&lt;i&gt;GET request to retrieve a File item from the Innovator server&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;i&gt;&lt;span style="background-color:transparent;color:#000000;float:none;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;Now you can include file uploading in your custom projects that use the Aras Innovator RESTful API! What are you going to try first? Share your ideas and questions in the comments below.&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3&gt;Looking for more Aras inspiration?&lt;/h3&gt;
&lt;p&gt;Subscribe to our blog and follow&amp;nbsp;&lt;a href="https://twitter.com/araslabs"&gt;@ArasLabs on Twitter&lt;/a&gt;&amp;nbsp;for more helpful content! You can also find our latest open-source projects and sample code on the&amp;nbsp;&lt;a href="https://github.com/ArasLabs"&gt;Aras Labs&amp;nbsp;GitHub&amp;nbsp;page&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>My web Asp.net  login failed</title><link>https://www.aras.com/community/f/development/35751/my-web-asp-net-login-failed</link><pubDate>Mon, 06 Jul 2020 08:21:34 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:9fb5c4c0-ff91-4a12-bb9c-7a34a7204b8b</guid><dc:creator>DucTran</dc:creator><description>&lt;p&gt;Hi everyone,&lt;/p&gt;
&lt;p&gt;I have to make a web with ASP.NET and published to host &lt;a href="http://inn.ddns.com/myweb"&gt;http://inn.ddns.com/myweb&lt;/a&gt;. The web accessed normally.&lt;/p&gt;
&lt;p&gt;The login form has:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Server address: &lt;a href="http://inn.ddns.com/myaras"&gt;http://inn.ddns.com/myaras&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;database: INN-TEST&lt;/li&gt;
&lt;li&gt;username: admin&lt;/li&gt;
&lt;li&gt;password: innovator&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;--&amp;gt; When a press login button, nothing happen (no alert failed or succeed, no error string)&lt;/p&gt;
&lt;p&gt;If I replaced server address by local name (http://inn-srv/myaras), It working fine.&lt;/p&gt;
&lt;p&gt;I try to config IIS server, open port, .. but not succeed. Pls help me.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>