Package com.xebialabs.xlrelease.api.v1
Interface TenantApi
@Path("/api/v1/tenants")
@Consumes("application/json")
@Produces("application/json")
public interface TenantApi
REST API for managing tenants and their configurations in Release.
-
Method Summary
Modifier and TypeMethodDescriptioncreate(TenantRequest tenantRequest) Creates a new tenant.createLimit(String tenantId, TenantLimit limit) Creates a new limit configuration for a tenant.voidDeletes a tenant by its ID.voiddeleteLimit(String tenantId) Deletes the limit configuration for a tenant.Retrieves the limit configuration for a specific tenant.Retrieves all tenant limits in the system.Retrieves a specific tenant by its ID.Retrieves all tenants in the system.voidlinkResource(String tenantId, List<TenantLinkRequest> linkRequests) Links a tenant with various XL Release objects/resources.voidupdate(String tenantId, TenantRequest tenantRequest) Updates an existing tenant.voidupdateLimit(String tenantId, TenantLimit limit) Updates the limit configuration for a tenant.
-
Method Details
-
getTenants
Retrieves all tenants in the system.- Returns:
- a list of all tenants
-
getTenant
Retrieves a specific tenant by its ID.- Parameters:
tenantId- the unique identifier of the tenant- Returns:
- the tenant with the specified ID
-
create
Creates a new tenant.- Parameters:
tenantRequest- the tenant creation request containing tenant details- Returns:
- the newly created tenant
-
update
@PUT @Path("/{tenantId}") void update(@PathParam("tenantId") String tenantId, TenantRequest tenantRequest) Updates an existing tenant.- Parameters:
tenantId- the unique identifier of the tenant to updatetenantRequest- the tenant update request containing new tenant details
-
delete
Deletes a tenant by its ID.- Parameters:
tenantId- the unique identifier of the tenant to delete
-
getLimits
Retrieves all tenant limits in the system.- Returns:
- a list of all tenant limits
-
getLimit
Retrieves the limit configuration for a specific tenant.- Parameters:
tenantId- the unique identifier of the tenant- Returns:
- the tenant limit configuration
-
createLimit
@POST @Path("/limits/{tenantId}") TenantLimit createLimit(@PathParam("tenantId") String tenantId, TenantLimit limit) Creates a new limit configuration for a tenant.- Parameters:
tenantId- the unique identifier of the tenantlimit- the tenant limit configuration to create- Returns:
- the newly created tenant limit configuration
-
updateLimit
@PUT @Path("/limits/{tenantId}") void updateLimit(@PathParam("tenantId") String tenantId, TenantLimit limit) Updates the limit configuration for a tenant.- Parameters:
tenantId- the unique identifier of the tenantlimit- the updated tenant limit configuration
-
deleteLimit
Deletes the limit configuration for a tenant.- Parameters:
tenantId- the unique identifier of the tenant
-
linkResource
@PUT @Path("/{tenantId}/link") void linkResource(@PathParam("tenantId") String tenantId, List<TenantLinkRequest> linkRequests) Links a tenant with various XL Release objects/resources. This operation associates the tenant with different resources in the system.- Parameters:
tenantId- the unique identifier of the tenantlinkRequests- a list of tenant link requests specifying which resources to link
-