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 workingDebugging logs in Developer Console is not working