You need to sign in to do that
Don't have an account?
Dippan Patel
This gives response:
Request:
|System.HttpRequest[Endpoint=https://na70-api.salesforce.com/services/data/v34.0/sobjects/Account/describe/layouts/01280000000HmSj, Method=GET]
Response:
System.HttpResponse[Status=Service Unavailable, StatusCode=503]
I also checked https://status.salesforce.com/instances/NAX/maintenances and looks all good.
Can anybody help me figure out why is this occurring for a particular instance only?
API call to salesforce gives error 503 for a particular instance
string server = null; String host = URL.getSalesforceBaseUrl().getHost(); if(host.split('\\.')[2] == 'visual'){ server = host.split('\\.')[1]; } HttpRequest req = new HttpRequest(); req.setMethod('GET'); req.setEndpoint('https://' + server + '-api.salesforce.com/services/data/v34.0/sobjects/' + objName + '/describe/layouts/' + recordTypeId); req.setHeader('Authorization', 'OAuth ' + UserInfo.getSessionId()); req.setHeader('Sforce-Call-Options', 'client=x'); Http http = new Http(); HTTPResponse res; res = http.send(req);
This gives response:
Request:
|System.HttpRequest[Endpoint=https://na70-api.salesforce.com/services/data/v34.0/sobjects/Account/describe/layouts/01280000000HmSj, Method=GET]
Response:
System.HttpResponse[Status=Service Unavailable, StatusCode=503]
I also checked https://status.salesforce.com/instances/NAX/maintenances and looks all good.
Can anybody help me figure out why is this occurring for a particular instance only?
req.setEndpoint(Url.getOrgDomainUrl().toExternalForm()+'/services/data/v34.0/sobjects/' + objName + '/describe/layouts/' + recordTypeId);