Created
January 9, 2014 13:42
-
-
Save lennartkoopmann/8334267 to your computer and use it in GitHub Desktop.
Graylog2 REST resource method head
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RequiresAuthentication | |
@Api(value = "Streams", description = "Manage streams") | |
@Path("/streams") | |
public class StreamResource extends RestResource { | |
... | |
@PUT @Timed | |
@Path("/{streamId}") | |
@ApiOperation(value = "Update a stream") | |
@RequiresPermissions(RestPermissions.STREAMS_EDIT) | |
@Consumes(MediaType.APPLICATION_JSON) | |
@Produces(MediaType.APPLICATION_JSON) | |
@ApiResponses(value = { | |
@ApiResponse(code = 404, message = "Stream not found."), | |
@ApiResponse(code = 400, message = "Invalid ObjectId.") | |
}) | |
public Response update(@ApiParam(title = "JSON body", required = true) String body, @ApiParam(title = "streamId", required = true) @PathParam("streamId") String streamId) { | |
// do the magic | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment