Messages

List

Retrieve Schedule Message(s).

GET/api/Provider/VM/VDIHost/Schedule/{id}/Messages
Path parameters
id*integer (int32)

The ID of the Schedule setting for which to retrieve the messages.

Response

Success

Body
idinteger (int32)

ID of the object.

enabledboolean

Enabled

messageTitlenullable string

Message title

messagenullable string

Message

sendMsgSecsinteger (int32)

Seconds before message is sent

sendMsgWhenenum

Whether the message is sent Before/After the schedule is triggered. Send Message When can only be set to After in the case of Reboot.

0 = Before,1 = After
Request
const response = await fetch('/api/Provider/VM/VDIHost/Schedule/{id}/Messages', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
[
  {
    "id": 1,
    "enabled": true,
    "messageTitle": "text",
    "message": "text",
    "sendMsgSecs": 1,
    "sendMsgWhen": [
      "0 = Before",
      "1 = After"
    ]
  }
]

Create

Create a Schedule Message.

POST/api/Provider/VM/VDIHost/Schedule/{id}/Messages
Path parameters
id*integer (int32)

The ID of the Schedule setting for which to create the message.

Body

Message settings.

enabledboolean

Whether to enable or disable the message.

messageTitle*nullable string

The title of the message.

message*nullable string

A message that should be sent to users before the job starts.

sendMsgSecsinteger (int32)

Time interval in seconds before the job starts when the message to users should be sent.

sendMsgWhenenum

Whether the message is sent Before/After the schedule is triggered. Send Message When can only be set to After in the case of Reboot.

0 = Before,1 = After
Response

Created

Body
idinteger (int32)

ID of the object.

enabledboolean

Enabled

messageTitlenullable string

Message title

messagenullable string

Message

sendMsgSecsinteger (int32)

Seconds before message is sent

sendMsgWhenenum

Whether the message is sent Before/After the schedule is triggered. Send Message When can only be set to After in the case of Reboot.

0 = Before,1 = After
Request
const response = await fetch('/api/Provider/VM/VDIHost/Schedule/{id}/Messages', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json; api-version=1.0"
    },
    body: JSON.stringify({
      "messageTitle": "text",
      "message": "text",
      "sendMsgWhen": [
        "0 = Before",
        "1 = After"
      ]
    }),
});
const data = await response.json();
Response
{
  "id": 1,
  "enabled": true,
  "messageTitle": "text",
  "message": "text",
  "sendMsgSecs": 1,
  "sendMsgWhen": [
    "0 = Before",
    "1 = After"
  ]
}

Get

Retrieve a Schedule Message.

GET/api/Provider/VM/VDIHost/Schedule/{id}/Messages/{messageId}
Path parameters
id*integer (int32)

The ID of the Schedule setting for which to retrieve the message.

messageId*integer (int32)

The ID of the message to retrieve.

Response

Success

Body
idinteger (int32)

ID of the object.

enabledboolean

Enabled

messageTitlenullable string

Message title

messagenullable string

Message

sendMsgSecsinteger (int32)

Seconds before message is sent

sendMsgWhenenum

Whether the message is sent Before/After the schedule is triggered. Send Message When can only be set to After in the case of Reboot.

0 = Before,1 = After
Request
const response = await fetch('/api/Provider/VM/VDIHost/Schedule/{id}/Messages/{messageId}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "id": 1,
  "enabled": true,
  "messageTitle": "text",
  "message": "text",
  "sendMsgSecs": 1,
  "sendMsgWhen": [
    "0 = Before",
    "1 = After"
  ]
}

Update

Update a Schedule Message.

PUT/api/Provider/VM/VDIHost/Schedule/{id}/Messages/{messageId}
Path parameters
id*integer (int32)

The ID of the Schedule setting for which to modify the message.

messageId*integer (int32)

The ID of the message to modify.

Body

Message settings.

enablednullable boolean

Whether to enable or disable the message.

messageTitlenullable string

The title of the message.

messagenullable string

A message that should be sent to users before the job starts.

sendMsgSecsnullable integer (int32)

Time interval in seconds before the job starts when the message to users should be sent.

sendMsgWhenenum

Whether the message is sent Before/After the schedule is triggered. Send Message When can only be set to After in the case of Reboot.

0 = Before,1 = After
Response

No Content

Request
const response = await fetch('/api/Provider/VM/VDIHost/Schedule/{id}/Messages/{messageId}', {
    method: 'PUT',
    headers: {
      "Content-Type": "application/json; api-version=1.0"
    },
    body: JSON.stringify({
      "sendMsgWhen": [
        "0 = Before",
        "1 = After"
      ]
    }),
});
const data = await response.json();
Response
{
  "type": "text",
  "title": "text",
  "status": 1,
  "detail": "text",
  "instance": "text",
  "ANY_ADDITIONAL_PROPERTY": "anything"
}

Delete

Delete a Schedule Message by ID.

DELETE/api/Provider/VM/VDIHost/Schedule/{id}/Messages/{messageId}
Path parameters
id*integer (int32)

The ID of the Schedule setting for which to remove the message.

messageId*integer (int32)

The ID of the message to remove.

Response

No Content

Request
const response = await fetch('/api/Provider/VM/VDIHost/Schedule/{id}/Messages/{messageId}', {
    method: 'DELETE',
    headers: {},
});
const data = await response.json();
Response
{
  "type": "text",
  "title": "text",
  "status": 1,
  "detail": "text",
  "instance": "text",
  "ANY_ADDITIONAL_PROPERTY": "anything"
}

Was this helpful?