All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
cancelInvite | DELETE /v2/orgs/{org_id}/invites/{invite_id} | Cancel Invite |
createOrganization | POST /v2/orgs | Create Organization |
deleteOrganization | DELETE /v2/orgs/{org_id} | Delete Organization |
getActiveOrganization | GET /v2/orgs/active/org | Get Active Organization |
getOrganization | GET /v2/orgs/{org_id} | Get Organization |
inviteMembersToOrganization | POST /v2/orgs/{org_id}/invites | Invite Members To Organization |
listOrganizationInvites | GET /v2/orgs/{org_id}/invites | List Organization Invites |
listOrganizations | GET /v2/orgs | List Organizations |
updateOrganization | PATCH /v2/orgs/{org_id} | Update Organization |
cancelInvite(orgId, inviteId)
Cancel Invite
Cancels an invite that was sent to a new member.
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = OrganizationsApi()
val orgId : kotlin.String = orgId_example // kotlin.String | Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").
val inviteId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | Id of the invite to cancel
try {
apiInstance.cancelInvite(orgId, inviteId)
} catch (e: ClientException) {
println("4xx response calling OrganizationsApi#cancelInvite")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling OrganizationsApi#cancelInvite")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
orgId | kotlin.String | Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the "slug"). | |
inviteId | java.util.UUID | Id of the invite to cancel |
null (empty response body)
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
OrganizationReadWithAPIKey createOrganization(organizationCreate)
Create Organization
Creates a new organization that will be owned by the authenticated actor (i.e: human team member or api key).
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = OrganizationsApi()
val organizationCreate : OrganizationCreate = // OrganizationCreate |
try {
val result : OrganizationReadWithAPIKey = apiInstance.createOrganization(organizationCreate)
println(result)
} catch (e: ClientException) {
println("4xx response calling OrganizationsApi#createOrganization")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling OrganizationsApi#createOrganization")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
organizationCreate | OrganizationCreate |
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: application/json
- Accept: application/json
deleteOrganization(orgId)
Delete Organization
Deletes an organization (Permit.io account) and all its related data.
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = OrganizationsApi()
val orgId : kotlin.String = orgId_example // kotlin.String | Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").
try {
apiInstance.deleteOrganization(orgId)
} catch (e: ClientException) {
println("4xx response calling OrganizationsApi#deleteOrganization")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling OrganizationsApi#deleteOrganization")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
orgId | kotlin.String | Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the "slug"). |
null (empty response body)
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
OrganizationRead getActiveOrganization()
Get Active Organization
Gets a single organization (Permit.io account) matching the given org_id, if such org exists and can be accessed by the authenticated actor.
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = OrganizationsApi()
try {
val result : OrganizationRead = apiInstance.getActiveOrganization()
println(result)
} catch (e: ClientException) {
println("4xx response calling OrganizationsApi#getActiveOrganization")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling OrganizationsApi#getActiveOrganization")
e.printStackTrace()
}
This endpoint does not need any parameter.
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
OrganizationRead getOrganization(orgId)
Get Organization
Gets a single organization (Permit.io account) matching the given org_id, if such org exists and can be accessed by the authenticated actor.
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = OrganizationsApi()
val orgId : kotlin.String = orgId_example // kotlin.String | Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").
try {
val result : OrganizationRead = apiInstance.getOrganization(orgId)
println(result)
} catch (e: ClientException) {
println("4xx response calling OrganizationsApi#getOrganization")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling OrganizationsApi#getOrganization")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
orgId | kotlin.String | Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the "slug"). |
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
MultiInviteResult inviteMembersToOrganization(orgId, inviteCreate, inviterName, inviterEmail)
Invite Members To Organization
Invite new members into the organization.
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = OrganizationsApi()
val orgId : kotlin.String = orgId_example // kotlin.String | Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").
val inviteCreate : kotlin.collections.List<InviteCreate> = // kotlin.collections.List<InviteCreate> |
val inviterName : kotlin.String = inviterName_example // kotlin.String |
val inviterEmail : kotlin.String = inviterEmail_example // kotlin.String |
try {
val result : MultiInviteResult = apiInstance.inviteMembersToOrganization(orgId, inviteCreate, inviterName, inviterEmail)
println(result)
} catch (e: ClientException) {
println("4xx response calling OrganizationsApi#inviteMembersToOrganization")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling OrganizationsApi#inviteMembersToOrganization")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
orgId | kotlin.String | Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the "slug"). | |
inviteCreate | kotlin.collections.List<InviteCreate> | ||
inviterName | kotlin.String | [optional] | |
inviterEmail | kotlin.String | [optional] |
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: application/json
- Accept: application/json
kotlin.collections.List<InviteRead> listOrganizationInvites(orgId, page, perPage)
List Organization Invites
Lists pending organization invites
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = OrganizationsApi()
val orgId : kotlin.String = orgId_example // kotlin.String | Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").
val page : kotlin.Int = 56 // kotlin.Int | Page number of the results to fetch, starting at 1.
val perPage : kotlin.Int = 56 // kotlin.Int | The number of results per page (max 100).
try {
val result : kotlin.collections.List<InviteRead> = apiInstance.listOrganizationInvites(orgId, page, perPage)
println(result)
} catch (e: ClientException) {
println("4xx response calling OrganizationsApi#listOrganizationInvites")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling OrganizationsApi#listOrganizationInvites")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
orgId | kotlin.String | Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the "slug"). | |
page | kotlin.Int | Page number of the results to fetch, starting at 1. | [optional] [default to 1] |
perPage | kotlin.Int | The number of results per page (max 100). | [optional] [default to 30] |
kotlin.collections.List<InviteRead>
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
kotlin.collections.List<OrganizationRead> listOrganizations(page, perPage)
List Organizations
Lists all the organizations that can be accessed by the authenticated actor (i.e: human team member or api key).
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = OrganizationsApi()
val page : kotlin.Int = 56 // kotlin.Int | Page number of the results to fetch, starting at 1.
val perPage : kotlin.Int = 56 // kotlin.Int | The number of results per page (max 100).
try {
val result : kotlin.collections.List<OrganizationRead> = apiInstance.listOrganizations(page, perPage)
println(result)
} catch (e: ClientException) {
println("4xx response calling OrganizationsApi#listOrganizations")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling OrganizationsApi#listOrganizations")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
page | kotlin.Int | Page number of the results to fetch, starting at 1. | [optional] [default to 1] |
perPage | kotlin.Int | The number of results per page (max 100). | [optional] [default to 30] |
kotlin.collections.List<OrganizationRead>
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
OrganizationRead updateOrganization(orgId, organizationUpdate)
Update Organization
Updates the organization's profile.
// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*
val apiInstance = OrganizationsApi()
val orgId : kotlin.String = orgId_example // kotlin.String | Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").
val organizationUpdate : OrganizationUpdate = // OrganizationUpdate |
try {
val result : OrganizationRead = apiInstance.updateOrganization(orgId, organizationUpdate)
println(result)
} catch (e: ClientException) {
println("4xx response calling OrganizationsApi#updateOrganization")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling OrganizationsApi#updateOrganization")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
orgId | kotlin.String | Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the "slug"). | |
organizationUpdate | OrganizationUpdate |
Configure HTTPBearer: ApiClient.accessToken = ""
- Content-Type: application/json
- Accept: application/json