Get a data form
get
/km/api/v1/dataForms/{id}
This method returns the DataForm object having the specified ID parameter.
Example URIs
The example URIs for this method are as follows:
http://<IM_REST_API_HOST>/km/api/latest/dataForms/{id}
The request returns the DataForm object having specified ID parameter in FULL mode.
http://<IM_REST_API_HOST>/km/api/dataForms/{id}?mode=KEY
The request returns the DataForm object having specified ID parameter in the KEY mode.
Response Errors
- OKDOM-GEN0001
The error occurs when an invalid id has been given.
Request
Path Parameters
-
id: string
The unique identifier of the object to be retrieved.
Response
Supported Media Types
- application/json
- application/xml
200 Response
OK.
Root Schema : DataForm
Type:
object
Title:
Show Source
DataForm
-
dateAdded(optional):
string(date-time)
The date when the DataForm object was created or added
-
dateModified(optional):
string(date-time)
The date when the DataForm object was last modified.
-
displayEndDate(optional):
string(date-time)
DisplayEndDate of the DataForm object
-
displayStartDate(optional):
string(date-time)
DisplayStartDate of the DataForm object
-
emailContent(optional):
boolean
EmailContent of the DataForm object
-
links(optional):
array links
-
name(optional):
string
The name of the data form. The name field can only be used for sorting.
-
questions(optional):
array questions
To Many Relationship to Question
-
ratingType(optional):
integer
Determined whether it is a 5 star or Y/N type of rating
- CUSTOM(0)
- YES(1)
- YES_NO(2)
- THREE_STARS(3)
- FIVE_STARS(4)
-
recordId(optional):
string
The unique record ID of the DataForm object.
-
referenceKey(optional):
string
The reference key for the DataForm object. DataForm objects support multiple languages. This field can be used to identify the associated objects for all languages.
-
user(optional):
object UserKey
Title:
UserKey
-
views(optional):
array views
To Many Relationship to View
Nested Schema : links
Type:
Show Source
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
Nested Schema : questions
Type:
array
To Many Relationship to Question
Show Source
-
Array of:
object DataFormQuestion
Title:
DataFormQuestion
Nested Schema : UserKey
Type:
object
Title:
Show Source
UserKey
-
email(optional):
string
Email of the User object
-
externalId(optional):
integer
The ExternalId is the Id of the corresponding User from an external system. It, along with ExternalType, can be used to bridge the gap between a User from this system and a User from an external system.
-
externalType(optional):
string
The ExternalType is the type of the corresponding User from an external system. It, along with ExternalId, can be used to bridge the gap between a User from this system and a User from an external system.
-
links(optional):
array links
-
name(optional):
string
User's full name
-
recordId(optional):
string
The unique record ID of the User object.
Nested Schema : views
Type:
array
To Many Relationship to View
Show Source
-
Array of:
object ViewKey
Title:
ViewKey
Nested Schema : instanceLink
Type:
object
Metadata describing link description objects that MAY appear in the JSON instance representation.
Show Source
-
href:
string
URI [RFC3986] or URI Template [RFC6570]. If the value is set to URI Template, then the "templated" property must be set to true.
-
mediaType(optional):
string
Media type, as defined by RFC 2046, describing the link target.
-
method(optional):
string
HTTP method for requesting the target of the link.
-
profile(optional):
string
Link to the metadata of the resource, such as JSON-schema, that describes the resource expected when dereferencing the target resource..
-
rel:
string
Name of the link relation that, in addition to the type property, can be used to retrieve link details. For example, href or profile.
-
templated(optional):
boolean
Boolean flag that specifies that "href" property is a URI or URI Template. If the property is a URI template, set this value to true. By default, this value is false.
Nested Schema : DataFormQuestion
Type:
object
Title:
Show Source
DataFormQuestion
-
answers(optional):
array answers
To Many Relationship to Answer
-
dataForm(optional):
object DataFormKey
Title:
DataFormKey
-
dateAdded(optional):
string(date-time)
The date when the DataFormQuestion object was created or added
-
dateModified(optional):
string(date-time)
The date when the DataFormQuestion object was last modified.
-
isMasterIdentifier(optional):
boolean
IsMasterIdentifier of the DataFormQuestion object
-
links(optional):
array links
-
name(optional):
string
Name of the DataFormQuestion object
-
recordId(optional):
string
The unique record ID of the DataFormQuestion object.
-
referenceKey(optional):
string
The reference key for the DataFormQuestion object. DataFormQuestion objects support multiple languages. This field can be used to identify the associated objects for all languages.
-
required(optional):
boolean
Required of the DataFormQuestion object
-
sortOrder(optional):
integer
SortOrder of the DataFormQuestion object
-
specialTypeIndicator(optional):
integer
SpecialTypeIndicator of the DataFormQuestion object
Nested Schema : answers
Type:
array
To Many Relationship to Answer
Show Source
-
Array of:
object DataFormAnswer
Title:
DataFormAnswer
Nested Schema : DataFormKey
Type:
object
Title:
Show Source
DataFormKey
-
links(optional):
array links
-
recordId(optional):
string
The unique record ID of the DataForm object.
-
referenceKey(optional):
string
The reference key for the DataForm object. DataForm objects support multiple languages. This field can be used to identify the associated objects for all languages.
Nested Schema : links
Type:
Show Source
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
Nested Schema : DataFormAnswer
Type:
object
Title:
Show Source
DataFormAnswer
-
dataFormQuestion(optional):
object DataFormQuestionKey
Title:
DataFormQuestionKey
-
dateAdded(optional):
string(date-time)
The date when the DataFormAnswer object was created or added
-
dateModified(optional):
string(date-time)
The date when the DataFormAnswer object was last modified.
-
defaultAnswer(optional):
boolean
DefaultAnswer of the DataFormAnswer object
-
links(optional):
array links
-
name(optional):
string
Name of the DataFormAnswer object
-
numberValue(optional):
integer
NumberValue of the DataFormAnswer object
-
recordId(optional):
string
The unique record ID of the DataFormAnswer object.
-
referenceKey(optional):
string
The reference key for the DataFormAnswer object. DataFormAnswer objects support multiple languages. This field can be used to identify the associated objects for all languages.
-
sortOrder(optional):
integer
SortOrder of the DataFormAnswer object
Nested Schema : DataFormQuestionKey
Type:
object
Title:
Show Source
DataFormQuestionKey
-
links(optional):
array links
-
recordId(optional):
string
The unique record ID of the DataFormQuestion object.
-
referenceKey(optional):
string
The reference key for the DataFormQuestion object. DataFormQuestion objects support multiple languages. This field can be used to identify the associated objects for all languages.
Nested Schema : links
Type:
Show Source
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
Nested Schema : links
Type:
Show Source
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
Nested Schema : links
Type:
Show Source
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
Nested Schema : links
Type:
Show Source
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
Nested Schema : ViewKey
Type:
object
Title:
Show Source
ViewKey
-
links(optional):
array links
-
name(optional):
string
Localized name of the view
-
recordId(optional):
string
GUID of the SITE table containing the view definition
-
referenceKey(optional):
string
Non localized reference key for the view
-
stripeCD(optional):
string
Stripe of a view
Nested Schema : links
Type:
Show Source
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
Examples
The following example shows how to find the DataForm object having the specified ID parameter:
curl -X "GET" "http://IM_REST_API_HOST/km/api/latest/dataForms/{id}"
Example of Request Header
The following shows an example of the request header.
curl -X GET "https://<IM_REST_API_HOST>/km/api/latest/dataForms/{id}" -u "<username:password>" -H "Accept: application/json" -H "Content-Type: application/json"
Example of Response Body
The following shows an example of the response body in JSON format.
{ "recordId": "45C98B085B044881821DE07F68DC14CF", "referenceKey": "YES_OR_NO_RATING", "links": [ { "rel": "canonical", "href": "https://<IM_REST_API_HOST>/km/api/latest/dataForms/45C98B085B044881821DE07F68DC14CF", "mediaType": "application/json, application/xml", "method": "GET" }, { "rel": "collection", "href": "https://<IM_REST_API_HOST>/km/api/latest/dataForms", "mediaType": "application/json, application/xml", "method": "GET", "profile": "https://<IM_REST_API_HOST>/km/api/latest/metadata-catalog/dataForms" } ], "dateAdded": "1970-01-01T23:11:11+0000", "dateModified": "1970-01-01T23:11:11+0000", "emailContent": false, "name": "Like/Dislike Rating", "displayEndDate": "4712-12-31T00:00:00+0000", "displayStartDate": "2000-01-01T00:00:00+0000", "ratingType": 2, "questions": [ { "recordId": "94AEF5ABE53A4E609EFD0A208E9007C3", "referenceKey": "YES_OR_NO_RATING_Q1", "links": [ { "rel": "canonical", "href": "https://<IM_REST_API_HOST>/km/api/latest/dataForms/45C98B085B044881821DE07F68DC14CF/questions/94AEF5ABE53A4E609EFD0A208E9007C3", "mediaType": "application/json, application/xml", "method": "GET" } ], "dateAdded": "1970-01-01T23:11:11+0000", "dateModified": "1970-01-01T23:11:11+0000", "isMasterIdentifier": true, "required": true, "sortOrder": 1, "specialTypeIndicator": -1, "name": "Does this document help you?", "answers": [ { "recordId": "874CF739B99F4D358050B6C5CCC819F6", "referenceKey": "YES_OR_NO_RATING_A1", "links": [ { "rel": "canonical", "href": "https://<IM_REST_API_HOST>/km/api/latest/dataForms/45C98B085B044881821DE07F68DC14CF/questions/94AEF5ABE53A4E609EFD0A208E9007C3/answers/874CF739B99F4D358050B6C5CCC819F6", "mediaType": "application/json, application/xml", "method": "GET" } ], "dateAdded": "1970-01-01T23:11:11+0000", "dateModified": "1970-01-01T23:11:11+0000", "defaultAnswer": false, "numberValue": 1, "sortOrder": 1, "name": "Dislike", "dataFormQuestion": { "recordId": "94AEF5ABE53A4E609EFD0A208E9007C3", "referenceKey": "YES_OR_NO_RATING_Q1", "links": [ { "rel": "canonical", "href": "https://<IM_REST_API_HOST>/km/api/latest/dataForms/45C98B085B044881821DE07F68DC14CF/questions/94AEF5ABE53A4E609EFD0A208E9007C3", "mediaType": "application/json, application/xml", "method": "GET" } ] } }, { "recordId": "B73836830DC0401FA931120E4634408A", "referenceKey": "YES_OR_NO_RATING_A2", "links": [ { "rel": "canonical", "href": "https://<IM_REST_API_HOST>/km/api/latest/dataForms/45C98B085B044881821DE07F68DC14CF/questions/94AEF5ABE53A4E609EFD0A208E9007C3/answers/B73836830DC0401FA931120E4634408A", "mediaType": "application/json, application/xml", "method": "GET" } ], "dateAdded": "1970-01-01T23:11:11+0000", "dateModified": "1970-01-01T23:11:11+0000", "defaultAnswer": false, "numberValue": 2, "sortOrder": 2, "name": "Like", "dataFormQuestion": { "recordId": "94AEF5ABE53A4E609EFD0A208E9007C3", "referenceKey": "YES_OR_NO_RATING_Q1", "links": [ { "rel": "canonical", "href": "https://<IM_REST_API_HOST>/km/api/latest/dataForms/45C98B085B044881821DE07F68DC14CF/questions/94AEF5ABE53A4E609EFD0A208E9007C3", "mediaType": "application/json, application/xml", "method": "GET" } ] } } ], "dataForm": { "recordId": "45C98B085B044881821DE07F68DC14CF", "referenceKey": "YES_OR_NO_RATING", "links": [ { "rel": "canonical", "href": "https://<IM_REST_API_HOST>/km/api/latest/dataForms/45C98B085B044881821DE07F68DC14CF", "mediaType": "application/json, application/xml", "method": "GET" } ] } } ], "user": { "recordId": -999998, "name": "BatchJob User", "externalType": "ACCOUNT", "links": [ { "rel": "canonical", "href": "https://<IM_REST_API_HOST>/km/api/latest/users/-999998", "mediaType": "application/json, application/xml", "method": "GET" } ] }, "views": [] }