Found it it in the Tooling API -
TraceFlag
Represents a trace flag that triggers an Apex debug log at the specified logging level.
• To set up a log for a specific user, set ScopeId to null and TracedEntityId to the ID of the user. This option can only
be configured for a user, not an Apex class or Apex trigger.
• To configure logging levels for system logs (visible only to you), set ScopeId to user and TracedEntityId to the ID
of the logged-in user.
• To set up a system log (visible only to you) for a specific Apex class or trigger, set ScopeId to user and TracedEntityId
to the ID of the Apex class or trigger.
There is a good explanation in the answer to Debugging logs in Developer Console is not working
Not sure why you're not using the PHP Toolkit, but here's some PHP that creates a Contact.
First, with the Enterprise SOAP API
// Namespaces
$ns1 = "urn:sobject.enterprise.soap.sforce.com";
$ns2 = "urn:enterprise.soap.sforce.com";
$client = new SoapClient($enterpriseWsdlFile, array (
'trace' => TRUE, // Useful for debugging!
'features' => SOAP_SINGLE_ELEMENT_ARRAYS // Preserve your sanity
));
$header = new SoapHeader($ns2, "SessionHeader", array ('sessionId' => $sessionId));
// $enterpriseUrl has form https://na1.salesforce.com/services/Soap/c/33.0/[ORG_ID]
$client->__setLocation($enterpriseUrl);
$client->__setSoapHeaders($header);
$contact = new stdclass();
$contact->FirstName = 'Jane';
$contact->LastName = 'Doe';
// You can send multiple records in one call by just putting more
// entries in this array
$sObjects = array(
new SoapVar($contact, SOAP_ENC_OBJECT, "Contact", $ns1)
);
try {
$result = $client->create(new SoapParam($sObjects, 'sObjects'));
echo "Created records\n";
foreach ($result->result as $value) {
echo $value->id."\n";
}
// Debug
echo "SOAP Client returned: \n";
print_r($result);
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
// Debug...
echo "SOAP Request: \n";
print_r($client->__getLastRequest());
echo "\n";
echo "SOAP Response: \n";
print_r($client->__getLastResponse());
echo "\n";
And the same thing, with the Partner SOAP API:
// Namespaces
$ns1 = "urn:sobject.partner.soap.sforce.com";
$ns2 = "urn:partner.soap.sforce.com";
$client = new SoapClient($partnerWsdlFile, array (
'trace' => TRUE, // Useful for debugging!
'features' => SOAP_SINGLE_ELEMENT_ARRAYS // Preserve your sanity
));
// $partnerUrl has form https://na1.salesforce.com/services/Soap/u/33.0/[ORG_ID]
$client->__setLocation($partnerUrl);
$header = new SoapHeader($ns2, "SessionHeader", array ('sessionId' => $sessionId));
$client->__setSoapHeaders($header);
$fields = array (
new SoapVar('Contact', XSD_STRING, null, null, 'type', $ns1),
new SoapVar('Jane', XSD_STRING, null, null, 'FirstName'),
new SoapVar('Doe', XSD_STRING, null, null, 'LastName')
);
// You can send multiple records in one call by just putting more
// entries in this array
$sObjects = array(
new SoapVar($fields, SOAP_ENC_OBJECT, null, null)
);
try {
$result = $client->create(new SoapParam($sObjects, 'sObjects'));
echo "Created records\n";
foreach ($result->result as $value) {
echo $value->id."\n";
}
// Debug
echo "SOAP Client returned: \n";
print_r($result);
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
// Debug...
echo "SOAP Request: \n";
print_r($client->__getLastRequest());
echo "\n";
echo "SOAP Response: \n";
print_r($client->__getLastResponse());
echo "\n";
Best Answer
For my general development org, the end point described in the Tooling API WSDL is as follows. So you where close, not sure if the capital T makes a difference, it may.
If you goto the API page under Setup, you can download the WSDL (Web Service Definition Language)