Interface SpallocServiceAPI

All Known Implementing Classes:
SpallocServiceImpl

public interface SpallocServiceAPI
The REST API for the SpiNNaker machine allocation service.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Interface to a particular job.
    static interface 
    Interface to a particular machine.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    createJob(@NotNull @Valid CreateJobRequest req, jakarta.ws.rs.core.UriInfo ui, jakarta.ws.rs.core.SecurityContext security, jakarta.ws.rs.container.AsyncResponse response)
    Create a job.
    describeService(jakarta.ws.rs.core.UriInfo ui, jakarta.ws.rs.core.SecurityContext security, jakarta.servlet.http.HttpServletRequest request)
    Get a description of the overall service.
    void
    emergencyStop(String commandCode, jakarta.ws.rs.container.AsyncResponse response)
    Immediately stop all jobs and power down all boards.
    getJob(@jakarta.validation.constraints.Positive(message="job ID must be positive") int id, jakarta.ws.rs.core.UriInfo ui, jakarta.servlet.http.HttpServletRequest request, jakarta.ws.rs.core.SecurityContext security)
    Get a sub-resource for managing a job.
    getMachine(@NotBlank(message="machine name must not be blank") String name, jakarta.ws.rs.core.UriInfo ui, jakarta.ws.rs.core.SecurityContext security)
    Get a sub-resource for managing a machine.
    getMachines(jakarta.ws.rs.core.UriInfo ui)
    Get a description of the machines.
    void
    listJobs(boolean wait, boolean destroyed, @jakarta.validation.constraints.Positive(message="limit must be at least 1") int limit, @jakarta.validation.constraints.PositiveOrZero(message="start must be at least 0") int start, jakarta.ws.rs.core.UriInfo ui, jakarta.ws.rs.container.AsyncResponse response)
    List jobs.
  • Method Details

    • describeService

      @GET @Produces("application/json") ServiceDescription describeService(@Context jakarta.ws.rs.core.UriInfo ui, @Context jakarta.ws.rs.core.SecurityContext security, @Context jakarta.servlet.http.HttpServletRequest request)
      Get a description of the overall service.
      Parameters:
      ui - How to build URIs
      security - What are the user's identity and granted permissions?
      request - Details about the request, used to extract the CSRF token.
      Returns:
      A wrapped ServiceDescription
    • getMachines

      @GET @Path("machines") @Produces("application/json") @PreAuthorize("hasRole(\'READER\')") MachinesResponse getMachines(@Context jakarta.ws.rs.core.UriInfo ui)
      Get a description of the machines.
      Parameters:
      ui - How to build URIs
      Returns:
      A list of machines
    • getMachine

      @Path("machines/{name}") @PreAuthorize("hasRole(\'READER\')") SpallocServiceAPI.MachineAPI getMachine(@PathParam("name") @NotBlank(message="machine name must not be blank") @NotBlank(message="machine name must not be blank") String name, @Context jakarta.ws.rs.core.UriInfo ui, @Context jakarta.ws.rs.core.SecurityContext security)
      Get a sub-resource for managing a machine.
      Parameters:
      name - The name of the machine
      ui - How to build URIs
      security - What are the user's identity and granted permissions?
      Returns:
      The sub-resource
    • listJobs

      @GET @Path("jobs") @Produces("application/json") @PreAuthorize("hasRole(\'READER\')") void listJobs(@QueryParam("wait") @DefaultValue("false") boolean wait, @QueryParam("deleted") @DefaultValue("false") boolean destroyed, @QueryParam("limit") @DefaultValue("100") @Positive(message="limit must be at least 1") @jakarta.validation.constraints.Positive(message="limit must be at least 1") int limit, @QueryParam("start") @DefaultValue("0") @PositiveOrZero(message="start must be at least 0") @jakarta.validation.constraints.PositiveOrZero(message="start must be at least 0") int start, @Context jakarta.ws.rs.core.UriInfo ui, @Suspended jakarta.ws.rs.container.AsyncResponse response)
      List jobs.
      Parameters:
      wait - Whether we are waiting for a change with a long query
      limit - Paging support: how many values to bring back
      start - Paging support: where in the sequence to start
      destroyed - Whether to include destroyed jobs
      ui - How to build URIs
      response - Filled out with a ListJobsResponse
    • createJob

      @POST @Path("jobs") @Consumes("application/json") @Produces("application/json") @PreAuthorize("hasRole(\'USER\')") void createJob(@NotNull @Valid @NotNull @Valid CreateJobRequest req, @Context jakarta.ws.rs.core.UriInfo ui, @Context jakarta.ws.rs.core.SecurityContext security, @Suspended jakarta.ws.rs.container.AsyncResponse response)
      Create a job.
      Parameters:
      req - Description of what to create
      ui - How to build URIs
      security - Information about the user
      response - Filled out with a CreateJobResponse
    • getJob

      @Path("jobs/{id}") @Produces("application/json") @PreAuthorize("hasRole(\'USER\')") SpallocServiceAPI.JobAPI getJob(@PathParam("id") @Positive(message="job ID must be positive") @jakarta.validation.constraints.Positive(message="job ID must be positive") int id, @Context jakarta.ws.rs.core.UriInfo ui, @Context jakarta.servlet.http.HttpServletRequest request, @Context jakarta.ws.rs.core.SecurityContext security)
      Get a sub-resource for managing a job.
      Parameters:
      id - The ID of the job
      ui - How to build URIs
      request - Information about the request
      security - Information about the user
      Returns:
      The sub-resource
    • emergencyStop

      @GET @Path("/emergencyStop") void emergencyStop(@QueryParam("commandCode") String commandCode, @Suspended jakarta.ws.rs.container.AsyncResponse response)
      Immediately stop all jobs and power down all boards.
      Parameters:
      commandCode -
      response -