Skip to content

StarmindClient

Attributes

UserId module-attribute

UserId = str

Language module-attribute

Language = Literal['de', 'en', 'es', 'fr', 'hr', 'it', 'pt', 'ro', 'xx', 'zh']

ExpertConceptScores module-attribute

ExpertConceptScores = List[Dict[str, Any]]

Classes

FindExpertsInput dataclass

FindExpertsInput(language: Optional[Language] = None, text_query: Optional[str] = None)

Find experts

Attributes

text_query class-attribute instance-attribute
text_query: Optional[str] = None

Primary search text to identify experts. Can be a question, a summary of a text, one or multiple topics.

FindExpertsResponse dataclass

FindExpertsResponse(experts: Optional[List[Dict[str, Any]]] = None, label_matches: Optional[List[ConceptLabelMatch]] = None)

Response for Find experts

Attributes

experts class-attribute instance-attribute
experts: Optional[List[Dict[str, Any]]] = None

List of experts matching the search query. May be empty if no experts are found.

label_matches class-attribute instance-attribute
label_matches: Optional[List[ConceptLabelMatch]] = None

The matched labels for the expert search query. May be empty if no labels match.

FindQuestionsResponse dataclass

FindQuestionsResponse(links: Optional[Dict[str, Any]] = None, items: Optional[List[Question]] = None, total: Optional[int] = None)

Response for Find questions

Attributes

links: Optional[Dict[str, Any]] = field(default=None, metadata={'wire_name': '_links'})

_links

items class-attribute instance-attribute
items: Optional[List[Question]] = None

Paginated results of the question search.

total class-attribute instance-attribute
total: Optional[int] = None

Total number of questions matching the request.

GraphQLUserResponse dataclass

GraphQLUserResponse(data: Optional[Dict[str, Any]] = None, errors: Optional[List[GraphQLError]] = None)

Response for Get user by id

Attributes

errors class-attribute instance-attribute
errors: Optional[List[GraphQLError]] = None

Optional array of GraphQL errors; only present if errors occurred

PostQuestionDraftInput dataclass

PostQuestionDraftInput(category: Optional[int] = None, title: Optional[str] = None, description: Optional[str] = None, language: Optional[Language] = None, knowledge_space: Optional[int] = None)

Create a question draft

Attributes

category class-attribute instance-attribute
category: Optional[int] = None

The optional id of the category to assign the question draft to

title class-attribute instance-attribute
title: Optional[str] = None

Question title, Between 4 and 100 characters by default. Depending on the network configuration the title max length may be limited or extended further.

description class-attribute instance-attribute
description: Optional[str] = None

The optional question description providing detailed context and information about the question. Depending on the network configuration the description might be enforced to be non-empty.

knowledge_space class-attribute instance-attribute
knowledge_space: Optional[int] = None

the id of the knowledge space to assign the question to

Question dataclass

Question(knowledge_space_id: Optional[int] = None, upvote_count: Optional[int] = None, view_count: Optional[int] = None, published: Optional[str] = None, is_deleted: Optional[bool] = None, title: Optional[str] = None, last_activity: Optional[str] = None, is_published: Optional[bool] = None, created: Optional[str] = None, description: Optional[str] = None, solution_count: Optional[int] = None, content_updated: Optional[str] = None, id: Optional[int] = None, updated: Optional[str] = None, language: Optional[str] = None)

Response for Create a question draft

Attributes

knowledge_space_id class-attribute instance-attribute
knowledge_space_id: Optional[int] = None

The unique knowledge space id to which the question belongs.

upvote_count class-attribute instance-attribute
upvote_count: Optional[int] = None

The total number of upvotes the question has received.

view_count class-attribute instance-attribute
view_count: Optional[int] = None

The number of times the question has been viewed by users.

published class-attribute instance-attribute
published: Optional[str] = None

Timestamp indicating when the question was published (yyyy-MM-ddTHH:mm:ss.fffZ)

is_deleted class-attribute instance-attribute
is_deleted: Optional[bool] = None

Indicates if the question is deleted. Deleted questions are not visible to users, but can still be accessed by the administrators.

title class-attribute instance-attribute
title: Optional[str] = None

The question title

last_activity class-attribute instance-attribute
last_activity: Optional[str] = None

Timestamp indicating the last activity with the question (yyyy-MM-ddTHH:mm:ss.fffZ)

is_published class-attribute instance-attribute
is_published: Optional[bool] = None

The question is_published flag indicates whether the question is published or not. A published solution is visible to all users, while an unpublished solution is in draft state only visible to the author.

created class-attribute instance-attribute
created: Optional[str] = None

Timestamp indicating when the question was created (yyyy-MM-ddTHH:mm:ss.fffZ)

description class-attribute instance-attribute
description: Optional[str] = None

Question description providing detailed context and information about the question

solution_count class-attribute instance-attribute
solution_count: Optional[int] = None

This is the number of solutions that have been provided for this question.

content_updated class-attribute instance-attribute
content_updated: Optional[str] = None

Timestamp indicating when the question's content or attachments were last updated (yyyy-MM-ddTHH:mm:ss.fffZ)

id class-attribute instance-attribute
id: Optional[int] = None

The unique question id

updated class-attribute instance-attribute
updated: Optional[str] = None

Last time the resource has been updated in the DB. This date does not reflect content updates but any update to any fields of the record. Use content_updated for information about content updates.

language class-attribute instance-attribute
language: Optional[str] = None

The question language

PublishQuestionDraftResponse dataclass

PublishQuestionDraftResponse(number_of_experts: Optional[int] = None)

Response for Publish a question

Attributes

number_of_experts class-attribute instance-attribute
number_of_experts: Optional[int] = None

number_of_experts

QuestionComplete dataclass

QuestionComplete(knowledge_space_id: Optional[int] = None, upvote_count: Optional[int] = None, view_count: Optional[int] = None, published: Optional[str] = None, is_deleted: Optional[bool] = None, title: Optional[str] = None, last_activity: Optional[str] = None, is_published: Optional[bool] = None, created: Optional[str] = None, description: Optional[str] = None, solution_count: Optional[int] = None, content_updated: Optional[str] = None, id: Optional[int] = None, updated: Optional[str] = None, language: Optional[str] = None, source: Optional[str] = None, concepts: Optional[List[ConceptLabelMatch]] = None, knowledge_space: Optional[KnowledgeSpace] = None, solutions: Optional[List[Solution]] = None, attachments: Optional[List[Attachment]] = None, comments: Optional[List[Comment]] = None)

Definition: QuestionComplete

Attributes

knowledge_space_id class-attribute instance-attribute
knowledge_space_id: Optional[int] = None

The unique knowledge space id to which the question belongs.

upvote_count class-attribute instance-attribute
upvote_count: Optional[int] = None

The total number of upvotes the question has received.

view_count class-attribute instance-attribute
view_count: Optional[int] = None

The number of times the question has been viewed by users.

published class-attribute instance-attribute
published: Optional[str] = None

Timestamp indicating when the question was published (yyyy-MM-ddTHH:mm:ss.fffZ)

is_deleted class-attribute instance-attribute
is_deleted: Optional[bool] = None

Indicates if the question is deleted. Deleted questions are not visible to users, but can still be accessed by the administrators.

title class-attribute instance-attribute
title: Optional[str] = None

The question title

last_activity class-attribute instance-attribute
last_activity: Optional[str] = None

Timestamp indicating the last activity with the question (yyyy-MM-ddTHH:mm:ss.fffZ)

is_published class-attribute instance-attribute
is_published: Optional[bool] = None

The question is_published flag indicates whether the question is published or not. A published solution is visible to all users, while an unpublished solution is in draft state only visible to the author.

created class-attribute instance-attribute
created: Optional[str] = None

Timestamp indicating when the question was created (yyyy-MM-ddTHH:mm:ss.fffZ)

description class-attribute instance-attribute
description: Optional[str] = None

Question description providing detailed context and information about the question

solution_count class-attribute instance-attribute
solution_count: Optional[int] = None

This is the number of solutions that have been provided for this question.

content_updated class-attribute instance-attribute
content_updated: Optional[str] = None

Timestamp indicating when the question's content or attachments were last updated (yyyy-MM-ddTHH:mm:ss.fffZ)

id class-attribute instance-attribute
id: Optional[int] = None

The unique question id

updated class-attribute instance-attribute
updated: Optional[str] = None

Last time the resource has been updated in the DB. This date does not reflect content updates but any update to any fields of the record. Use content_updated for information about content updates.

language class-attribute instance-attribute
language: Optional[str] = None

The question language

source class-attribute instance-attribute
source: Optional[str] = None

source

concepts class-attribute instance-attribute
concepts: Optional[List[ConceptLabelMatch]] = None

The assigned question concepts

knowledge_space class-attribute instance-attribute
knowledge_space: Optional[KnowledgeSpace] = None

The assigned question knowledge space

solutions class-attribute instance-attribute
solutions: Optional[List[Solution]] = None

The question solutions

attachments class-attribute instance-attribute
attachments: Optional[List[Attachment]] = None

The question attachments

comments class-attribute instance-attribute
comments: Optional[List[Comment]] = None

The question comments

ConceptLabelMatch dataclass

ConceptLabelMatch(concept_id: Optional[str] = None, description: Optional[str] = None, is_flat: Optional[bool] = None, label_match: Optional[str] = None, language: Optional[str] = None, ontology_id: Optional[str] = None, primary_label: Optional[str] = None)

Definition: ConceptLabelMatch

Attributes

concept_id class-attribute instance-attribute
concept_id: Optional[str] = None

The unique concept id

description class-attribute instance-attribute
description: Optional[str] = None

The concept description

is_flat class-attribute instance-attribute
is_flat: Optional[bool] = None

is_flat

label_match class-attribute instance-attribute
label_match: Optional[str] = None

The label that matched the concept

language class-attribute instance-attribute
language: Optional[str] = None

Concept language

ontology_id class-attribute instance-attribute
ontology_id: Optional[str] = None

The unique ontology id to which the concept belongs

primary_label class-attribute instance-attribute
primary_label: Optional[str] = None

Concept primary label

Attachment dataclass

Attachment(created: Optional[str] = None, hash: Optional[str] = None, id: Optional[int] = None, link: Optional[str] = None, mime_type: Optional[str] = None, name: Optional[str] = None, size: Optional[int] = None)

Definition: Attachment

Attributes

created class-attribute instance-attribute
created: Optional[str] = None

Timestamp indicating when the attachment was created (yyyy-MM-ddTHH:mm:ss.fffZ)

hash class-attribute instance-attribute
hash: Optional[str] = None

The attachment hash

id class-attribute instance-attribute
id: Optional[int] = None

the unique attachment id

link: Optional[str] = None

The relative url to the attachment resource

mime_type class-attribute instance-attribute
mime_type: Optional[str] = None

The attachment file mime_type

name class-attribute instance-attribute
name: Optional[str] = None

The attachment file name

size class-attribute instance-attribute
size: Optional[int] = None

The attachment file size

Comment dataclass

Comment(content_updated: Optional[str] = None, created: Optional[str] = None, description: Optional[str] = None, id: Optional[int] = None, language: Optional[str] = None, updated: Optional[str] = None, upvote_count: Optional[int] = None, user: Optional[UserLegacy] = None)

Definition: Comment

Attributes

content_updated class-attribute instance-attribute
content_updated: Optional[str] = None

Timestamp indicating when the comment's description was last updated (yyyy-MM-ddTHH:mm:ss.fffZ)

created class-attribute instance-attribute
created: Optional[str] = None

Timestamp indicating when the comment was created (yyyy-MM-ddTHH:mm:ss.fffZ)

description class-attribute instance-attribute
description: Optional[str] = None

This is the main text of the comment that provides additional information or context to the question or solution.

id class-attribute instance-attribute
id: Optional[int] = None

The unique comment id

language class-attribute instance-attribute
language: Optional[str] = None

The comment language

updated class-attribute instance-attribute
updated: Optional[str] = None

Last time the resource has been updated in the DB. This date does not reflect content updates but any update to any fields of the record. Use content_updated for information about content updates.

upvote_count class-attribute instance-attribute
upvote_count: Optional[int] = None

The number of upvotes the comment has received.

Solution dataclass

Solution(accepted_by_question_poser: Optional[str] = None, attachments: Optional[List[Attachment]] = None, comments: Optional[List[Comment]] = None, content_updated: Optional[str] = None, created: Optional[str] = None, description: Optional[str] = None, expires: Optional[str] = None, id: Optional[int] = None, is_published: Optional[bool] = None, language: Optional[str] = None, published: Optional[str] = None, rating_count: Optional[int] = None, solution_authority_approval: Optional[SolutionAuthorityApproval] = None, updated: Optional[str] = None, upvote_count: Optional[int] = None, user: Optional[UserLegacy] = None, validated: Optional[SolutionValidation] = None, validity_period: Optional[str] = None)

Definition: Solution

Attributes

accepted_by_question_poser class-attribute instance-attribute
accepted_by_question_poser: Optional[str] = None

Timestamp indicating whether the solution has been accepted by the question poser (yyyy-MM-ddTHH:mm:ss.fffZ)

attachments class-attribute instance-attribute
attachments: Optional[List[Attachment]] = None

The solution attachments

comments class-attribute instance-attribute
comments: Optional[List[Comment]] = None

The solution comments

content_updated class-attribute instance-attribute
content_updated: Optional[str] = None

Timestamp indicating when the solution's content was last updated (yyyy-MM-ddTHH:mm:ss.fffZ)

created class-attribute instance-attribute
created: Optional[str] = None

Timestamp indicating when the solution was created (yyyy-MM-ddTHH:mm:ss.fffZ)

description class-attribute instance-attribute
description: Optional[str] = None

This is the main text of the solution that provides the answer or guidance to the question posed.

expires class-attribute instance-attribute
expires: Optional[str] = None

Timestamp indicating when the solution is about to expiry and requires revalidation (yyyy-MM-ddTHH:mm:ss.fffZ)

id class-attribute instance-attribute
id: Optional[int] = None

the unique solution id

is_published class-attribute instance-attribute
is_published: Optional[bool] = None

The solution is_published flag indicates whether the solution is published or not. A published solution is visible to all users.

language class-attribute instance-attribute
language: Optional[str] = None

The solution language

published class-attribute instance-attribute
published: Optional[str] = None

Timestamp indicating when the solution was published (yyyy-MM-ddTHH:mm:ss.fffZ)

rating_count class-attribute instance-attribute
rating_count: Optional[int] = None

Total number of ratings for the solution.

updated class-attribute instance-attribute
updated: Optional[str] = None

Last time the resource has been updated in the DB. This date does not reflect content updates but any update to any fields of the record. Use content_updated for information about content updates.

upvote_count class-attribute instance-attribute
upvote_count: Optional[int] = None

The total number of upvotes the solution has received.

user class-attribute instance-attribute
user: Optional[UserLegacy] = None

The user who created the solution

validity_period class-attribute instance-attribute
validity_period: Optional[str] = None

Validity period until the solution is considered expired

SolutionValidation dataclass

SolutionValidation(revalidated_at: Optional[str] = None, validity_period: Optional[str] = None, user: Optional[UserLegacy] = None)

Definition: SolutionValidation

Attributes

revalidated_at class-attribute instance-attribute
revalidated_at: Optional[str] = field(default=None, metadata={'wire_name': 'revalidatedAt'})

The date when the solution was revalidated

validity_period class-attribute instance-attribute
validity_period: Optional[str] = field(default=None, metadata={'wire_name': 'validityPeriod'})

The validity period until the solution is considered expired

user class-attribute instance-attribute
user: Optional[UserLegacy] = None

The user who validated the solution

SolutionAuthorityApproval dataclass

SolutionAuthorityApproval(approval_date: Optional[str] = None, solution_authority_id: Optional[int] = None, solution_authority_name: Optional[str] = None, user: Optional[UserLegacy] = None)

Definition: SolutionAuthorityApproval

Attributes

approval_date class-attribute instance-attribute
approval_date: Optional[str] = None

Date of the solution authority approval (yyyy-MM-ddTHH:mm:ss.fffZ)

solution_authority_id class-attribute instance-attribute
solution_authority_id: Optional[int] = None

ID of the solution authority

solution_authority_name class-attribute instance-attribute
solution_authority_name: Optional[str] = None

Name of the solution authority

UserLegacy dataclass

UserLegacy(email: Optional[str] = None, global_user_id: Optional[str] = None, image: Optional[str] = None, firstname: Optional[str] = None, lastname: Optional[str] = None)

Definition: UserLegacy

Attributes

email class-attribute instance-attribute
email: Optional[str] = None

email

global_user_id class-attribute instance-attribute
global_user_id: Optional[str] = field(default=None, metadata={'wire_name': 'globalUserId'})

global_user_id

image class-attribute instance-attribute
image: Optional[str] = None

image

firstname class-attribute instance-attribute
firstname: Optional[str] = None

firstname

lastname class-attribute instance-attribute
lastname: Optional[str] = None

lastname

User dataclass

User(about: Optional[str] = None, avatar_url: Optional[str] = None, company: Optional[str] = None, country: Optional[str] = None, created: Optional[str] = None, deleted: Optional[str] = None, department: Optional[str] = None, email: Optional[str] = None, first_name: Optional[str] = None, first_seen: Optional[str] = None, id: Optional[UserId] = None, is_federated: Optional[bool] = None, is_technical: Optional[bool] = None, language: Optional[Language] = None, last_name: Optional[str] = None, location: Optional[str] = None, position: Optional[str] = None)

Definition: User

Attributes

about class-attribute instance-attribute
about: Optional[str] = None

Custom text entered by the user to describe themselves in their 'About Me' section

avatar_url class-attribute instance-attribute
avatar_url: Optional[str] = None

URL to the user's avatar image

company class-attribute instance-attribute
company: Optional[str] = None

Company of the user

country class-attribute instance-attribute
country: Optional[str] = None

ISO 3166-1 alpha-2 country code (e.g. ch, us, de) of the user

created class-attribute instance-attribute
created: Optional[str] = None

Timestamp indicating when the user was created (yyyy-MM-ddTHH:mm:ss.fffZ)

deleted class-attribute instance-attribute
deleted: Optional[str] = None

Timestamp indicating when the user was deleted (yyyy-MM-ddTHH:mm:ss.fffZ). Without admin permissions, only non deleted user will be returned

department class-attribute instance-attribute
department: Optional[str] = None

Department of the user

email class-attribute instance-attribute
email: Optional[str] = None

Email of the user

first_name class-attribute instance-attribute
first_name: Optional[str] = None

First name of the user.

first_seen class-attribute instance-attribute
first_seen: Optional[str] = None

Timestamp indicating when the user logged in the first time (yyyy-MM-ddTHH:mm:ss.fffZ)

is_federated class-attribute instance-attribute
is_federated: Optional[bool] = None

Indicates whether the user authenticates using local credentials (email/password) rather than an external SSO provider (SAML, OpenID Connect)

is_technical class-attribute instance-attribute
is_technical: Optional[bool] = None

Indicates whether the user is a technical API user (non-interactive/machine account); when true the user typically authenticates via API key

language class-attribute instance-attribute
language: Optional[Language] = None

The user's interface language preference

last_name class-attribute instance-attribute
last_name: Optional[str] = None

Last name of the user.

location class-attribute instance-attribute
location: Optional[str] = None

Location of the user

position class-attribute instance-attribute
position: Optional[str] = None

Company of the user

KnowledgeSpace dataclass

KnowledgeSpace(automatic_new_user_assignment: Optional[bool] = None, created: Optional[str] = None, description: Optional[str] = None, id: Optional[int] = None, is_closed: Optional[bool] = None, member_count: Optional[int] = None, name: Optional[str] = None, updated: Optional[str] = None)

Definition: KnowledgeSpace

Attributes

automatic_new_user_assignment class-attribute instance-attribute
automatic_new_user_assignment: Optional[bool] = None

Indicates if new users are automatically assigned

created class-attribute instance-attribute
created: Optional[str] = None

Timestamp indicating when the knowledge space was created (yyyy-MM-ddTHH:mm:ss.fffZ)

description class-attribute instance-attribute
description: Optional[str] = None

Description of the knowledge space

id class-attribute instance-attribute
id: Optional[int] = None

The unique knowledge space id

is_closed class-attribute instance-attribute
is_closed: Optional[bool] = None

Indicates if the knowledge space is non public

member_count class-attribute instance-attribute
member_count: Optional[int] = None

Number of members

name class-attribute instance-attribute
name: Optional[str] = None

Name of the knowledge space

updated class-attribute instance-attribute
updated: Optional[str] = None

Last time the resource has been updated in the DB.

GraphQLError dataclass

GraphQLError(extensions: Optional[Dict[str, Any]] = None, locations: Optional[List[Dict[str, Any]]] = None, message: Optional[str] = None, path: Optional[List[str]] = None)

Definition: GraphQLError

StarmindClient

StarmindClient(connection_runtime_url: str, token_provider: Optional[TokenProvider] = None, options: Optional[ConnectorClientOptions] = None)

Bases: ConnectorClientBase

Typed client for starmind connector.

Initialize a StarmindClient.

Parameters:

Name Type Description Default
connection_runtime_url str

The connection runtime URL from Azure Portal.

required
token_provider Optional[TokenProvider]

Optional token provider. Defaults to ManagedIdentityTokenProvider.

None
options Optional[ConnectorClientOptions]

Optional connector client options.

None

Methods:

find_experts_async async
find_experts_async(input: FindExpertsInput) -> dict[str, Any] | None

Find experts

Finds experts based on the provided text_query. The search leverages the knowledge graph to identify users with relevant expertise and knowledge related to the query. Provide the optional language to specify the preferred language for concept label filtering. This does not affect the search matching itself; it only filters which expertise we show from returned users by selecting concepts based on the primary label in the chosen language. Returned concepts are deduplicated when multiple concepts share the same primary label.

find_questions_async async
find_questions_async(query: Optional[str] = None, limit: Optional[int] = None, filter: Optional[str] = None, sort: Optional[str] = None) -> dict[str, Any] | None

Find questions

Searches questions using optional query, limit (default 10), filter, and sort; returns a paginated collection with question items. By default, all published questions are returned, ordered by their last activity (descending). A combination of filters, search queries and ordering criteria can be applied to the result.

get_user_by_id_async async
get_user_by_id_async(id: str) -> dict[str, Any] | None

Get user by id

Retrieves user information based on the provided user id.

post_question_draft_async async
post_question_draft_async(input: PostQuestionDraftInput) -> dict[str, Any] | None

Create a question draft

Creates a new question draft. The draft is not yet searchable or answerable by others. After creation, publish the draft (via the publish endpoint) to trigger expert search, make the question discoverable, and allow other users to answer it. Providing the optional description helps experts understand the question better and increases the chances of getting high-quality answers.

publish_question_draft_async async
publish_question_draft_async(question_id: int) -> dict[str, Any] | None

Publish a question

Publishes a question draft. Publishing the question triggers expert search, makes the question discoverable, and allows other users to answer it. Questions are always published anonymously.