All writs, warrants, process, and subpoenas authorized by the provisions of this Chapter must be issued by the Clerk of the Court, and, except subpoenas, must be sealed with the seal of such Court, and served and returned forthwith, unless the Court or Judge shall specify a particular time for any such return. (PC 1503) (PC 1508)
A Writ of Habeas Corpus is made by petition signed by the restrainee or someone on his behalf. The petition must have the name and address of the entity who is imprisoning, whether the imprisonment is legal, and the alleged illegality. The petition must be made by oath or affirmation. (PC 1474)
A copy of the application for such writ must be served upon the district attorney at least 24 hours before the return is to be made. If the imprisonment is for a city ordinance, service is on the city attorney instead of the district attorney. If a petition is for denial of parole, service is on the attorney general and the district attorney at least three days before the return is due. (PC 1475)