Import (Register) a Library in a Project

post

/ic/api/integration/v1/projects/{projectId}/libraries/archive

Imports an API library jar file in a project. If you are using cURL, use the -F option to specify the file to import. The request must contain the following attributes added with the -F option: name, code, version, type, and file. Description is optional.

Request

Path Parameters
Query Parameters
Supported Media Types
Request Body - multipart/form-data ()
Root Schema : schema
Type: object
Show Source
Back to Top

Response

Supported Media Types

204 Response

Successful operation, no content sent, the Location header provides the newly created library uri

400 Response

Malformed parameters

409 Response

Library already exists

500 Response

Server error
Back to Top

Examples

The following example shows how to import a JavaScript library in a project by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL. For more information about endpoint URL structure, see Send Requests.

Example: Import a Library in the project TEST_PROJECT

This command imports a JavaScript API Library. The request must contain the following attributes specified with the -F option: name, code, version, type and file. Description is optional.

curl -X POST -H 'Authorization: Bearer access_token' -H "Content-Type:multipart/form-data"
      -F "name=JSFILE_NAME" -F "code=JS_CODE"  -F "version=01.00.0000" -F
      "description=JavaScript library description" -F "type=API" -F
      "file=@JSFILE_01.00.0000.jar" https://design.integration.region.ocp.oraclecloud.com/ic/api/integration/v1/projects/TEST_PROJECT/libraries/archive?integrationInstance=service-instance
Back to Top