RESTful API of Real Estate Bounded Context
Headers
As this API is working with JSON every request must add the following headers:
Accept: application/json
And for requests with body:
Content-Type: application/json
Icalendar Failure Logs ¶
Icalendar Failure Logs ¶
Get icalendar failure logs by criteriaGET/integrations/icalendar-failure-logs{?page,itemsPerPage,rentableUnitId,accountId}
Example URI
GET https://monolith.spotahome.com/api/integrations/icalendar-failure-logs?page=1&itemsPerPage=1&rentableUnitId=1234&accountId=aaaa-bbbb-cccc-dddd
URI Parameters
- page
number(optional) Example: 1- itemsPerPage
number(optional) Example: 1- rentableUnitId
number(optional) Example: 1234- accountId
string(optional) Example: aaaa-bbbb-cccc-dddd
Request
Headers
Content-Type: application/json
Authorization: aa.bb.cc (string, required)
Requester: agent@spotahome.com (string, optional)Response
200Headers
Content-Type: application/jsonBody
{
"count": 1,
"total": 2,
"_links": {
"self": {
"href": "/api/integrations/icalendar-failure-logs?page=1"
},
"first": {
"href": "/api/integrations/icalendar-failure-logs?page=1"
},
"last": {
"href": "/api/integrations/icalendar-failure-logs?page=2"
},
"next": {
"href": "/api/integrations/icalendar-failure-logs?page=1"
},
"previous": {
"href": "/api/integrations/icalendar-failure-logs?page=2"
}
},
"_embedded": {
"icalendarFailureLogs": [
{
"id": "aaaa-bbbb-cccc-dddd",
"accommodationProviderId": "aaaa-bbbb-cccc-dddd",
"feedId": "https://domain.com/calendar/basic.ics",
"rentableUnitId": 1234,
"message": "An error happened",
"stackTrace": "#0 main.php",
"occurredOn": "2017-09-09T15:59:43+0000"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"count": {
"type": "number"
},
"total": {
"type": "number"
},
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"first": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"last": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"next": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"previous": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self",
"first",
"last"
]
},
"_embedded": {
"type": "object",
"properties": {
"icalendarFailureLogs": {
"type": "array"
}
}
}
},
"required": [
"count",
"total",
"_links"
]
}Response
401Headers
Content-Type: application/jsonBody
{
"type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
"title": "Unauthorized",
"status": 401,
"detail": "The logged user identified has not granted access."
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"type": {
"type": "string"
},
"title": {
"type": "string"
},
"status": {
"type": "number"
},
"detail": {
"type": "string"
}
},
"required": [
"type",
"title",
"status",
"detail"
]
}Response
500Headers
Content-Type: application/jsonBody
{
"detail": "The request was well formed but was unable to be followed due to semantic errors",
"status": 500,
"title": "Internal Server Error",
"type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"status": {
"type": "number"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"detail",
"status",
"title",
"type"
]
}Domain Events ¶
IncomingFeedFailureOccurred
{
"name": "any-incoming-feed",
"exception": {
"message": "Something is wrong",
"stackTrace": "#0 main.php"
},
"occurredOn": "2017-07-25T14:26:17+0000",
"context" : [
"key-context" : "value of the context"
]
}
-
name (string, required)
-
exception (object, required)
- message (string, required)
- stackTrace (string, required)
-
context (array, required)
-
occurredOn (string, required)