POST api/custom/CustomMessage/GetMessages

Request Information

URI Parameters

None.

Body Parameters

CustomMessageQueryModel
NameDescriptionTypeAdditional information
SearchTerms

Collection of string

None.

LabelIds

Collection of integer

None.

CredentialIds

Collection of integer

None.

Request Formats

application/json, text/json

Sample:
{
  "SearchTerms": [
    "sample string 1",
    "sample string 2"
  ],
  "LabelIds": [
    1,
    2
  ],
  "CredentialIds": [
    1,
    2
  ]
}

text/html

Sample:
{"SearchTerms":["sample string 1","sample string 2"],"LabelIds":[1,2],"CredentialIds":[1,2]}

application/xml, text/xml

Sample:
<CustomMessageQueryModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Gravitate.WebAPI.Areas.Custom.Models">
  <CredentialIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </CredentialIds>
  <LabelIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </LabelIds>
  <SearchTerms xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </SearchTerms>
</CustomMessageQueryModel>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'CustomMessageQueryModel'.

Response Information

Resource Description

DataCollectionResultOfCustomMessageModel
NameDescriptionTypeAdditional information
TotalRecords

integer

None.

Data

Collection of CustomMessageModel

None.

Query

Object

None.

Validations

Collection of Object

None.

Response Formats

application/json, text/json

Sample:
{
  "TotalRecords": 1,
  "Data": [
    {
      "MessageId": 1,
      "MessageBody": "sample string 2",
      "Labels": "sample string 3",
      "InternalCounterPartyName": "sample string 4",
      "CreatedDate": "2025-12-10T08:25:07.0663451-06:00",
      "CreatedBy": "sample string 6"
    },
    {
      "MessageId": 1,
      "MessageBody": "sample string 2",
      "Labels": "sample string 3",
      "InternalCounterPartyName": "sample string 4",
      "CreatedDate": "2025-12-10T08:25:07.0663451-06:00",
      "CreatedBy": "sample string 6"
    }
  ],
  "Query": {},
  "Validations": null
}

text/html

Sample:
{"TotalRecords":1,"Data":[{"MessageId":1,"MessageBody":"sample string 2","Labels":"sample string 3","InternalCounterPartyName":"sample string 4","CreatedDate":"2025-12-10T08:25:07.0663451-06:00","CreatedBy":"sample string 6"},{"MessageId":1,"MessageBody":"sample string 2","Labels":"sample string 3","InternalCounterPartyName":"sample string 4","CreatedDate":"2025-12-10T08:25:07.0663451-06:00","CreatedBy":"sample string 6"}],"Query":{},"Validations":null}

application/xml, text/xml

Sample:
<DataCollectionResultOfCustomMessageModel_SWCApA0I xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Gravitate.Services.Base.DataRequests">
  <Query />
  <Validations xmlns:d2p1="http://schemas.datacontract.org/2004/07/Gravitate.Library.Validation" i:nil="true" />
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/Gravitate.WebAPI.Areas.Custom.Models">
    <d2p1:CustomMessageModel>
      <d2p1:CreatedBy>sample string 6</d2p1:CreatedBy>
      <d2p1:CreatedDate>2025-12-10T08:25:07.0663451-06:00</d2p1:CreatedDate>
      <d2p1:InternalCounterPartyName>sample string 4</d2p1:InternalCounterPartyName>
      <d2p1:Labels>sample string 3</d2p1:Labels>
      <d2p1:MessageBody>sample string 2</d2p1:MessageBody>
      <d2p1:MessageId>1</d2p1:MessageId>
    </d2p1:CustomMessageModel>
    <d2p1:CustomMessageModel>
      <d2p1:CreatedBy>sample string 6</d2p1:CreatedBy>
      <d2p1:CreatedDate>2025-12-10T08:25:07.0663451-06:00</d2p1:CreatedDate>
      <d2p1:InternalCounterPartyName>sample string 4</d2p1:InternalCounterPartyName>
      <d2p1:Labels>sample string 3</d2p1:Labels>
      <d2p1:MessageBody>sample string 2</d2p1:MessageBody>
      <d2p1:MessageId>1</d2p1:MessageId>
    </d2p1:CustomMessageModel>
  </Data>
  <TotalRecords>1</TotalRecords>
</DataCollectionResultOfCustomMessageModel_SWCApA0I>