V1::MessagesController

Messages

index

View list of all channel messages

URL

GET /channels/:channel_id/messages or /schools/:school_id/messages or /enrollments/:enrollment_id/messages /enrollments/:school_product_id/messages

Response Fields

Nome Tipo Descrição
messages Array<Message>

List of messages

show

View a message

URL

GET /message/:id

Parâmetros obrigatórios

Nome Tipo Descrição
id Integer

Identifier the message

Objeto resposta

Message

The requested message

create

Create message

URL

POST /channels/:channel_id/messages

Parâmetros obrigatórios

Nome Tipo Descrição
message Hash

The message to create

message[text] String

Text of the message

message[subject] String

Subject of the message

message[sender_id] Integer

Sender of the message

Parâmetros opcionais

Nome Tipo Descrição
message[channel_ids] Integer

channels of the message

message[owners][id] Integer

Owner id of channel of the message

message[owners][type] Integer

Owner type of channel of the message

message[created_at] DateTime

Creation date. Passing this attribute implies to not run object's callbacks

update

Update an existing message

URL

PUT/PATCH /messages/:id

Parâmetros obrigatórios

Nome Tipo Descrição
message Hash

The message to update

message[subject] String

subject of the message

message[text] Text

text of the message

Objeto resposta

message

The created message or a list of errors

destroy

Destroy message

URL

DELETE /messages/:id

Parâmetros obrigatórios

Nome Tipo Descrição
id Integer

Id of an message