@Path(value="/companies") @Consumes(value="application/json") @Produces(value="application/vnd.ilandcloud.api.v1.0+json") public interface CompanyResource extends Serializable
Modifier and Type | Method and Description |
---|---|
RoleResponse |
createRole(String companyId,
RoleCreateRequest roleCreationRequest)
Creates a new role for a company.
|
UserResponse |
createUser(String companyId,
UserCreateRequest createRequest)
Creates a new user for a company.
|
void |
deleteRole(String companyId,
String roleId)
Deletes a company role.
|
CloudTenantBillHistoryResponse |
getCloudTenantBillingHistory(String companyId,
String locationId,
Integer startYear,
Integer startMonth,
Integer endYear,
Integer endMonth)
Get the historical billing for a given company.
|
CompanyResponse |
getCompany(String companyId)
Gets a company.
|
InputStream |
getLogo(String companyId)
Gets the company logo.
|
RoleResponse |
getRoleResponse(String companyId,
String roleId)
Gets a company role by ID.
|
RoleListResponse |
getRoles(String companyId)
Gets all company roles.
|
StringListResponse |
getUserDomains(String companyId)
Get the user domains that are associated with this company.
|
CompanyUserListResponse |
getUsers(String companyId,
String roleId)
Gets all users for a company.
|
VccBackupTenantListResponse |
getVccBackupTenants(String companyId)
Get the vcc cloud tenants for a company.
|
void |
removeCompanyLogo(String companyId)
Removes the company's logo.
|
SearchResultResponse |
search(String companyId,
String query,
int pageOffset,
int pageSize)
Perform a full-text search of entities pertaining to this company.
|
void |
updateCompanyLogo(String companyId,
byte[] pictureBytes)
Updates the company's logo.
|
RoleResponse |
updateRole(String companyId,
String roleId,
RoleUpdateRequest roleUpdateRequest)
Modifies a company role.
|
@GET @Path(value="/{companyId}") @Produces(value="application/vnd.ilandcloud.api.v1.0+json") CompanyResponse getCompany(@PathParam(value="companyId") String companyId)
companyId
- String
the company identifier@POST @Path(value="/{companyId}/users") @Consumes(value="application/json") @Produces(value="application/vnd.ilandcloud.api.v1.0+json") UserResponse createUser(@PathParam(value="companyId") String companyId, UserCreateRequest createRequest)
createRequest
- new user details@GET @Path(value="/{companyId}/users") @Produces(value="application/vnd.ilandcloud.api.v1.0+json") CompanyUserListResponse getUsers(@PathParam(value="companyId") String companyId, @QueryParam(value="role") String roleId)
companyId
- the company identifier@POST @Path(value="/{companyId}/roles") @Consumes(value="application/json") @Produces(value="application/vnd.ilandcloud.api.v1.0+json") RoleResponse createRole(@PathParam(value="companyId") String companyId, RoleCreateRequest roleCreationRequest)
companyId
- the company IDroleCreationRequest
- data object specifying new role parameters@GET @Path(value="/{companyId}/roles") @Produces(value="application/vnd.ilandcloud.api.v1.0+json") RoleListResponse getRoles(@PathParam(value="companyId") String companyId)
companyId
- the company ID@GET @Path(value="/{companyId}/roles/{roleId}") @Produces(value="application/vnd.ilandcloud.api.v1.0+json") RoleResponse getRoleResponse(@PathParam(value="companyId") String companyId, @PathParam(value="roleId") String roleId)
companyId
- the company IDroleId
- the role ID@PUT @Path(value="/{companyId}/roles/{roleId}") @Consumes(value="application/json") @Produces(value="application/vnd.ilandcloud.api.v1.0+json") RoleResponse updateRole(@PathParam(value="companyId") String companyId, @PathParam(value="roleId") String roleId, RoleUpdateRequest roleUpdateRequest)
companyId
- the company IDroleId
- the role IDroleUpdateRequest
- data object with role update parameters@DELETE @Path(value="/{companyId}/roles/{roleId}") @Produces(value="application/vnd.ilandcloud.api.v1.0+json") void deleteRole(@PathParam(value="companyId") String companyId, @PathParam(value="roleId") String roleId)
companyId
- the company IDroleId
- the role ID@GET @Path(value="/{companyId}/vcc-backup-tenants") @Produces(value="application/vnd.ilandcloud.api.v1.0+json") VccBackupTenantListResponse getVccBackupTenants(@PathParam(value="companyId") String companyId)
companyId
- the company identifier@GET @Path(value="/{companyId}/user-domains") @Produces(value="application/vnd.ilandcloud.api.v1.0+json") StringListResponse getUserDomains(@PathParam(value="companyId") String companyId)
companyId
- the company identifier@GET @Path(value="/{companyId}/vcc-backup-tenants-billing") @Produces(value="application/vnd.ilandcloud.api.v1.0+json") CloudTenantBillHistoryResponse getCloudTenantBillingHistory(@PathParam(value="companyId") String companyId, @QueryParam(value="location") String locationId, @QueryParam(value="startYear") Integer startYear, @QueryParam(value="startMonth") Integer startMonth, @QueryParam(value="endYear") Integer endYear, @QueryParam(value="endMonth") Integer endMonth)
companyId
- the company identifierlocationId
- the location identifier (optional)startYear
- the year to startstartMonth
- the month to start (1-12)endYear
- the year to end withendMonth
- the month to end (1-12)@POST @Path(value="/{companyId}/logo") @Consumes(value="image/jpeg") void updateCompanyLogo(@PathParam(value="companyId") String companyId, byte[] pictureBytes)
companyId
- the company identifierpictureBytes
- a JPEG image@DELETE @Path(value="/{companyId}/logo") void removeCompanyLogo(@PathParam(value="companyId") String companyId)
companyId
- the company identifier@GET @Path(value="/{companyId}/logo") @Produces(value="image/vnd.ilandcloud.api.v1.0+jpeg") InputStream getLogo(@PathParam(value="companyId") String companyId)
companyId
- String
the company identifier@GET @Path(value="/{companyId}/search") @Produces(value="application/vnd.ilandcloud.api.v1.0+json") SearchResultResponse search(@PathParam(value="companyId") String companyId, @QueryParam(value="query") String query, @QueryParam(value="pageOffset") int pageOffset, @QueryParam(value="pageSize") int pageSize)
companyId
- String
the company identifierquery
- query string
The query string accepts Lucene style query input.
For example to search for networks with IPs in the 10.10.10.X subnet you would supply '10.10.10.*' as a query string. Tht * represents a wildcard character and can be used anywhere in a query EXCEPT for as the first character.
To search for multiple terms that MUST occur the AND operator can be used. E.g. to find documents containing both 'network' and 'vapp' you would supply the query string 'network AND vapp' .
pageOffset
- page offset for return documentspageSize
- limit to number of hits (default value is 10 and maximum is
50)Copyright © 2019 iland Internet Solutions, Corp. All rights reserved.