Returns only the headers that are returned by sending a GET request to the sObject
Rows by External ID resource. This gives you a chance to see returned header values of the
GET request before retrieving the content itself.
For security reasons, some Top Level Domains (TLD) may conflict with certain file
format extensions. Adjust your implementation to work around such cases. For example,
when an email address is used as the External ID in the request URL, and the TLD ".inc"
is used as part of the field value, the request returns a “404 not found” error.
For
example,
returns
a “404 not found” error.
1curl https://MyDomainName.my.salesforce.com/services/data/v55.0/sobjects/Lead/Email/example@email.inc -H "Authorization: Bearer token" -X HEAD
Workarounds:
- Use a different External ID field.
- Create a new External ID field that is the same as the email field and
replace the "." with an "_" to handle this case.
- Run a query for emails ending in ".inc" to retrieve the record ID and use
that for the upsert.
- Use SOAP API instead of REST API for upsert operations.
- Accept the email as a query parameter instead of a path parameter by
creating a custom Apex REST API. Use Apex to perform the upsert
operation.
- URI
- /services/data/vXX.X/sobjects/sObjectName/fieldName/fieldValue
- Formats
- JSON, XML
- HTTP Method
- HEAD
- Authentication
- Authorization: Bearer
token
- Parameters
- None