Interface SwaggerCompanyResource


@Path("/companies") @Consumes("application/json") @Produces("application/vnd.ilandcloud.api.v1.0+json") public interface SwaggerCompanyResource
  • Method Details

    • getCompany

      @GET @Path("/{companyId}") CompanyResponse getCompany(@PathParam("companyId") String companyId)
      Gets a company.
      Parameters:
      companyId - the company identifier
      Returns:
      the company details
    • createUser

      @POST @Path("/{companyId}/users") @Consumes("application/json") UserResponse createUser(@PathParam("companyId") String companyId, UserCreateRequest createRequest)
      Creates a new user for a company.
      Parameters:
      createRequest - new user details
      Returns:
      created user
    • createSSOUser

      @POST @Path("/{companyId}/sso-user") @Consumes("application/json") UserResponse createSSOUser(@PathParam("companyId") String companyId, SSOUserCreateRequest createRequest)
      Create a new SSO user for a company.
      Parameters:
      companyId - company to create users in
      createRequest - new user details
      Returns:
      created user
    • createUsers

      @POST @Path("/{companyId}/users-batch") @Consumes("application/json") UserCreationSetResponse createUsers(@PathParam("companyId") String companyId, UserCreateRequestSet userCreateRequestSet)
      Create multiple users for a company.
      Parameters:
      companyId - company to create users in
      userCreateRequestSet - set of new user details
    • createSSOUsers

      @POST @Path("/{companyId}/users-sso-batch") @Consumes("application/json") UserCreationSetResponse createSSOUsers(@PathParam("companyId") String companyId, SSOUserCreateRequestSet ssoUserCreateRequestSet)
      Create multiple SSO users for a company.
      Parameters:
      companyId - company to create users in
      ssoUserCreateRequestSet - set of new SSO user details
    • createUsersFromFile

      @POST @Path("/{companyId}/create-users-from-file") @Consumes("application/json") UserCreationSetResponse createUsersFromFile(@PathParam("companyId") String companyId, byte[] userCSVFile)
      Create multiple users from a file. To see an example of a valid CSV file see downloadExampleUserCreationCSVFile(String, boolean) where the boolean is set to false.
      Parameters:
      companyId - company to create users in
      userCSVFile - file to import users from
    • createSSOUsersFromFile

      @POST @Path("/{companyId}/create-sso-users-from-file") @Consumes("application/json") UserCreationSetResponse createSSOUsersFromFile(@PathParam("companyId") String companyId, byte[] ssoCSVFile)
      Create multiple SSO users from a CSV file. To see an example of valid CSV file see downloadExampleUserCreationCSVFile(String, boolean) where the SSO boolean flag is set to true.
      Parameters:
      companyId - company to create users in
      ssoCSVFile - file to import users from
    • downloadExampleUserCreationCSVFile

      @POST @Path("/{companyId}/download-user-create-csv-example") @Consumes("application/json") @Produces("application/vnd.ilandcloud.api.v1.0+octet-stream") InputStream downloadExampleUserCreationCSVFile(@PathParam("companyId") String companyId, @QueryParam("ssoUsers") boolean ssoUsers)
      Download an example of the user creation CSV file. Will include all the domains and all the roles you can use.
      Parameters:
      companyId - company of the example csv file
      Returns:
      example CSV file for user creation
    • getUsers

      @GET @Path("/{companyId}/users") CompanyUserListResponse getUsers(@PathParam("companyId") String companyId, @QueryParam("role") String roleId)
      Gets all users for a company.
      Parameters:
      companyId - the company identifier
      Returns:
      list of the companies users
    • createRole

      @POST @Path("/{companyId}/roles") @Consumes("application/json") RoleResponse createRole(@PathParam("companyId") String companyId, RoleCreateRequest roleCreationRequest)
      Creates a new role for a company.
      Parameters:
      companyId - the company ID
      roleCreationRequest - data object specifying new role parameters
      Returns:
      created role
    • getRoles

      @GET @Path("/{companyId}/roles") RoleListResponse getRoles(@PathParam("companyId") String companyId, @QueryParam("domain") String domain)
      Gets all company roles.
      Parameters:
      companyId - the company ID
      domain - optional user domain to scope the role list to. When supplied, must be one of the domain strings returned by getUserDomains(String) for this company. If the domain is not an MSPShared domain, the MSP Company Administrator role is omitted from the response.
      Returns:
      the list of company roles
    • getRoleResponse

      @GET @Path("/{companyId}/roles/{roleId}") RoleResponse getRoleResponse(@PathParam("companyId") String companyId, @PathParam("roleId") String roleId)
      Gets a company role by ID.
      Parameters:
      companyId - the company ID
      roleId - the role ID
      Returns:
      the role details
    • updateRole

      @PUT @Path("/{companyId}/roles/{roleId}") @Consumes("application/json") RoleResponse updateRole(@PathParam("companyId") String companyId, @PathParam("roleId") String roleId, RoleUpdateRequest roleUpdateRequest)
      Modifies a company role.
      Parameters:
      companyId - the company ID
      roleId - the role ID
      roleUpdateRequest - data object with role update parameters
      Returns:
      the role details
    • deleteRole

      @DELETE @Path("/{companyId}/roles/{roleId}") void deleteRole(@PathParam("companyId") String companyId, @PathParam("roleId") String roleId)
      Deletes a company role.
      Parameters:
      companyId - the company ID
      roleId - the role ID
    • getUserDomains

      @GET @Path("/{companyId}/user-domains") StringListResponse getUserDomains(@PathParam("companyId") String companyId)
      Get the user domains that are associated with this company.
      Parameters:
      companyId - the company identifier
      Returns:
      list of domains that are associated with the company
    • getCloudTenantBillingHistory

      @GET @Path("/{companyId}/vcc-backup-tenants-billing") CloudTenantBillHistoryResponse getCloudTenantBillingHistory(@PathParam("companyId") String companyId, @QueryParam("location") String locationId, @QueryParam("startYear") Integer startYear, @QueryParam("startMonth") Integer startMonth, @QueryParam("endYear") Integer endYear, @QueryParam("endMonth") Integer endMonth)
      Get the historical billing for a given company.
      Parameters:
      companyId - the company identifier
      locationId - the location identifier (optional)
      startYear - the year to start
      startMonth - the month to start (1-12)
      endYear - the year to end with
      endMonth - the month to end (1-12)
      Returns:
      map of location to list of bills
    • getBaCompanyBillingHistory

      @GET @Path("/{companyId}/vac-backup-tenants-billing") CloudTenantBillHistoryResponse getBaCompanyBillingHistory(@PathParam("companyId") String companyId, @QueryParam("location") String locationId, @QueryParam("startYear") Integer startYear, @QueryParam("startMonth") Integer startMonth, @QueryParam("endYear") Integer endYear, @QueryParam("endMonth") Integer endMonth)
      Get the historical VAC billing for a given company.
      Parameters:
      companyId - the company identifier
      locationId - the location identifier (optional)
      startYear - the year to start
      startMonth - the month to start (1-12)
      endYear - the year to end with
      endMonth - the month to end (1-12)
      Returns:
      map of location to list of vac bills
    • updateCompanyLogo

      @POST @Path("/{companyId}/logo") @Consumes("image/jpeg") void updateCompanyLogo(@PathParam("companyId") String companyId, byte[] pictureBytes)
      Updates the company's logo.
      Parameters:
      companyId - the company identifier
      pictureBytes - a JPEG image
    • removeCompanyLogo

      @DELETE @Path("/{companyId}/logo") void removeCompanyLogo(@PathParam("companyId") String companyId)
      Removes the company's logo.
      Parameters:
      companyId - the company identifier
    • getLogo

      @GET @Path("/{companyId}/logo") @Produces("image/vnd.ilandcloud.api.v1.0+jpeg") InputStream getLogo(@PathParam("companyId") String companyId)
      Gets the company logo.
      Parameters:
      companyId - the company identifier
      Returns:
      the picture as a byte array
    • search

      @GET @Path("/{companyId}/search") SearchResultResponse search(@PathParam("companyId") String companyId, @QueryParam("query") String query, @QueryParam("pageOffset") int pageOffset, @QueryParam("pageSize") int pageSize)
      Perform a full-text search of entities pertaining to this company.
      Parameters:
      companyId - the company identifier
      query - 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 documents
      pageSize - limit to number of hits (default value is 10 and maximum is 50)
    • getVacCompanies

      @GET @Path("/{companyId}/vac-companies") BaCompanySetResponse getVacCompanies(@PathParam("companyId") String companyId)
      Get all the VAC companies for a given company.
      Parameters:
      companyId - company id
      Returns:
      a set of vac companies
    • enforceTwoFactorAuthForUser

      @POST @Path("/{companyId}/actions/enforce-two-factor-auth") void enforceTwoFactorAuthForUser(@PathParam("companyId") String companyId, EnforceTwoFactorAuthForUserRequest request)
      Enforce two factor authentication for the specified user.
      Parameters:
      companyId - company id
      request - request to enforce two factor auth for user
    • resetTwoFactorAuthForUser

      @POST @Path("/{companyId}/actions/reset-two-factor-auth") void resetTwoFactorAuthForUser(@PathParam("companyId") String companyId, ResetTwoFactorAuthRequest request)
      Reset two factor authentication for the specified user. After resetting the user's two factor auth credentials, will default back to the global settings for the company regarding two factor authentication.
      Parameters:
      companyId - company id
      request - request to reset two factor auth for user
    • setCompanyTwoFactorAuthSettings

      @PUT @Path("/{companyId}/two-factor-auth-settings") void setCompanyTwoFactorAuthSettings(@PathParam("companyId") String companyId, EnforceTwoFactorAuthRequest request)
      Set the two factor authentication settings for a company. Can either set for all users in the company or for specified roles.
      Parameters:
      companyId - company id
      request - request whether to enforce for all users or specified roles
    • getCompanyTwoFactorAuthSettings

      @GET @Path("/{companyId}/two-factor-auth-settings") CompanyTwoFactorAuthSettingsResponse getCompanyTwoFactorAuthSettings(@PathParam("companyId") String companyId)
      Get the specified company's two factor authentication settings.
      Parameters:
      companyId - company id
      Returns:
      company's two factor auth settings
    • sendUserInvitationEmail

      @POST @Path("/{companyId}/actions/{username}/send-invite-email") void sendUserInvitationEmail(@PathParam("companyId") String companyId, @PathParam("username") String username)
      Send a user invitation email to the given user.
      Parameters:
      companyId - company id
      username - user to send invite email to
    • markUserAsInvited

      @POST @Path("/{companyId}/actions/{username}/mark-as-invited") void markUserAsInvited(@PathParam("companyId") String companyId, @PathParam("username") String username)
      Mark a given user without sending an invitation email.
      Parameters:
      companyId - company id
      username - user to be marked as invited
    • sendUsersInvitationEmails

      @POST @Path("/{companyId}/actions/send-invite-emails") void sendUsersInvitationEmails(@PathParam("companyId") String companyId, InviteUserEmailSet userNames)
      Send user invitation emails to the given set of users.
      Parameters:
      companyId - company id
      userNames - users to send invite emails to
    • getCompanyAdminCount

      @GET @Path("/{companyId}/company-admin-count") CompanyAdminCountResponse getCompanyAdminCount(@PathParam("companyId") String companyId)
      Get the number of company admins in a given company.
      Parameters:
      companyId - company id
      Returns:
      number of company admins in company