Skip to content
LogoLogo

Analytics sign in schema

See Management API schema for every domain, the endpoint and authentication.

Mutations

analyticsSignInTokenCreate

Creates a short-lived token that signs the current user into analytics for an organization. Refuses tokens issued to OAuth clients. Scope: ORGANIZATION_REPORTS_READ.

analyticsSignInTokenCreate(input: AnalyticsSignInTokenCreateInput!): AnalyticsSignInTokenCreatePayload! @auth(only: USER)

organizationAnalyticsProvision

Sets analytics up for an organization: everything the organization's members need to sign into analytics. Running it again sets up only what is missing. Scope: ORGANIZATION_REPORTS_READ.

organizationAnalyticsProvision(input: OrganizationAnalyticsProvisionInput!): OrganizationAnalyticsProvisionPayload! @auth(only: USER)

Types

AnalyticsSignInTokenCreateInput

"""The input of `analyticsSignInTokenCreate`."""
input AnalyticsSignInTokenCreateInput {
  """The ID of the organization whose reports the user opens."""
  organizationId: ID!
}

AnalyticsSignInTokenCreatePayload

"""The result of `analyticsSignInTokenCreate`."""
type AnalyticsSignInTokenCreatePayload {
  """
  The signed token analytics accepts in exchange for a session. It expires after five minutes.
  """
  token: String!
}

AnalyticsProvisioningStatus

"""Whether an organization's members can sign into analytics."""
enum AnalyticsProvisioningStatus {
  """Analytics is still being set up for the organization."""
  PENDING
  """Members can sign into analytics."""
  READY
  """
  The last attempt to set analytics up failed. Running `organizationAnalyticsProvision` retries it.
  """
  FAILED
}

OrganizationAnalyticsProvisioning

"""How far analytics is set up for an organization."""
type OrganizationAnalyticsProvisioning {
  """The organization's status."""
  status: AnalyticsProvisioningStatus!
}

OrganizationAnalyticsCollection

"""The organization's shared analytics collection."""
type OrganizationAnalyticsCollection {
  """The collection's ID in Picked Analytics."""
  id: Int!
}

Organization (extension)

extend type Organization {
  """How far analytics is set up for the organization."""
  analyticsProvisioning: OrganizationAnalyticsProvisioning!
  """
  The organization's shared analytics collection, or null until analytics is set up.
  Scope: `ORGANIZATION_REPORTS_READ`.
  """
  analyticsCollection: OrganizationAnalyticsCollection
}

OrganizationAnalyticsProvisionInput

"""The input of `organizationAnalyticsProvision`."""
input OrganizationAnalyticsProvisionInput {
  """The ID of the organization to set analytics up for."""
  organizationId: ID!
}

OrganizationAnalyticsProvisionPayload

"""The result of `organizationAnalyticsProvision`."""
type OrganizationAnalyticsProvisionPayload {
  """How far analytics is set up after the attempt."""
  analyticsProvisioning: OrganizationAnalyticsProvisioning!
}