Overview
We've now covered the foundations, queries, and mutations in our previous articles about the SparkThink API. In this article, we will list the individual objects listed in the SparkThink API (this is our SparkThink API public schema).
interface Activity {
id: ID!
content: ActivityContent
metadata: Metadata
}
interface ActivityContent {
title: String
}
interface AnswerOption {
id: ID!
label: String
}
type AnswerSelection {
id: ID!
label: String
additionalUserInput: String
}
type Assessment implements Project {
id: ID!
clientName: String
coverImageUrl: String
description: String
metadata: Metadata
status: Status
theme: String
title: String
teamMembers: [ProjectUser!]!
responses(first: Int = 100, after: String): ResponseReturn
respondents(first: Int = 100, after: String): RespondentReturn
}
type Attribute {
name: String
value: String
}
input AttributeInput {
name: String!
value: String!
}
type Brainstorm implements Activity {
id: ID!
content: BrainstormContent
displayMode: BrainstormDisplayMode
metadata: Metadata
}
type BrainstormContent implements ActivityContent {
title: String
attribution: Boolean
}
enum BrainstormDisplayMode {
FITTOSCREEN
NEWEST
TICKER
}
type Collector {
id: ID!
status: String
type: String
displayName: String
completedUsers: Int
inProgressUsers: Int
invitedUsers: Int
notStartedUsers: Int
totalUsers: Int
respondents: [SurveyRespondent!]!
surveyLink: String
testMode: Boolean
}
enum CollectorType {
SlalomLink
AnonymousLink
Email
SlalomEmail
}
enum CompareOperator {
EQUALTO
NOTEQUALTO
GREATERTHAN
LESSTHAN
GREATERTHANEQUALTO
LESSTHANEQUALTO
ISSELECTED
NOTSELECTED
ISWITHIN
}
input ContactDetailsByEmail {
firstName: String!
lastName: String!
email: String!
attributes: [AttributeInput!]
}
input ContactDetailsByID {
contactId: String!
attributes: [AttributeInput!]
}
type Evaluation implements Activity {
id: ID!
content: EvaluationContent
displayMode: EvaluationDisplayMode
metadata: Metadata
}
type EvaluationContent implements ActivityContent {
answers: [GenericAnswerOption]
questions: [GenericAnswerOption]
title: String
}
enum EvaluationDisplayMode {
GLOBAL
TOPSIX
BOTTOMSIX
}
type GenericAnswerOption implements AnswerOption {
id: ID!
label: String
}
type ListResponse implements Response {
id: ID!
active: Boolean
locale: String
metadata: Metadata
questionId: ID!
collectorId: ID!
value: [String]
}
type Logic {
otherwiseLogicRule: LogicAction
postLogicRules: [LogicRule]
preLogicRules: [LogicRule]
}
type LogicAction {
contextItemId: String
contextItemType: String
targetItemId: String
targetItemType: String
verb: Verb
}
type LogicCondition {
compareOperator: CompareOperator
compareValue: String
compareMin: Int
compareMax: Int
contextItemId: String
contextItemType: String
sourceItemId: String
sourceItemType: String
}
type LogicRule {
logicRuleId: ID!
action: LogicAction
condition: LogicCondition
}
type MatrixColumn implements AnswerOption {
id: ID!
followUpQuestion: String
hasFollowUp: Boolean
label: String
}
type MatrixQuestion implements Question {
id: ID!
content: MatrixQuestionContent
hidden: Boolean
logic: Logic
metadata: Metadata
required: Boolean
}
type MatrixQuestionContent implements QuestionContent {
backgroundImageUrl: String
columns: [MatrixColumn]
description: String
moreInfoText: String
rows: [MatrixRow]
title: String
}
type MatrixRow {
id: ID!
title: String
description: String
}
type Metadata {
createdBy: ProjectUser
createdUTC: String
lastModifiedUTC: String
}
type MultipleChoiceContent implements QuestionContent {
allowMultiple: Boolean
answers: [GenericAnswerOption]
backgroundImageUrl: String
description: String
maxSelectionCount: Int
moreInfoText: String
showOther: Boolean
title: String
}
type MultipleChoiceQuestion implements Question {
id: ID!
content: MultipleChoiceContent
hidden: Boolean
logic: Logic
metadata: Metadata
required: Boolean
}
type MultipleChoiceStackContent implements QuestionContent {
allowMultiple: Boolean
answers: [GenericAnswerOption]
backgroundImageUrl: String
description: String
maxSelectionCount: String
moreInfoText: String
showOther: Boolean
subQuestions: [MultipleChoiceStackSubQuestion]
title: String
}
type MultipleChoiceStackQuestion implements Question {
id: ID!
content: MultipleChoiceStackContent
hidden: Boolean
logic: Logic
metadata: Metadata
required: Boolean
}
type MultipleChoiceStackSubQuestion {
id: ID!
title: String
description: String
}
type Mutation {
addSurveyRespondentByExternalId(
surveyId: ID!
collectorId: ID!
contacts: [ContactDetailsByID!]!
): [SurveyLinkById!]!
addSurveyRespondentByEmail(
surveyId: ID!
collectorId: ID!
contacts: [ContactDetailsByEmail!]!
): [SurveyLinkByEmail!]!
createCollector(
surveyId: ID!
collectorName: String!
collectorType: CollectorType
): NewCollectorResponse!
}
type NestedOption {
id: ID!
label: String
value: [AnswerSelection]
}
type NestedOptionResponse implements Response {
id: ID!
active: Boolean
locale: String
metadata: Metadata
options: [NestedOption]
questionId: ID!
collectorId: ID!
}
type NewCollectorResponse {
surveyId: ID!
collectorId: String!
collectorName: String!
status: String!
url: String
}
type NPSLabels {
left: String
right: String
}
type NPSQuestion implements Question {
id: ID!
content: NPSQuestionContent
hidden: Boolean
logic: Logic
metadata: Metadata
required: Boolean
}
type NPSQuestionContent implements QuestionContent {
backgroundImageUrl: String
description: String
labels: NPSLabels
showLabels: Boolean
title: String
}
type NumericResponse implements Response {
id: ID!
active: Boolean
locale: String
metadata: Metadata
questionId: ID!
collectorId: ID!
value: Int
}
type OptionResponse implements Response {
id: ID!
active: Boolean
locale: String
metadata: Metadata
questionId: ID!
collectorId: ID!
value: [AnswerSelection]
}
type PageInfo {
hasNextPage: Boolean
}
type Poll implements Activity {
id: ID!
content: PollContent
displayMode: PollDisplayMode
metadata: Metadata
}
type PollContent implements ActivityContent {
answers: [GenericAnswerOption]
title: String
}
enum PollDisplayMode {
PERCENTAGE
NUMBER
}
interface Project {
id: ID!
clientName: String
coverImageUrl: String
description: String
metadata: Metadata
status: Status
theme: String
title: String
teamMembers: [ProjectUser!]!
responses(first: Int = 100, after: String): ResponseReturn
respondents(first: Int = 100, after: String): RespondentReturn
}
enum ProjectType {
Survey
Workshop
Assessment
}
type ProjectUser {
id: ID!
name: String
email: String
role: String
}
type Query {
project(id: ID!, type: ProjectType): Project
projects(titleContains: String, type: ProjectType): [Project]
me: User
}
interface Question {
id: ID!
content: QuestionContent
hidden: Boolean
logic: Logic
metadata: Metadata
}
interface QuestionContent {
backgroundImageUrl: String
description: String
title: String
}
type RankingQuestion implements Question {
id: ID!
content: RankingQuestionContent
hidden: Boolean
logic: Logic
metadata: Metadata
required: Boolean
}
type RankingQuestionContent implements QuestionContent {
answers: [GenericAnswerOption]
backgroundImageUrl: String
description: String
randomizeAnswers: Boolean
showOther: Boolean
title: String
}
type RatingQuestion implements Question {
id: ID!
content: RatingQuestionContent
hidden: Boolean
logic: Logic
metadata: Metadata
required: Boolean
}
type RatingQuestionContent implements QuestionContent {
backgroundImageUrl: String
description: String
scaleType: String
steps: Int
title: String
}
type Respondent {
userId: ID!
attributes: [RespondentAttribute!]!
name: String
email: String
collectorId: ID!
collectorTitle: String
projectId: ID!
status: RespondentStatus!
}
type RespondentAttribute {
key: String
value: String
}
type RespondentEdge {
node: Respondent
cursor: String
}
type RespondentReturn {
edges: [RespondentEdge]
pageInfo: PageInfo
}
enum RespondentStatus {
Added
Invited
Started
Completed
Bounced
Testing
Error
Queue
Queueing
Removed
}
interface Response {
id: ID!
active: Boolean
locale: String
metadata: Metadata
questionId: ID!
collectorId: ID!
}
type ResponseEdge {
node: Response
cursor: String
}
type ResponseMetrics {
completedUsers: Int
inProgressUsers: Int
invitedUsers: Int
}
type ResponseReturn {
edges: [ResponseEdge]
pageInfo: PageInfo
}
type SliderLabels {
left: String
middle: String
right: String
}
type SliderQuestion implements Question {
id: ID!
content: SliderQuestionContent
hidden: Boolean
logic: Logic
metadata: Metadata
required: Boolean
}
type SliderQuestionContent implements QuestionContent {
backgroundImageUrl: String
description: String
labels: SliderLabels
showLabels: Boolean
steps: Int
title: String
}
enum Status {
OPEN
CLOSED
DELETED
}
type Survey implements Project {
id: ID!
clientName: String
coverImageUrl: String
description: String
metadata: Metadata
teamMembers: [ProjectUser!]!
questions: [Question!]!
collectors: [Collector!]!
status: Status
theme: String
title: String
responseMetrics: ResponseMetrics
responses(first: Int = 100, after: String): ResponseReturn
respondents(first: Int = 100, after: String): RespondentReturn
}
type SurveyLinkByEmail {
surveyId: ID!
email: String!
url: String!
}
type SurveyLinkById {
surveyId: ID!
contactId: String!
url: String!
}
type SurveyRespondent {
id: ID!
accessCode: String
givenName: String
surname: String
email: String
status: String
attributes: [Attribute!]!
}
type TextEntryQuestion implements Question {
id: ID!
content: TextEntryQuestionContent
hidden: Boolean
logic: Logic
metadata: Metadata
required: Boolean
}
type TextEntryQuestionContent implements QuestionContent {
backgroundImageUrl: String
description: String
inputs: Int
placeholderText: [GenericAnswerOption]
title: String
}
type TextInput {
id: ID!
userInput: String
}
type TextResponse implements Response {
id: ID!
active: Boolean
locale: String
metadata: Metadata
questionId: ID!
collectorId: ID!
value: [TextInput]
}
type User {
id: ID!
name: String
email: String
projects: [Project!]!
}
enum Verb {
SHOWQUESTION
SKIPQUESTION
SKIPTO
SKIPTOEND
}
type Workshop implements Project {
id: ID!
teamMembers: [ProjectUser!]!
clientName: String
coverImageUrl: String
description: String
metadata: Metadata
status: Status
theme: String
title: String
activities: [Activity!]!
responses(first: Int = 100, after: String): ResponseReturn
participantCount: Int
respondents(first: Int = 100, after: String): RespondentReturn
}
Last updated: May 2, 2022