V1 to V2 mapping

If you are currently using the Dialogflow V1 API, the following tables compare the V1 and V2 properties.

Query

V1 V2
/query detectIntent

Request

V1 V2
Request JSON Request Body

Fields

V1 V2
event (e) queryInput.event
event.name queryInput.event.name
event.data queryInput.event.parameters
v Not applicable.
sessionId session (Path parameter)
lang queryInput.text.languageCode (for text queries), queryInput.audioConfig.languageCode (for audio queries)
contexts queryParams.contexts
contexts.name queryParams.contexts.name
contexts.parameters queryParams.contexts.parameters
contexts.lifespan queryParams.contexts.lifespanCount
resetContexts queryParams.resetContexts
entities queryParams.sessionEntityTypes
timezone queryParams.timeZone
location queryParams.geoLocation
location.latitude queryParams.geoLocation.latitude
location.longitude queryParams.geoLocation.longitude
originalRequest queryParams.payload

Response

V1 V2
Response JSON Response Body

Fields

V1 V2
id responseId
timestamp Not applicable.
lang Not applicable.
result queryResult
result.source Not applicable.
result.resolvedQuery queryResult.queryText
result.action queryResult.action
result.actionIncomplete queryResult.allRequiredParamsCollected
result.parameters queryResult.parameters
result.contexts queryResult.outputContexts
result.contexts.name queryResult.outputContexts.name
result.contexts.parameters queryResult.outputContexts.parameters
result.contexts.lifespan queryResult.outputContexts.lifespanCount
result.fulfillment queryResult.fulfillment
result.fulfillment.speech queryResult.fulfillment.text
result.fulfillment.messages queryResult.fulfillment.messages
result.score queryResult.intentDetectionConfidence
result.metadata queryResult.intent
result.metadata.intentId queryResult.intent.name
result.metadata.webhookUsed queryResult.intent.webhookState
result.metadata.webhookForSlotFillingUsed queryResult.intent.webhookState
result.metadata.webhookResponseTime queryResult.diagnosticInfo.webhookLatencySeconds
result.metadata.intentName queryResult.intent.displayName
status Status, queryResult.webhookStatus
sessionId Not applicable.

/entities

V1 V2
/entities entityTypes

Entity Object

V1 V2
Entity EntityType

Fields

V1 V2
id name
name displayName
entries entities
entries.value entities.value
entries.synonyms entities.synonyms
isEnum kind
automatedExpansion autoExpansionMode

/userEntities

V1 V2
/userEntities sessions.entityTypes

User Entity Object

V1 V2
User Entity SessionEntityType

Fields

V1 V2
sessionId Session Id (Path parameter)
name name
extend entityOverrideMode
entries entities

/intents

V1 V2
/intents intents

Intent Object

V1 V2
Intent Intent

Fields

V1 V2
id name
name displayName
auto mlEnabled
contexts inputContexts
templates Not applicable.
userSays trainingPhrases
userSays.id trainingPhrases.name
userSays.data trainingPhrases.parts
userSays.data.text trainingPhrases.parts.text
userSays.data.meta trainingPhrases.entityType
userSays.data.alias trainingPhrases.parts.alias
userSays.data.userDefined trainingPhrases.parts.userDefined
userSays.isTemplate trainingPhrases.type
userSays.count trainingPhrases.timesAddedCount
responses result
responses.action result.action
responses.resetContexts result.resetContexts
responses.affectedContexts result.outputContexts
responses.affectedContexts.name result.outputContexts.name
responses.affectedContextslifespan result.outputContexts.lifespanCount
responses.parameters result.parameters
responses.parameters.name result.parameters.displayName
responses.parameters.value result.parameters.value
responses.parameters.defaultValue result.parameters.defaultValue
responses.parameters.required result.parameters.mandatory
responses.parameters.dataType result.parameters.entityTypeDisplayName
responses.parameters.prompts result.parameters.prompts
responses.parameters.isList result.parameters.isList
responses.messages result.messages
responses.defaultResponsePlatforms result.defaultResponsePlatforms
priority priority
webhookUsed webhookState
webhookForSlotFilling webhookState
fallbackIntent isFallback
cortanaCommand Not applicable.
events events
events.name Not applicable.

/contexts

V1 V2
/contexts sessions.contexts

Context object

V1 V2
Context Context

Fields

V1 V2
name name
lifespan lifespanCount
parameters parameters

Message objects

Text message object

V1 V2
Text Text

Fields

V1 V2
type Not applicable
speech text

Image message object

V1 V2
Image Image

Fields

V1 V2
type Not applicable.
imageUrl imageUri

Card message object

V1 V2
Card Card

Fields

V1 V2
type Not applicable.
title title
subtitle subtitle
buttons buttons
buttons.text buttons.text
buttons.postback buttons.postback

Quick replies message object

V1 V2
Quick Replies QuickReplies

Fields

V1 V2
type Not applicable.
title title
replies quickReplies

Custom payload message object

Not applicable.