When specifying a clientName with a space in a catalog/images API call, an error is returned.

When specifying a clientName with a space in a catalog/images API call, an error is returned.

  • Article ID:100043524
  • Last Published:
  • Product(s):NetBackup

Problem

When specifying  filter of clientName in a catalog/images API call if the client name contains a space an error will occur. The following is an example of the URL

https://nbumaster.example.com:1556/netbackup/catalog/images?filter=clientName eq 'test space'

Error Message

When using the client name of 'test space' the following error will occur:

Raised exception  - com.netbackup.catalog.images.exception.FilterFormatException: [invalid logical operator: space]     at com.netbackup.catalog.images.util.OdataFilterUtils.validateOdataLogicalOperator(OdataFilterUtils.java:120)

The invalid logical operator will b what comes after the space in the name.

Cause

The space needs to be encoded to be properly seen by teh API.

Solution

Substitute %20 for the space in the client name when making the call. The caller must also use the proper encoding or errors could still occur. This can be tested by substituting %2520 rather than %20 for the space.

Was this content helpful?