Extension management endpoints

Important

Extensions require Helix Core Server 2021.2 or later. If you are using an earlier version of Helix Server, you must use triggers and not extensions.

This section details the Helix Search extension endpoints. These endpoints enable you to install, list, and delete extensions for Helix Search.

Helix Search Perforce extensions:

  • helix-core-search-asset.p4-extension indexes your assets.

  • helix-core-search-indexer.p4-extension indexes your changes.

  • helix-core-search-obliterate.p4-extension removes obliterated files from the index:

For more information on extensions, see Helix Core Extensions Developer Guide.

List installed extensions

Description

GET http://localhost:1601/api/v1.2/install/extensions

Lists the extensions installed for Helix Search.

Authentication

Supports basic authentication and bearer token authentication, see API authentication.

Usage example

List the extensions installed for Helix Search:

curl -H "Authorization: Bearer <auth_token>" http://localhost:1601/api/v1.2/install/extensions

Helix Search responds with:

{
  "status": {
    "code": 200,
    "message": "OK"
  },
  "data": [
    {
      "namespace": "Perforce",
      "extension": "helix-core-asset",
      "rev": "1",
      "uuid": "e15c3528-4095-11ec-9680-932b378ce221"
    },
    {
      "namespace": "Perforce",
      "extension": "helix-core-indexer",
      "rev": "1",
      "uuid": "e170f0da-4095-11ec-816b-0fd9b55be6a1"
    },
    {
      "namespace": "Perforce",
      "extension": "helix-core-indexer",
      "rev": "1",
      "uuid": "e170f0da-4095-11ec-816b-0fd9b55be6a1"
    }
  [
}    

List available extensions

Description

GET http://localhost:1601/api/v1.2/install/extensions/available

Lists the extensions available for Helix Search in <p4search-installation>/lib directory.

Authentication

Supports basic authentication and bearer token authentication, see API authentication.

Usage example

List the extensions available for Helix Search.

curl -H "Authorization: Bearer <auth_token>" http://localhost:1601/api/v1.2/install/extensions/available

Helix Search responds with:

{
 "status": {
 "code": 200,
 "message": "OK"
},
"data": [
  "helix-core-search-asset.p4-extension",
  "helix-core-search-indexer.p4-extension",
  "helix-core-search-obliterate.p4-extension"
  ]
}

Install extensions from Helix Search web UI

Note

The Perforce extensions are signed, if you edit them they cannot then be installed using the Helix Search install endpoint.

Description

GET http://localhost:1601/api/v1.2/install/extension/<extension-to-install>

Installs extensions that are packaged with Helix Search in <p4search-installation>/lib directory.

Authentication

Supports basic authentication and bearer token authentication, see API authentication.

Usage example

Install the Indexer extension from Helix Search:

curl -H "Authorization: Bearer <auth_token>" http://localhost:1601/api/v1.2/install/extension/helix-core-search-indexer.p4-extension

Helix Search responds with:

{
 "status": {
 "code": 200,
 "message": "OK"
}
}

Install extensions using POST request

Note

The Perforce extensions are signed, if you edit them they cannot then be installed using the Helix Search install endpoint.

Description

POST http://localhost:1601/api/v1.2/install/extension/<extension-to-install>

Installs an extension for Helix Search.

Authentication

Supports basic authentication and bearer token authentication, see API authentication.

Usage example

To fetch and install the Perforce indexer extension:

  1. Fetch the extension package from the Perforce FTP site:

  2. https://ftp.perforce.com/perforce/r21.4/bin.noarch/

    Where r21.4 is your Helix Search version.

  3. Save the file to your local machine.

  4. Install the Indexer extension:

  5. curl -F "data=@<local_folder>\helix-core-search-indexer.p4-extension" -H "Authorization: Bearer <auth_token>" http://localhost:1601/api/v1.2/install/extension/helix-core-search-indexer.p4-extension

  6. Helix Search responds with:

    {
      "status": {
        "code": 200,
        "message": "OK"
      }
    }    

Delete extension

Description

DELETE http://localhost:1601/api/v1.2/install/extension/Perforce/<extension-to-delete>

Deletes an extension from Helix Search.

Authentication

Supports basic authentication and bearer token authentication, see API authentication.

Usage example

Delete the Indexer extension from Helix Search:

curl -X DELETE -H "Authorization: Bearer <auth_token>" http://localhost:1601/api/v1.2/install/extension/Perforce/helix-core-search-indexer

Helix Search responds with:

{
  "status": {
    "code": 200,
    "message": "OK"
  }
}