Skip to main content

POST /files/stgupdates/repository/import/SELF?jobid={job_id}

Use this method to import a management-server update to the updates repository. Only the user that created the job has the permission to import the update using the job ID that was returned from that method.

Before you can import an update, you must first create an import job using the POST /files/stgupdates/repository/import/validate/SELF method.

You can monitor the status of the import request using the GET /tasks/{job_list} method.

Authentication

Authentication with username and password is required.

Request URL

POST https://{management_server_IP}/files/stgupdates/repository/import/SELF?jobid={job_id}

Query parameters

ParametersRequired / OptionalDescription
jobid={job_id}RequiredID of the job that was created to import images using the last POST /files/stgupdates/repository/import/validate/SELF method
The following example imports a management-server update using job ID 1.
POST https://192.0.2.0/files/stgupdates/repository/import/SELF?jobid=1

Request body

Use the "multipart/form-data" media type to import the update package. Use the attributes in the following table as the multipart name in the body. For more information about the multipart/form-data media type, see Returning Values from Forms: multipart/form-data webpage.

AttributesRequired / OptionalTypeDescription
fileSizeOptionalStringSize of the update file to be imported (in bytes)
uploadedfileRequiredObjectInformation about the image being imported
 fileNameRequiredStringName of the update file

The following example imports a management-server update.

HTTP Header
Content-Type: multipart/form-data; boundary=AaB03x
Request body
--AaB03x
Content-Disposition: form-data; name="uploadedfiles[]";
filename="lnvgy_sw_lxca_serverrepo2-1.1.1_anyos_noarch.chg"
Content-Type: application/octet-stream

--AaB03x
Content-Disposition: form-data; name="uploadedfiles[]";
filename="lnvgy_sw_lxca_serverrepo2-1.1.1_anyos_noarch.tgz"
Content-Type: application/x-compressed

--AaB03x
Content-Disposition: form-data; name="uploadedfiles[]";
filename="lnvgy_sw_lxca_serverrepo2-1.1.1_anyos_noarch.txt"
Content-Type: text/plain

--AaB03x
Content-Disposition: form-data; name="uploadedfiles[]";
filename="lnvgy_sw_lxca_serverrepo2-1.1.1_anyos_noarch.xml"
Content-Type: text/xml

--AaB03x--

Response codes

CodeDescriptionComments
200OKThe request completed successfully.
409ConflictThere is a conflict with the current state of the resource. A descriptive error message is returned in the response body.
500Internal Server ErrorAn internal error occurred. A descriptive error message is returned in the response body.

Response body

AttributesTypeDescription
currentString 
downloadednumInteger 
downloadedsizeInteger 
progressIntegerJob progress, where 100 is complete, and less than 100 is in progress
stateStringThis can be one of the following values.
  • success. The request completed successfully.
  • failure. The request failed. A descriptive error message is returned.
totalInteger 
totalsizeInteger 
updatesArray 
errorMsgArrayInformation about one or more messages
 resultStringResults of the request. This can be one of the following values.
  • success. The request completed successfully.
  • failure. The request failed. A descriptive error message is returned.
  • informational.
 messagesArrayInformation about one or more messages
  idStringMessage identifier of a returned message
  textStringMessage text that is associated with the message identifier
The following example is returned if the request is successful.
{
"current": "",
"downloadednum": 0
"downloadedsize": 0,
"progress": 0,
"state": "success",
"total": 0,
"totalsize": 0,
"updates": [],
"errorMsg": {
"result": "informational",
"messages": [{
"id": "FQXHMUP2500I",
"text": "Repository operation completed successfully."
}]
}
}