Update a Library in a Project
post
/ic/api/integration/v1/projects/{projectId}/libraries/{id}/archive
Replaces the existing jar or js file of a library in a project.
Request
Path Parameters
-
id(required): string
Library identifier. The id must be added to the request in the following form: code%7Cversion. For example: JSLIB%7C01.00.0000. The %7C is the encoded | (vertical line).
-
projectId(required): string
Project identifier
Query Parameters
-
integrationInstance(required): string
This is the name of the service instance. You can get this value from the About page where it is specified in the Service instance field.
Supported Media Types
- multipart/form-data
Response
Supported Media Types
- application/json; charset=utf-8
200 Response
Successful operation
Root Schema : LibraryRs
Type:
Show Source
object
-
has-more: boolean
Flag to Check if More Records Exists
-
items: array
items
List of Libraries
-
limit: integer
(int32)
Limit of Records to be Displayed
-
total-results: integer
(int32)
Total Results
Nested Schema : LibraryTypeRs
Type:
Show Source
object
-
callout-type: string
Callout Type
-
code: string
Library Code
-
created-by: string
Library Created By
-
created-date: string
(date-time)
Library Created Date
-
description: string
Library Description
-
display-name: string
Library Name
-
id: string
Library Identifier
-
last-updated-by: string
Library Last Updated By
-
last-updated-date: string
(date-time)
Library Last Updated Date
-
library-type: string
Library Type
-
locked-by: string
Locked By
-
locked-date: string
(date-time)
Locked Date
-
locked-flag: boolean
Locked Flag
-
project-id: string
-
status: string
Library Status
-
usage: integer
(int32)
Library Usage
-
version: string
Library Version
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
Examples
The following example shows how to replace jar/js file of a 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: Update a Library in the project TEST_PROJECT
This example replaces the js file for the library JSLIB|01.00.0000. The id is code%7Cversion and the %7C is the encoded | (vertical line).
curl -X POST -H 'Authorization: Bearer access_token' -H "Content-Type:multipart/form-data" -F "file=@concat.js" https://design.integration.region.ocp.oraclecloud.com/ic/api/integration/v1/projects/TEST_PROJECT/libraries/JSLIB%7C01.00.0000/archive?integrationInstance=service-instance