HOPEX Power Studio (EN) : Using APIs : HOPEX Web Service API : Object Import
   
Object Import
 
Import request
Import job progress request
Import job rejects file
Import request
± http POST {REPOSITORYBASEURL}/import?{parameters}
Authorization: ...
………… multipart content ……………
 
Where {parameters}:
- validate
o indicates when the import changes are flushed (for more information, see HOPEX Administration (Web) - Importing a command file in HOPEX)
o type :
- string
- one of the following values:
Never
Standard
AtEnd
AtEndOnSuccess
o optional (default : standard)
 
File content :
use multipart protocol to upload file content
only one file can be uploaded in one request
Response:
HTTP/1.1 202 Accepted
Location: /import/job/<job_id>
 
{"job_id": "<job_id>"}
 
Import job progress request
± http GET {REPOSITORYBASEURL}/import/job/<job_id>
Authorization: ...
 
The following responses are possible:
Response 1 (in progress)
HTTP/1.1 202 Accepted
 
{ "job_status": "RUNNING", "job_info": null}
Response 2 (done without rejects)
HTTP/1.1 202 Accepted
 
{"job_status": "TERMINATED", "job_info": { "reason": "DONE", "rejects": false }}
 
Response 3 (done with rejects)
HTTP/1.1 202 Accepted
 
{"job_status": "TERMINATED", "job_info": { "reason": "DONE", "rejects": true, "rejects_file_name": "<rejects_filename>" }}
Import job rejects file
Available if job is DONE and there are rejects.
± http GET {REPOSITORYBASEURL}/export/job/<job_id>/rejects
Authorization: ...
 
Response:
HTTP/1.1 202 Accepted
 
………… rejects file content ……………