Loading

×Sorry to interrupt
This page has an error. You might just need to refresh it.
[NoErrorObjectAvailable] Uncaught ReferenceError: addCTracking is not defined
Failing descriptor: {markup://c:KM_ArticleThemeLayout}

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

My Subscriptions

Loading

Knowledge Base

400 bad request error when attempting to delete machine prefix via api (71344)

Last Updated: 8/21/2019Categories: TroubleshootingTotal Views: 12784Language:
Chinese (Simplified)JapaneseEnglish

Subscribe to get an email
newsletter with new updates

Please provide article feedback:

Symptoms

Deleting a machine prefix via rest api fails with a 400 bad request error.

The /var/log/vmware/vcac/catalina.out logfile displays an error similar to:

[UTC:2019-08-16 12:44:19,913 Local:2019-08-16 12:44:19,913] vcac: [component="cafe:iaas-proxy" priority="ERROR" thread="tomcat-http--7" tenant="vsphere.local" context="CFSxB0Yz" parent="" token="CFSxB0Yz"] c
om.vmware.vcac.platform.service.rest.resolver.ApplicationExceptionHandler.handleUnexpectedException:872 - HTTP/1.1 400 Bad Request : Syntax error at position 28 in 'HostnamePrefixID eq 118714cc-7ec5-4ed5-b14f-88521bbb3248'.Syntax error at position 28 in 'HostnamePrefixID eq 118714cc-7ec5-4ed5-b14f-88521bbb3248'.Microsoft.Data.OData.ODataException at Microsoft.Data.OData.Query.ExpressionLexer.ValidateToken(ExpressionTokenKind t)
at Microsoft.Data.OData.Query.UriQueryExpressionParser.ParseFilter(String filter)
at Microsoft.Data.OData.Query.ODataUriParser.ParseFilterImpl
ementation(String filter, IEdmType elementType, IEdmEntitySet entitySet)
at System.Data.Services.Parsing.RequestExpressionParser.ParseFilter()
org.odata4j.exceptions.BadRequestException: HTTP/1.1 400 Bad Request : Syntax error at position 28 in 'HostnamePrefixID eq 118714cc-7ec5-4ed5-b14f-88521bbb3248'.Syntax error at position 28 in 'HostnamePrefixID eq 118714
cc-7ec5-4ed5-b14f-88521bbb3248'.Microsoft.Data.OData.ODataException at Microsoft.Data.OData.Query.ExpressionLexer.ValidateToken(ExpressionTokenKind t)
at Microsoft.Data.OData.Query.UriQueryExpressionParser.ParseFilter(String filter)
at Microsoft.Data.OData.Query.ODataUriParser.ParseFilterImplementation(String filter, IEdmType elementType, IEdmEntitySet
entitySet)

Cause

The code should convert the machine prefix ID to a GUID before being passed to IaaS, but that does not happen, and thus we get the OData error. We perform that conversion in other API calls, so this is an inconsistency the API.

Resolution

To resolve the issue the ID part of the request can be wrapped in the OData guid syntax of guid'dddddddd-dddd-dddd-dddd-dddddddddddd'

For example, this query will allow the delete to execute successfully:

/iaas-proxy-provider/api/machine-prefixes/guid'A88983A0-45E4-4962-A12A-C01D3F627E59'

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
Chinese (Simplified)JapaneseEnglish

Attachments

Additional Resources

KB
•
对文件 /opt/vmware/vcloud-director/data/transfer 解压存档失败：cpio：chown (71340)

KB
•
使用 Cohesity 保护 vCloud Director 环境 (71326)

KB
•
新しいプロバイダ VDC を作成するときに、ストレージ ポリシーが表示されない (71321)

KB
•
Usage Meter 无法完成 vROPS 配置 (71305)

Results 1-4 of 4

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware Aria Automation

Related Versions:

VMware vRealize Automation 7.x

Take Our Survey

Support Assistant