Get File Datasource By Id Request (.csv)

Modified on Mon, 12 May at 6:32 PM

Description: 

This API will return file data source by ID. 

 

API Endpoint: 

/ws/DatasetManagementService

 

Method: 

POST

 

Header: 

 

Field

Value

SOAPAction

/ws/datasetManagement.wsdl

 

Request:

 

XML Element

Type

Value

<wsse:Username>

String

Smarten username

<wsse:Password>

String

Smarten user password

 <dat:datasourceId>

String

Smarten source id, you can access it from Smarten Menu – Data – datasource


Request Example: 


<soapenv:Envelope xmlns:dat="http://www.elegantjbi.com/ws/DatasetManagement" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

   <soapenv:Header>

      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">

         <wsse:UsernameToken wsu:Id="UsernameToken-123">

            <wsse:Username>username</wsse:Username>

            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>

         </wsse:UsernameToken>

      </wsse:Security>

   </soapenv:Header>

   <soapenv:Body>

      <dat:getFileDatasourceByIdRequest>

         <dat:datasourceId>sourceId</dat:datasourceId>

      </dat:getFileDatasourceByIdRequest>

   </soapenv:Body>

</soapenv:Envelope>

 

Response:  

 

Return a response with SOAP XML as object. 

 

XML Element 

Type

Value

<ns2:statusCode>

String

Return the API status response

<ns2:id>

String

Source ID

<ns2:name>

String

Source Name

<ns2:CSVUrl>

String

Server path where files are stored

<ns2:fileFrom>

String

File from where to fetch

<ns2:fileType>

String

Type of the file

<ns2:folderName>

String

Folder Name

 

Response Example:

 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

    <SOAP-ENV:Header>

        <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" SOAP-ENV:mustUnderstand="1">

            <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="XWSSGID-17464338327831794682812">

                <wsse:Username>user</wsse:Username>

                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">y9mo/zSTTf39Ad1AaANtye91kMg=</wsse:Password>

                <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">Az9gGVqdcY0O6MdnDxxC8uwo</wsse:Nonce>

                <wsu:Created>2025-05-06T10:28:48.288Z</wsu:Created>

            </wsse:UsernameToken>

        </wsse:Security>

    </SOAP-ENV:Header>

    <SOAP-ENV:Body>

        <ns2:getFileDatasourceByIdResponse xmlns:ns2="http://www.elegantjbi.com/ws/DatasetManagement">

            <ns2:status>

                <ns2:statusCode>Success</ns2:statusCode>

            </ns2:status>

            <ns2:csvInfo>

                <ns2:id>id</ns2:id>

                <ns2:name>Data Source Name</ns2:name>

                <ns2:desc/>

                <ns2:CSVUrl>serverpath/*</ns2:CSVUrl>

                <ns2:firstRowAsColumn>true</ns2:firstRowAsColumn>

                <ns2:rowSeparator></ns2:rowSeparator>

                <ns2:columnSeparator/>

                <ns2:textQualifier/>

                <ns2:fileFrom>File From</ns2:fileFrom>

                <ns2:fileType>File Type</ns2:fileType>

                <ns2:folderName>Folder Name/ns2:folderName>

                <ns2:rowTag/>

                <ns2:multiLine>false</ns2:multiLine>

                <ns2:sampleRatio>0</ns2:sampleRatio>

                <ns2:filesValidate>false</ns2:filesValidate>

            </ns2:csvInfo>

        </ns2:getFileDatasourceByIdResponse>

    </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

Postman Example: 

 

You can import the example below into Postman. 

 

curl --location 'https://SmartenURL.com/smarten/ws/DatasetManagementService' \

--data '<soapenv:Envelope xmlns:dat="http://www.elegantjbi.com/ws/DatasetManagement" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

   <soapenv:Header>

      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">

         <wsse:UsernameToken wsu:Id="UsernameToken-123">

            <wsse:Username>username</wsse:Username>

            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>       

         </wsse:UsernameToken>

      </wsse:Security>

   </soapenv:Header>

   <soapenv:Body>

      <dat:getFileDatasourceByIdRequest>

         <dat:datasourceId>Data source Id</dat:datasourceId>

      </dat:getFileDatasourceByIdRequest>

   </soapenv:Body>

</soapenv:Envelope>'


Tags: Datasource, Manual Dataset, Update Datasets,

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article