Retrieve Libraries in a Project

get

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

Retrieves information about all the libraries in a project ordered by the last updated time.

Request

Path Parameters
Query Parameters
  • 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.
  • Use with the offset parameter for paginating through the returned results. The limit is the maximum number of items to return at one time. For example, offset=3&limit=16 indicates to list libraries starting at the 4th item, and the list will contain 16 items.
  • Use with the limit parameter for paginating through the returned results. The offset is the starting point from which to return records. For example, offset=3&limit=16 indicates to list libraries starting at the 4th item, and the list will contain 16 items.
  • Lists libraries ordered by name or last updated time.

    Valid value:

    • name: Order libraries by library name. Example: orderBy=name.
    • time: Order libraries by the last updated time. Example: orderBy=time.
  • Filters libraries by name and type.

    Valid parameters:

    • name: Name of the the library. Supports contains only. For example:
      • To retrieve all libraries that contain the specified string in the library name, specify:
        q={name: /library/}
    • type: Type of the library. Valid values: preinstalled, private.

      For example, to retrieve all libraries that contain the string myLibrary and have the status preinstalled, specify:

      q={name : /myLibrary/, type : 'preinstalled'}

There's no request body for this operation.

Back to Top

Response

Supported Media Types

200 Response

Successful operation
Body ()
Root Schema : LibraryRs
Type: object
Show Source
Nested Schema : items
Type: array
List of Libraries
Show Source
Nested Schema : LibraryTypeRs
Type: object
Show Source

400 Response

Malformed parameters

500 Response

Server error
Back to Top

Examples

The following example shows how to retrieve details about API libraries in a project by submitting a GET 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: Get only JavaScript libraries that contain myLibrary, mylibrary, or MYLIBRARY in the name and have the type preinstalled

curl -G -X GET -H 'Authorization: Bearer access_token' -H "Accept:application/json" --data-urlencode "q={name: /myLibrary/, type: 'preinstalled'}" https://design.integration.region.ocp.oraclecloud.com/ic/api/integration/v1/projects/TEST_PROJECT/libraries?integrationInstance=service-instance

Example: Paginate through returned libraries

Pagination is done with limit and offset. In this example, we list libraries starting at the fourth item. The list contains 16 items.

curl -G -X GET -H 'Authorization: Bearer access_token' -H "Accept:application/json" -d "offset=3&limit=16" https://design.integration.region.ocp.oraclecloud.com/ic/api/integration/v1/projects/TEST_PROJECT/libraries?integrationInstance=service-instance

Example: Get libraries ordered by the library name in alphabetical order

curl -G -X GET -H 'Authorization: Bearer access_token' -H
      "Accept:application/json" -d "orderBy=name"
      https://design.integration.region.ocp.oraclecloud.com/ic/api/integration/v1/projects/TEST_PROJECT/libraries?integrationInstance=service-instance

Example: Combine parameters to retrieve libraries containing the text myLibrary in the name and paginate through the results

To combine query parameters, use q with the --data-urlencode option. The other parameters can be added after the -d option.

curl -G -X GET -H 'Authorization: Bearer access_token' -H "Accept:application/json"
      --data-urlencode "q={name: /myLibrary/, type: 'private'}" -d
      "orderBy=name&offset=12&limit=5"
      https://design.integration.region.ocp.oraclecloud.com/ic/api/integration/v1/projects/TEST_PROJECT/libraries?integrationInstance=service-instance

Example: Get all JavaScript libraries ordered by the last updated time in the project TEST_PROJECT

curl -X GET -H 'Authorization: Bearer access_token' -H "Accept:application/json"
      https://design.integration.region.ocp.oraclecloud.com/ic/api/integration/v1/projects/TEST_PROJECT/libraries?integrationInstance=service-instance
Back to Top