The terms you are looking for are outlet switching and outlet metering. Some PDUs do have this feature; many don't.
For instance, Eaton PDUs contain six categories: basic, in-line metered, metered input, metered outlet, switched, and managed, but only the last type has both outlet switching and outlet metering (source: Eaton ePDU G3 operations manual, page 12, PDF). It shouldn't be a surprise that this type of PDUs is the most expensive. Expect to pay at least $650 for a PDU with 8 outlets (the link lists all the managed PDUs sold by Eaton). More outlets means more money.

In terms of the API, don't expect a clean RESTful API that you can easily use. Instead, you communicate with the PDU either through the administration panel, which looks like this:

or through the serial interface (through SSH or Telnet) which makes it possible to execute a bunch of commands (see the same operations manual, pages 82 to 91).
The web interface allows to monitor the PDU, but doesn't allow to switch the outlets. However, it does a great job of measuring how much was consumed, in kWh (the counter can be reset). If you have servers with redundant power supply (and if you don't, well, you should), you may be interested to know that there is a way to configure several PDUs and map individual outlets to devices. This means that if a server is connected to two outlets from two different PDUs, you can see a report showing the power consumption for the whole server, independently of the physical topology.
Another handy feature is the alarms. You can configure the PDU to alert you (and keep a record of the alarms) whenever a given outlet has a current above/below a defined threshold.