System - Update web-parts

API Url

Used for updating existing web-part instances, typically related to layout.

PUT
http://localhost:16010/ProMarkREST/rest/System/webparts

Permissions: user

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

    webpartsObject[]

Collection of web-parts to add.

      idInt64

Web-part unique identifier (not updateable).

      nameString

Name of the web-part (not updateable).

      orderNumber

Order sequence inside the zone (used for layout).

      tabIdNumber

Tab identifier.

      typeNumber

Web-part type (not updateable).

      zoneNumber

Zone identifier (used for layout).

Request example:

{
"request": {
"data": {
"webparts": [
{
"id": 1000,
"type": 2,
"name": "Attendance overview",
"tabId": 1,
"zone": 1,
"order": 1
}
]
}
}
}

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    webpartsObject[]

Collection of web-parts.

      idInt64

Web-part unique identifier. Might be re-generated if web-part changed is inherited.

      nameString

Name of the web-part.

      orderNumber

Order sequence inside the zone (used for layout).

      tabIdNumber

Tab identifier.

      typeNumber

Web-part type.

      zoneNumber

Zone identifier (used for layout).

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Success example:

HTTP/1.1 200 OK
{
"response": {
"data": {
"webparts": [
{
"id": 1010,
"type": 2,
"name": "Attendance overview",
"tabId": 1,
"zone": 1,
"order": 1
}
]
},
"errorCode": 0,
"errorMessage": ""
}
}

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.

Error example:

HTTP/1.1 404 Not found
{
"response": {
"errorCode": 350,
"errorMessage": "Web-part not found."
}
}