Extract Zip File Using a Job

post

/essbase/rest/v1/files/actions/extractJob

Extract a zip file on the current Essbase catalog, using a system job. Supported for applications, users and shared folders.

This endpoint is similar to Extract Zip File, except it initiates a system job you can monitor using Get Job List. Use this endpoint if you experience failures with Extract Zip File.

Request

Supported Media Types
Query Parameters
Body ()

Zip file path details.

Root Schema : ZipFileDetails
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

OK

The zip file extractor job is submitted successfully.

400 Response

Bad Request

The submission of zip file extractor job failed.

500 Response

Internal Server Error.

Back to Top

Examples

The following examples show how to upload a zip file to the Essbase file catalog, and extract its contents using a job.

This example uses cURL to access the REST API from a Windows shell script. The calling user's ID and password are variables whose values are set in properties.bat.

cURL Command to Upload a Zip

The following cURL command uploads the zip file to the shared directory on the Essbase file catalog.

call properties.bat
curl -X PUT "https://myserver.example.com:9001/essbase/rest/v1/files/shared/datafiles.zip?overwrite=true" -H "accept: application/json" -H "Content-Type:application/octet-stream" --data-binary @datafiles.zip -u %User%:%Password%

Response Body after Uploading a Zip

The response includes a link to download.

[ {
  "rel" : "download",
  "href" : "https://myserver.example.com:9001/essbase/rest/v1/files/shared/datafiles.zip",
  "method" : "GET",
  "type" : "application/octet-stream"
} ]

cURL Command to Extract a Zip using a Job

The following cURL command extracts the zip file in the shared directory on the Essbase file catalog.

call properties.bat
curl -X POST https://myserver.example.com:9001/essbase/rest/v1/files/actions/extractJob -H "accept:application/json" -H "Content-Type:application/json" --data-binary "@./sharedpath.json" -u %User%:%Password%

The input payload file, sharedpath.json, has the following contents.

{ 
  "path" : "/shared/datafiles.zip"
}

Response Body

The response is a message with the job number.

{
  "message" : "Job 198 is initiated to extract zip file datafiles.zip"
}
Back to Top