Handling Constructs with the REST API

The REST API supports loading construct information. This section describes necessary configuration and methods.

1 Loading constructs

To load constructs the client must

GET /CNPortletapp/rest/construct/load

The response will be of the form

{
  "constructCategories" : {
    "GCN_UNCATEGORIZED" : {
      "name" : "GCN_UNCATEGORIZED",
      "constructs" : {
        "Neuer Tagtyp" : {
          "name" : "Neuer Tagtyp",
          "icon" : "text.gif",
          "constructId" : 67
        }
      }
    },
    "Links, Verweise" : {
      "name" : "Links, Verweise",
      "constructs" : {
        "Bestehende Inhalte einbetten (Seitentag)" : {
          "name" : "Bestehende Inhalte einbetten (Seitentag)",
          "icon" : "tag.gif",
          "constructId" : 32
        },
        "Aloha Link" : {
          "name" : "Aloha Link",
          "icon" : "url.gif",
          "constructId" : 17
        }
      }
    },
    "Anwendungen, Widgets" : {
      "name" : "Anwendungen, Widgets",
      "constructs" : {
        "ShareThis (Account notwendig)" : {
          "name" : "ShareThis (Account notwendig)",
          "icon" : "undef.gif",
          "constructId" : 30
        }
      }
    }
  },
  "messages" : [ {
    "message" : "rest.construct.load.success",
    "type" : "SUCCESS",
    "timestamp" : 1330448562418
  } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "constructs loaded"
  }
}

Please note that constructs with no category will be placed in the GCN_UNCATEGORIZED category.