Import(Register) a Library
post
/ic/api/integration/v1/libraries/archive
Imports an API library jar file. 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
Supported Media Types
- multipart/form-data
Form Parameters
-
code(required): string
library identifier
-
description: string
library description
-
file(required): file
library artifact file content
-
name(required): string
library name
-
type(required): string
library type
-
version(required): string
library version
Response
Supported Media Types
- application/json; charset=utf-8
204 Response
Successful operation, no content sent, the Location header provides the newly created library uri
400 Response
Malformed request parameters
409 Response
Library already exists
500 Response
Server error
Examples
The following example shows how to import a JavaScript library 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
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://integration.us.oraclecloud.com/ic/api/integration/v1/libraries/archive