Forums

Always-On Tasks via PA API

I'm trying to capture the details of my Always-On task but the PA API doesn't include the AO Task in the Schedule endpoint. Are there plans to create an endpoint for Always-On Task details like the Schedule endpoint? If not, is there another way to programmatically pull this information?

There is an always-on API and we should make it public soon.

Great! Thanks! Let me know if you need anyone to test it.

Cool. Will do.

OK, here it is in short form:

  • The base endpoint is /api/v0/user/{username}/always_on/
  • GET requests to that URL list your tasks.
  • POST requests with "command" as a parameter allow you to create one. There's also an optional "enabled" boolean.
  • The base URL for a specific always-on task is /api/v0/user/{username}/always_on/{id}/, where the ID is a numerical ID for the task. You can see the IDs for your tasks by listing them using the GET request above.
  • GET to a task's URL returns information about it.
  • PUT and PATCH allow you to change the command and the enabledness state
  • DELETE deletes the task.
  • A POST request to /api/v0/user/{username}/always_on/{id}/restart/ will restart the task.

Thanks for the info. It works great!