Skip to main content

kobana dashboards portal-users

Commands of kobana dashboards portal-users. Every global option (Global options) applies here.

CommandHTTPDescription
portal-users activityGET /v1/portal_users/{id}/activityGet portal user activity
portal-users activity timelineGET /v1/portal_users/{id}/activity/timelineList portal user activity timeline
portal-users listGET /v1/portal_usersList portal users
portal-users createPOST /v1/portal_usersCreate (invite) portal user
portal-users invitePOST /v1/portal_users/inviteInvite portal user
portal-users getGET /v1/portal_users/{id}Get portal user
portal-users updatePATCH /v1/portal_users/{id}Update portal user
portal-users deleteDELETE /v1/portal_users/{id}Delete portal user
portal-users email-previewGET /v1/portal_users/{id}/email-previewPreview portal user email
portal-users resendPOST /v1/portal_users/{id}/resendResend invitation or verification email

portal-users activity​

Get portal user activity

kobana dashboards portal-users activity [ID] [OPTIONS] [COMMAND]

GET /v1/portal_users/{id}/activity

Usage analytics of a portal user: sign-ins and pages viewed (all time), distinct pages, the newest activity, a daily series of views and sign-ins over the last days days (São Paulo days) and the most opened pages. The individual entries are at GET /portal_users/{id}/activity/timeline.

Path arguments: id

Query parameters

NameTypeRequiredDescription
daysintegernoDays the series covers, today included (1 to 365). Default: 30.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Summary of the user activity.
400Request body failed validation.
404Resource not found in the current organization.

portal-users activity timeline​

List portal user activity timeline

kobana dashboards portal-users activity timeline [ID] [OPTIONS]

GET /v1/portal_users/{id}/activity/timeline

Sign-ins (kind: login, with the method used: credentials, magic-link or sso) and pages opened (kind: page_view, with path and page_name), newest first. Cursor paging: send meta.next_before as before for the next page; null means there is none. An operator viewing the portal as the user is not counted.

Path arguments: id

Query parameters

NameTypeRequiredDescription
beforestringnoISO 8601 instant: only entries older than it.
limitintegernoEntries per page (1 to 100). Default: 20.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200One page of the timeline.
400Request body failed validation.
404Resource not found in the current organization.

portal-users list​

List portal users

kobana dashboards portal-users list [OPTIONS]

GET /v1/portal_users

Returns the workspace's portal users, paginated. Sensitive fields (password, tokens) are never exposed.

Query parameters

NameTypeRequiredDescription
pageintegernoPage (starts at 1). Default: 1.
per_pageintegernoItems per page. Default: 20. Maximum: 100.
sort_bystringnoSort field. Default depends on the resource.
sort_orderstringnoSort direction. Default: desc. Values: asc, desc.
tenant_idstringnoScope to the users of one owner ID (exact match).
statusstringnoFilter by status: active, pending_invitation, pending_verification, suspended or locked. Values: active, pending_verification, pending_invitation, suspended, locked.
emailstringnoSubstring match on the email.
external_idstringnoFilter by the exact external_id.
sso_onlystringnoFilter by sso_only (true or false). Values: true, false.
created_afterstringnoStart of creation date range (YYYY-MM-DD).
created_beforestringnoEnd of creation date range (YYYY-MM-DD).
last_login_afterstringnoLast sign-in on or after this date (ISO 8601).
last_login_beforestringnoLast sign-in on or before this date (ISO 8601).
person_idstringnoFilter by associated person UUID.
person_document_numberstringnoFilter by person CPF/CNPJ (exact match).
person_name_containsstringnoFilter by person name (partial search, case-insensitive).

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Paginated list of portal users.
404Resource not found in the current organization.

portal-users create​

Create (invite) portal user

kobana dashboards portal-users create [OPTIONS]

POST /v1/portal_users

Creates the user in the workspace with status pending_invitation and sends the invitation email. The invitation expires in 7 days.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Request body

NameTypeRequiredDescription
emailstringyesUser's email (required). Unique per workspace, case-insensitive.
tenant_idstringnoOwner ID of the records the user will see in the portal. Send null to clear it.
external_idstringnoIdentifier in your external system, for idempotency/sync.
sso_onlybooleannoWhen true, the user can only sign in through SSO.
custom_metadataobjectnoArbitrary organization-defined metadata (key/value).

More fields and nested objects: kobana schema dashboards.portal-users.create.

Responses

HTTPDescription
201Invitation created and email queued for sending.
400Request body failed validation.
404Resource not found in the current organization.
409A user or invitation already exists for this email in the workspace.

portal-users invite​

Invite portal user

kobana dashboards portal-users invite [OPTIONS]

POST /v1/portal_users/invite

Equivalent to POST /portal_users. Available as a verb route for SDKs that prefer descriptive URLs.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Request body

NameTypeRequiredDescription
emailstringyesUser's email (required). Unique per workspace, case-insensitive.
tenant_idstringnoOwner ID of the records the user will see in the portal. Send null to clear it.
external_idstringnoIdentifier in your external system, for idempotency/sync.
sso_onlybooleannoWhen true, the user can only sign in through SSO.
custom_metadataobjectnoArbitrary organization-defined metadata (key/value).

More fields and nested objects: kobana schema dashboards.portal-users.invite.

Responses

HTTPDescription
201Invitation created and email queued for sending.
400Request body failed validation.
404Resource not found in the current organization.
409A user or invitation already exists for this email in the workspace.

portal-users get​

Get portal user

kobana dashboards portal-users get [ID] [OPTIONS]

GET /v1/portal_users/{id}

The {id} parameter accepts the user's UUID or external_id.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Portal user detail.
404Resource not found in the current organization.

portal-users update​

Update portal user

kobana dashboards portal-users update [ID] [OPTIONS]

PATCH /v1/portal_users/{id}

Updates email, tenant_id, external_id, sso_only, status and custom_metadata. Allowed status transitions: active ↔ suspended.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Request body

NameTypeRequiredDescription
emailstringnoUser's email (required). Unique per workspace, case-insensitive.
tenant_idstringnoOwner ID of the records the user will see in the portal. Send null to clear it.
external_idstringnoIdentifier in your external system, for idempotency/sync.
sso_onlybooleannoWhen true, the user can only sign in through SSO.
statusstringnoAllowed transitions: active ↔ suspended. On reactivation the user goes back to the status held before the suspension (someone who had not confirmed the e-mail stays pending). Values: active, suspended.
unlockbooleannotrue ends the login lockout (too many wrong passwords): resets the attempts and lets the user sign in. 400 when the user is not locked. Values: true.
custom_metadataobjectnoArbitrary organization-defined metadata (key/value).

More fields and nested objects: kobana schema dashboards.portal-users.update.

Responses

HTTPDescription
200User updated.
400Request body failed validation.
404Resource not found in the current organization.
409A user or invitation already exists for this email in the workspace.

portal-users delete​

Delete portal user

kobana dashboards portal-users delete [ID] [OPTIONS]

DELETE /v1/portal_users/{id}

Pending invitations are permanently deleted; other users are suspended and their sessions ended. An already suspended user is left unchanged. outcome tells what happened.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Deletion confirmation.
404Resource not found in the current organization.

portal-users email-preview​

Preview portal user email

kobana dashboards portal-users email-preview [ID] [OPTIONS]

GET /v1/portal_users/{id}/email-preview

Returns the subject and body of the invitation or verification email that would be sent to the user, without actually sending it. Available only for pending_invitation or pending_verification users.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Email preview.
400Request body failed validation.
404Resource not found in the current organization.

portal-users resend​

Resend invitation or verification email

kobana dashboards portal-users resend [ID] [OPTIONS]

POST /v1/portal_users/{id}/resend

Resends the invitation email (for pending_invitation, rotating the token) or verification email (for pending_verification). Other statuses return 400.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Email resent.
400Request body failed validation.
404Resource not found in the current organization.