Individual Form

Getting Form Details

This endpoint supports retrieving extended metadata; provide a header X-Extended-Metadata: true to additionally retrieve the submissions count of the number of Submissions that this Form has, as well as the lastSubmission most recent submission timestamp.

get/v1/projects/{projectId}/forms/{xmlFormId}

Path parameters

xmlFormIdstring required

The xmlFormId of the Form being referenced.

projectIdnumber required

The numeric ID of the Project

Response

This is the Extended Metadata response, if requested via the appropriate header:

projectIdnumber required

The id of the project this form belongs to.

xmlFormIdstring required

The id of this form as given in its XForms XML definition

namestring

The friendly name of this form. It is given by the <title> in the XForms XML definition.

versionstring required

The version of this form as given in its XForms XML definition. If no version was specified in the Form, a blank string will be given.

enketoIdstring

If it exists, this is the survey ID of this Form on Enketo at /-. This will be the ID of the published version if it exists, otherwise it will be the draft ID. Only a cookie-authenticated user may access the preview through Enketo.

hashstring required

An MD5 sum automatically computed based on the XForms XML definition. This is required for OpenRosa compliance.

keyIdnumber

If a public encryption key is present on the form, its numeric ID as tracked by Central is given here.

state'open' | 'closing' | 'closed' required
publishedAtstring

Indicates when a draft has most recently been published for this Form. If this value is null, this Form has never been published yet, and contains only a draft.

createdAtstring required

ISO date format

updatedAtstring

ISO date format

webformsEnabledboolean

Enables use of ODK Web Forms instead of Enketo for filling Forms via web browsers.

Example response

{
  "projectId": 1,
  "xmlFormId": "simple",
  "name": "Simple",
  "version": "2.1",
  "enketoId": "abcdef",
  "hash": "51a93eab3a1974dbffc4c7913fa5a16a",
  "keyId": 3,
  "publishedAt": "2018-01-21T00:04:11.153Z",
  "createdAt": "2018-01-19T23:58:03.395Z",
  "updatedAt": "2018-03-21T12:45:02.312Z"
}

Changes

Changed in 4 of the 54 revisions of this API.4416

  • fadfadd0e94e433See the full diff
    • removed the required property allOf[subschema #2]/entityRelated from the response with the 200 status

      response-required-property-removed

    • removed the required property allOf[subschema #2]/publicLinks from the response with the 200 status

      response-required-property-removed

    • removed the required property allOf[subschema #2]/reviewStates from the response with the 200 status

      response-required-property-removed

    • removed the required property allOf[subschema #2]/submissions from the response with the 200 status

      response-required-property-removed

    • removed the optional property allOf[subschema #2]/createdBy from the response with the 200 status

      response-optional-property-removed

    • removed the optional property allOf[subschema #2]/excelContentType from the response with the 200 status

      response-optional-property-removed

    • removed the optional property allOf[subschema #2]/lastSubmission from the response with the 200 status

      response-optional-property-removed

    • added ExtendedForm to the response body allOf list for the response status 200

      response-body-all-of-added

    • removed Form from the response body allOf list for the response status 200

      response-body-all-of-removed

    • added the optional property allOf[subschema #2]/publishNotes to the response with the 200 status

      response-optional-property-added

    • api operation id Getting Form Details removed and replaced with getFormDetails

      api-operation-id-removed

    • removed the non-success response with the status 403

      response-non-success-status-removed

  • e8c2858fd4eb111See the full diff
    • removed the optional property allOf[subschema #2]/publishNotes from the response with the 200 status (media type: application/json; extended)

      response-optional-property-removed

    • api operation id getFormDetails removed and replaced with Getting Form Details

      api-operation-id-removed

    • added Form to the response body allOf list for the response status 200 (media type: application/json; extended)

      response-body-all-of-added

    • removed ExtendedForm from the response body allOf list for the response status 200 (media type: application/json; extended)

      response-body-all-of-removed

    • added the non-success response with the status 403

      response-non-success-status-added

    • added the optional property allOf[subschema #2]/createdBy to the response with the 200 status (media type: application/json; extended)

      response-optional-property-added

    • added the optional property allOf[subschema #2]/excelContentType to the response with the 200 status (media type: application/json; extended)

      response-optional-property-added

    • added the optional property allOf[subschema #2]/lastSubmission to the response with the 200 status (media type: application/json; extended)

      response-optional-property-added

    • added the required property allOf[subschema #2]/entityRelated to the response with the 200 status (media type: application/json; extended)

      response-required-property-added

    • added the required property allOf[subschema #2]/publicLinks to the response with the 200 status (media type: application/json; extended)

      response-required-property-added

    • added the required property allOf[subschema #2]/reviewStates to the response with the 200 status (media type: application/json; extended)

      response-required-property-added

    • added the required property allOf[subschema #2]/submissions to the response with the 200 status (media type: application/json; extended)

      response-required-property-added

    This revision also has 11 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog