@Path(value="/organizations") @PermitAll public class OrganizationEndpoint extends Object
Organization.| Constructor and Description |
|---|
OrganizationEndpoint() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
createOrganization(OrganizationRequest request)
Creates a new
Organization based on the parameters of the incoming
OrganizationRequest. |
javax.ws.rs.core.Response |
deleteOrganization(String id)
Removes an existing
Organization if the persona has permissions to do so. |
javax.ws.rs.core.Response |
getOrganizationsForPersona()
Retrieves all organizations to which this
HawkularUser has access to. |
@GET @Path(value="/") public javax.ws.rs.core.Response getOrganizationsForPersona()
HawkularUser has access to.Response whose entity is a List of
Organization@POST
@Path(value="/")
public javax.ws.rs.core.Response createOrganization(@NotNull
OrganizationRequest request)
Organization based on the parameters of the incoming
OrganizationRequest.
Note that an organization cannot, currently, create an organization. The main Accounts API allows that, but we block it on this endpoint as other components might not be able to deal with this situation.
request - the incoming request as OrganizationRequestResponse whose entity is an
Organization@DELETE
@Path(value="/{id}")
public javax.ws.rs.core.Response deleteOrganization(@NotNull @PathParam(value="id")
String id)
Organization if the persona has permissions to do so.id - the ID of the Organization to be removed.Response if successful or forbidden, if the persona has no access to
the organization.Copyright © 2015 Red Hat, Inc.. All rights reserved.