MyCSI API - Documentation

GET Leases/{id}

Method used to fetch a collection of Leases.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

Security token provided via the Authentication method.

globally unique identifier

Required

Body Parameters

Objects used to page through the collection of Leases, as well as filter the returned objects.

LeaseFilterModel
NameDescriptionTypeAdditional information
LastIdPulled

Optional: Used to restrict the Leases returned by ID. Example: if 100 is passed, Leases with an ID 100 and less won't be returned.

integer

None.

PageNumber

Optional, the number of the current 'page' of items returned during the API request.

integer

None.

PageSize

Optional, number of items in the 'page' returned during the API request.

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "LastIdPulled": 1,
  "PageNumber": 1,
  "PageSize": 1
}

application/octet-stream

Sample:
{"LastIdPulled":1,"PageNumber":1,"PageSize":1}

application/xml, text/xml

Sample:
<LeaseFilterModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CSI.MyCSI.WebAPI.Models.Filters">
  <PageNumber>1</PageNumber>
  <PageSize>1</PageSize>
  <LastIdPulled>1</LastIdPulled>
</LeaseFilterModel>

application/x-www-form-urlencoded

Sample:
?LastIdPulled=1&PageNumber=1&PageSize=1

Response Information

Resource Description

The LeaseModel object, containing the collection of Leases.

LeaseModel
NameDescriptionTypeAdditional information
ErrorMessage

Optional error message provided by the method call.

string

None.

Leases

Collection of Leases being returned.

Collection of Lease

None.

Message

Optional message provided by the method call.

string

None.

Paging

Contains information relevant to paging through a collection of objects.

PagingModel

None.

StatusCode

The HTTP Status Code of the method call.

HttpStatusCode

None.

Success

Boolean flag indicating the success or failure of the method call.

boolean

None.

Response Formats

application/json, text/json

Sample:
{
  "Message": "sample string 1",
  "StatusCode": 100,
  "Success": true,
  "Leases": [
    {
      "ID": 1,
      "LeaseNo": "sample string 2",
      "CustomerName": "sample string 3",
      "Portfolio": "sample string 4"
    },
    {
      "ID": 1,
      "LeaseNo": "sample string 2",
      "CustomerName": "sample string 3",
      "Portfolio": "sample string 4"
    }
  ],
  "Paging": {
    "PageSize": 1,
    "PageNumber": 2,
    "TotalPages": 3,
    "TotalItems": 4
  },
  "ErrorMessage": "sample string 3"
}

application/octet-stream

Sample:
{"Message":"sample string 1","StatusCode":100,"Success":true,"Leases":[{"ID":1,"LeaseNo":"sample string 2","CustomerName":"sample string 3","Portfolio":"sample string 4"},{"ID":1,"LeaseNo":"sample string 2","CustomerName":"sample string 3","Portfolio":"sample string 4"}],"Paging":{"PageSize":1,"PageNumber":2,"TotalPages":3,"TotalItems":4},"ErrorMessage":"sample string 3"}

application/xml, text/xml

Sample:
<LeaseModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CSI.MyCSI.WebAPI.Models">
  <ErrorMessage xmlns="http://schemas.datacontract.org/2004/07/CSI.MyCSI.WebAPI.Models.Shared">sample string 3</ErrorMessage>
  <Message xmlns="http://schemas.datacontract.org/2004/07/CSI.MyCSI.WebAPI.Models.Shared">sample string 1</Message>
  <StatusCode xmlns="http://schemas.datacontract.org/2004/07/CSI.MyCSI.WebAPI.Models.Shared">Continue</StatusCode>
  <Success xmlns="http://schemas.datacontract.org/2004/07/CSI.MyCSI.WebAPI.Models.Shared">true</Success>
  <Paging xmlns="http://schemas.datacontract.org/2004/07/CSI.MyCSI.WebAPI.Models.Shared">
    <PageNumber>2</PageNumber>
    <PageSize>1</PageSize>
    <TotalItems>4</TotalItems>
    <TotalPages>3</TotalPages>
  </Paging>
  <Leases>
    <Lease>
      <CustomerName>sample string 3</CustomerName>
      <ID>1</ID>
      <LeaseNo>sample string 2</LeaseNo>
      <Portfolio>sample string 4</Portfolio>
    </Lease>
    <Lease>
      <CustomerName>sample string 3</CustomerName>
      <ID>1</ID>
      <LeaseNo>sample string 2</LeaseNo>
      <Portfolio>sample string 4</Portfolio>
    </Lease>
  </Leases>
</LeaseModel>