• Will Fawcett
  • NEWBIE
  • 0 Points
  • Member since 2015
  • Software Engineer 2
  • CHG Healthcare

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi,

I have created a custom api -
url mapping -> urlMapping='/api/customObjectName/*'

I can call this API and get result when i call it from POSTMAN as a SEPARATE request , however when i am calling this API as a "Subrequest" of Composite API from postman , i am getting below error :
services/apexrest/api/myCustomObject/a1E180000015rw5XXX' is not a valid url.

my composite API request is as below :
URL : https://xyz.salesforce.com/services/data/v44.0/composite
HTTP Method : POST
Body : 
{
  "allOrNone": true,
  "compositeRequest": [
    {
      "method": "GET",
      "url": "/services/data/v44.0/sobjects/Order/80118000000LUCmXXX",
      "referenceId": "OrderRef"
    }, 
    
  
    {
      "method": "GET",
      "url": "services/apexrest/api/myCustomObject/a1E180000015rw5XXX",
      "referenceId": "customObjRef"
        
    }
   
  ]
}


Response :
{
            "body": [
                {
                    "errorCode": "PROCESSING_HALTED",
                    "message": "'services/apexrest/api/myCustomObject/a1E180000015rw5XXX' is not a valid url"
                }
            ],
            "httpHeaders": {},
            "httpStatusCode": 400,
            "referenceId": "customObjRef"
        }