GET /api-web/api/dms/forms/{objecttype}

As of Version

product version 2020 Autumn | component version 

Request MethodGET
Response FormatJSON
Description

Retrieves the default form for the object type specified by object type ID objecttype and optional query parameters situation and sots (secondary object types) for the active tenant.

Returns null if there is no designed form model for the given object type and situation.

Behind the object type ID, add the query parameter ?situation=CREATE (?situation=EDIT) to retrieve the CREATE (EDIT) form. Default is EDIT. Furthermore, add &sots=<objectTypeId> in order to specify a secondary object type of which properties should be included in the retrieved form. The sots query parameter can be added multiple times for different secondary object types.

Response HTTP status codes:

HTTP Status CodeMeaning
200 OK
401 Unauthorized
404 Not found
Request Example

https://<host>/api-web/api/dms/forms/tenMytenant:qadocscripts?situation=EDIT&sots=examplesot1&sot=examplesot2

Response Example

200 OK

response body
{
  "name": "tenMytenant:qadocscripts",
  "situation": "EDIT",
  "script": "any valid script",
  "elements": [
    {
      "name": "core",
      "type": "o2mGroup",
      "layout": {
        "align": "column"
      },
      "elements": [
        {
          "name": "appClient:clienttitle",
          "type": "string",
          "rows": 1
        },
        {
          "name": "appClient:clientdescription",
          "type": "string",
          "rows": 1
        }
      ]
    },
    {
      "name": "data",
      "type": "o2mGroupStack",
      "elements": [
        {
          "type": "o2mGroup",
          "layout": {
            "align": "column"
          },
          "elements": [
            {
              "type": "o2mGroup",
              "layout": {
                "align": "row"
              },
              "elements": [
                {
                  "type": "o2mGroup",
                  "layout": {
                    "align": "row"
                  },
                  "elements": [
                    {
                      "name": "tenMytenant:strsingle",
                      "type": "string",
                      "rows": 1
                    },
                    {
                      "name": "tenMytenant:strsinglemail",
                      "type": "string",
                      "rows": 1
                    }
                  ]
                },
                {
                  "type": "o2mGroup",
                  "layout": {
                    "align": "row"
                  },
                  "elements": [
                    {
                      "name": "tenMytenant:intsingle",
                      "type": "integer"
                    },
                    {
                      "name": "tenMytenant:intsingledigit",
                      "type": "integer"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
 true
}