Class JobController
- Namespace
- Oqtane.Controllers
- Assembly
- Oqtane.Server.dll
[Route("api/[controller]")]
public class JobController : Controller
- Inheritance
-
object
ControllerBase
Controller
JobController
Constructors
JobController(IJobRepository, ILogManager, IServiceProvider)
public JobController(IJobRepository jobs, ILogManager logger, IServiceProvider serviceProvider)
Parameters
jobs
IJobRepository
logger
ILogManager
serviceProvider
IServiceProvider
Methods
Delete(int)
[HttpDelete("{id}")]
[Authorize(Roles = "Host Users")]
public void Delete(int id)
Parameters
id
int
Get()
[HttpGet]
[Authorize(Roles = "Host Users")]
public IEnumerable<Job> Get()
Returns
- IEnumerable<Job>
Get(int)
[HttpGet("{id}")]
[Authorize(Roles = "Host Users")]
public Job Get(int id)
Parameters
id
int
Returns
- Job
Post(Job)
[HttpPost]
[Authorize(Roles = "Host Users")]
public Job Post(Job job)
Parameters
job
Job
Returns
- Job
Put(int, Job)
[HttpPut("{id}")]
[Authorize(Roles = "Host Users")]
public Job Put(int id, Job job)
Parameters
id
int
job
Job
Returns
- Job
Start(int)
[HttpGet("start/{id}")]
[Authorize(Roles = "Host Users")]
public void Start(int id)
Parameters
id
int
Stop(int)
[HttpGet("stop/{id}")]
[Authorize(Roles = "Host Users")]
public void Stop(int id)
Parameters
id
int