{{getMsg('Help_YouAreHere')}}:
/
{{page.title}}
{{page.title}}
{{$root.getMsg("downLoadHelpAsPdf")}}
{{helpModel.downloadHelpPdfDataStatus}}
Import
Import additional datasources into the system. The import command requires one or more datasource XML files to be sent to the server.
The XML files can be created using the export command or a backup.
POST /import
Send one or more datasource xml files to the system. The response is a JSON list of created GUIDs.
Example Request
# Request # Use user:password for authorization POST /api/datasources/import HTTP/1.1 Authorization: Bearer VGhpcyBpcyBqdXN0IGEgZGVtbyBhY2Nlc3MgdG9rZW4u Content-Type: multipart/form-data; boundary=X-INET-DATA-BOUNDARY Content-Length: <DATASOURCE XML LENGTH> <DATASOURCE XML DATA> # Response - a list of datasources in JSON HTTP/1.1 200 OK Content-Type: application/json Content-Length: <LENGTH> ["54pf8k4vg9irq0fpq1b43r1n9","64jywgzobqsdode1e5fkz8ks9"]
Application Example
# Shell access using curl # Post as form data curl -LsH "Authorization: Bearer <access_token>" -X POST --form @datasource.xml "http://127.0.0.1:9000/api/datasources/import" # Post as form data using username and password curl -Lsu username:password -X POST --form @datasource.xml "http://127.0.0.1:9000/api/datasources/import" # Post as binary data curl -LsH "Authorization: Bearer <access_token>" -X POST --header "Content-Type:application/xml" --data-binary @datasource.xml "http://127.0.0.1:9000/api/datasources/import" # Post as binary data using username and password curl -Lsu username:password -X POST --header "Content-Type:application/xml" --data-binary @datasource.xml "http://127.0.0.1:9000/api/datasources/import"
