mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
5095 lines
166 KiB
HTML
Executable File
5095 lines
166 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
|
|
<meta name="description" content="REST API Documentation for Fyipe. Integrate Fyipe with any service or platform.">
|
|
<title>Fyipe API Documentation</title>
|
|
|
|
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="/assets/images/apple-touch-icon-57x57.png" />
|
|
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/assets/images/apple-touch-icon-114x114.png" />
|
|
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/assets/images/apple-touch-icon-72x72.png" />
|
|
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/assets/images/apple-touch-icon-144x144.png" />
|
|
<link rel="apple-touch-icon-precomposed" sizes="60x60" href="/assets/images/apple-touch-icon-60x60.png" />
|
|
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="/assets/images/apple-touch-icon-120x120.png" />
|
|
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="/assets/images/apple-touch-icon-76x76.png" />
|
|
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="/assets/images/apple-touch-icon-152x152.png" />
|
|
<link rel="icon" type="image/png" href="/assets/images/favicon-196x196.png" sizes="196x196" />
|
|
<link rel="icon" type="image/png" href="/assets/images/favicon-96x96.png" sizes="96x96" />
|
|
<link rel="icon" type="image/png" href="/assets/images/favicon-32x32.png" sizes="32x32" />
|
|
<link rel="icon" type="image/png" href="/assets/images/favicon-16x16.png" sizes="16x16" />
|
|
<link rel="icon" type="image/png" href="/assets/images/favicon-128.png" sizes="128x128" />
|
|
|
|
|
|
<!-- Custom styles for this template -->
|
|
<link rel="dns-prefetch" href="//fonts.googleapis.com/">
|
|
<link rel="dns-prefetch" href="//ajax.googleapis.com">
|
|
<link rel="dns-prefetch" href="//code.jquery.com/">
|
|
<link rel="dns-prefetch" href="//cdn.slaask.com/">
|
|
<link rel="dns-prefetch" href="//munchkin.marketo.net/">
|
|
<link href="assets/css/theme.css" rel="stylesheet">
|
|
<script src="https://code.jquery.com/jquery.js"></script>
|
|
|
|
<script src="assets/js/qframe.js"></script>
|
|
<script src="assets/js/jquery.js"></script>
|
|
<script src="assets/js/jquery.cookie.js"></script>
|
|
<script src="assets/js/waypoints.js"></script>
|
|
<script src="assets/js/shared.js"></script>
|
|
<script src="assets/js/api.js"></script>
|
|
<style>
|
|
.requestType{
|
|
color: #929292;
|
|
font-size: 12px;
|
|
border-color: #929292;
|
|
border-width: 1px;
|
|
border-style: solid;
|
|
padding: 3px;
|
|
border-radius: 5px;
|
|
margin-left: 10px;
|
|
}
|
|
</style>
|
|
|
|
<script type="text/javascript">
|
|
WebFontConfig = {
|
|
google: {
|
|
families: ['Source+Code+Pro:400,600,700:latin', 'Work+Sans:500,300:latin', 'Open+Sans:400,600:latin']
|
|
}
|
|
};
|
|
(function () {
|
|
var wf = document.createElement('script');
|
|
wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
|
|
wf.type = 'text/javascript';
|
|
wf.async = 'true';
|
|
var s = document.getElementsByTagName('script')[0];
|
|
s.parentNode.insertBefore(wf, s);
|
|
})();
|
|
</script>
|
|
|
|
<link href="assets/css/monokai_sublime.css" rel="stylesheet">
|
|
</head>
|
|
|
|
<body class="docs">
|
|
|
|
<aside class="cf-sidebar">
|
|
<div class="sidebar-header">
|
|
<a href="/" title="Fyipe Developers" class="cf-logo">Developers</a>
|
|
</div>
|
|
<nav class="sidebar-navigation">
|
|
<ul>
|
|
|
|
<li class="active">
|
|
|
|
|
|
<ul class="sub-nav">
|
|
<li class="category-list">
|
|
<a class="introduction doc-category" href="#introduction">Introduction</a>
|
|
</li>
|
|
<li class="category-list">
|
|
<a class="authentication doc-category" href="#authentication">Authentication</a>
|
|
</li>
|
|
<li class="category-list">
|
|
<a class="methods doc-category" href="#output-types">Output Types</a>
|
|
</li>
|
|
<li class="category-list">
|
|
<a class="errors doc-category" href="#errors">Errors</a>
|
|
</li>
|
|
|
|
<li class="category-list">
|
|
<a title="Project" class="Project doc-category active" href="#alerts">Alerts</a>
|
|
</li>
|
|
|
|
<li class="category-list">
|
|
<a title="Project-getAll" class="Project-getAll menu-link" href="#incident">
|
|
Incident
|
|
</a>
|
|
</li>
|
|
|
|
<li class="category-list">
|
|
<a title="Project-resetKey" class="Project-resetKey menu-link" href="#monitor">
|
|
Monitor
|
|
</a>
|
|
</li>
|
|
<li class="category-list">
|
|
<a title="Project-resetKey" class="Project-resetKey menu-link" href="#monitor-category">
|
|
Monitor Category
|
|
</a>
|
|
</li>
|
|
<li class="category-list">
|
|
<a title="Project-renameProject" class="Project-renameProject menu-link" href="#schedule">
|
|
Schedule
|
|
</a>
|
|
</li>
|
|
|
|
|
|
<li class="category-list">
|
|
<a title="Project-removeTeamMember" class="Project-removeTeamMember menu-link" href="#status-page">
|
|
Status Page
|
|
</a>
|
|
</li>
|
|
|
|
<li class="category-list">
|
|
<a title="Project-removeTeamMember" class="Project-removeTeamMember menu-link" href="#subscribers">
|
|
Subscribers
|
|
</a>
|
|
</li>
|
|
|
|
<li class="category-list">
|
|
<a title="Project-removeTeamMember" class="Project-removeTeamMember menu-link" href="#subscriber-alerts">
|
|
Subscriber Alerts
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
</ul>
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
</aside>
|
|
<script type="text/javascript">
|
|
var changeLocation = function (location) {
|
|
history.replaceState(undefined, undefined, "#" + location);
|
|
}
|
|
</script>
|
|
|
|
<div class="container-docs" role="main">
|
|
|
|
<div id="introduction" class="cf-grid-container dev-doc-item-container dev-doc-description-container">
|
|
<div class="col-lg-half col-md-half dev-doc-item">
|
|
<h1>API Reference</h1>
|
|
<p>
|
|
<p>
|
|
The Fyipe API is organized around <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">REST</a>.
|
|
Our API is designed to have predictable, resource-oriented URLs and to use HTTP response codes to indicate
|
|
API errors. We use built-in HTTP features, like HTTP authentication and HTTP verbs, which can be understood
|
|
by
|
|
off-the-shelf HTTP clients, and we support <a href="http://en.wikipedia.org/wiki/Cross-origin_resource_sharing">cross-origin
|
|
resource sharing</a> to allow you to interact securely with our API from a client-side web
|
|
application/mobile application, or any service that can consume HTTP RESTful API's. You should remember
|
|
that you should never expose your API Key in any
|
|
public website's client-side code, Project ID however can be exposed).
|
|
<a href="http://www.json.org/">JSON</a> will be returned in all responses from the API, including errors
|
|
(though if you're using API bindings/SDK, we will convert the response to the appropriate language-specific
|
|
object).
|
|
</p>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<div class="col-lg-half col-md-half dev-doc-example">
|
|
<div class="doc-example-item">
|
|
<h1>REST API Endpoint</h1>
|
|
<div class="example-code">
|
|
<p class="url">https://api.fyipe.com/</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="authentication" class="cf-grid-container dev-doc-item-container dev-doc-description-container">
|
|
<div class="col-lg-half col-md-half dev-doc-item">
|
|
<h1>Authentication</h1>
|
|
<p>
|
|
Authentication on Fyipe API is possible through Fyipe Project ID and API Key. Every project in Fyipe has it's
|
|
own API Project ID and API Key. You can find this on your Fyipe Dashboard under the Project Settings menu.
|
|
Only Project Owners and Administrators have access to Fyipe API Key.
|
|
</p>
|
|
<p>
|
|
There are three ways you can perform authentication. Either by passing the Project ID and API Key in request
|
|
headers, as query string, or as request body.
|
|
</p>
|
|
</div>
|
|
<div class="col-lg-half col-md-half dev-doc-example">
|
|
<div class="doc-example-item">
|
|
<h1>As Request Headers</h1>
|
|
<div class="example-code">
|
|
<p class="url">project-id: your-project-id-here</p>
|
|
<p class="url">api-key: your-api-key-here</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="doc-example-item">
|
|
<h1>As Request Query</h1>
|
|
<div class="example-code">
|
|
<p class="url">https://api.fyipe.com/your-path?project-id=XXX&api-key=XXX</p>
|
|
</div>
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>As Request Body</h1>
|
|
<div class="example-code">
|
|
<p class="url">{ project-id: XXX, api-key: XXX }</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="output-types" class="cf-grid-container dev-doc-item-container dev-doc-description-container">
|
|
<div class="col-lg-half col-md-half dev-doc-item">
|
|
<h1>Output Types</h1>
|
|
<p>
|
|
Fyipe API provides outputs in multiple formats. They are - JSON, XML, and CSV.
|
|
</p>
|
|
<p>
|
|
JSON will be returned by default. You need to specifiy what types of output you're looking for by specifing
|
|
the output-type param.
|
|
</p>
|
|
</div>
|
|
<div class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="doc-example-item">
|
|
<h1>As Request Query</h1>
|
|
<div class="example-code">
|
|
<p class="url">https://api.fyipe.com/your-path?output-type=xml</p>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div id="errors" class="cf-grid-container dev-doc-item-container dev-doc-description-container">
|
|
<div class="col-lg-half col-md-half dev-doc-item">
|
|
<h1>Errors</h1>
|
|
<p>
|
|
<p>The Fyipe Developers API uses standard HTTP response codes for responses. These HTTP codes indicate
|
|
whether or not an API operation is successful.</p>
|
|
<p>Status Code 200 is the desired response code. A standard JSON response will follow.</p>
|
|
<p>Codes in the 400s range detail all of the errors a Fyipe Developer could encounter while using the API.
|
|
Bad Request, Rate Limit Reached, and Unauthorized are some of the sorts of responses in the 400s block.</p>
|
|
<p>Codes in the 500s range are error responses from the Fyipe system. If an error has occured anywhere in the
|
|
execution of a resource that was not due to user input, a 500 response will be returned with a
|
|
corresponding JSON
|
|
error body. In that body will contain a message detailing what went wrong.</p>
|
|
</p>
|
|
</div>
|
|
<div class="col-lg-half col-md-half dev-doc-example">
|
|
<div class="doc-example-item">
|
|
<h1>HTTP Status Codes</h1>
|
|
<div class="example-table">
|
|
<ul>
|
|
|
|
<li>
|
|
<div class="col-lg-third-1 col-md-half status-title">200</div>
|
|
<div class="col-lg-third-2 col-md-half status-description">OK - Everything went as planned</div>
|
|
</li>
|
|
|
|
<li>
|
|
<div class="col-lg-third-1 col-md-half status-title">204</div>
|
|
<div class="col-lg-third-2 col-md-half status-description">NO CONTENT - Request fulfilled, but no body</div>
|
|
</li>
|
|
|
|
<li>
|
|
<div class="col-lg-third-1 col-md-half status-title">400</div>
|
|
<div class="col-lg-third-2 col-md-half status-description">BAD REQUEST - The request was formatted
|
|
improperly
|
|
</div>
|
|
</li>
|
|
|
|
<li>
|
|
<div class="col-lg-third-1 col-md-half status-title">401</div>
|
|
<div class="col-lg-third-2 col-md-half status-description">UNAUTHORIZED - API Key missing or invalid</div>
|
|
</li>
|
|
|
|
<li>
|
|
<div class="col-lg-third-1 col-md-half status-title">403</div>
|
|
<div class="col-lg-third-2 col-md-half status-description">FORBIDDEN - Insufficient permissions</div>
|
|
</li>
|
|
|
|
<li>
|
|
<div class="col-lg-third-1 col-md-half status-title">404</div>
|
|
<div class="col-lg-third-2 col-md-half status-description">NOT FOUND - The resource requested does not
|
|
exist
|
|
</div>
|
|
</li>
|
|
|
|
<li>
|
|
<div class="col-lg-third-1 col-md-half status-title">500</div>
|
|
<div class="col-lg-third-2 col-md-half status-description">INTERNAL ERROR - We had an error! Sorry
|
|
about
|
|
that.</div>
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!--
|
|
Alert API START
|
|
-->
|
|
<article id="alerts" class="cf-grid-container dev-doc-item-container">
|
|
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<b>
|
|
<h1>Alerts</h1>
|
|
</b>
|
|
<p>
|
|
<p>Alerts API gets all the alerts sent your team members. If you want to see alerts that are sent to your
|
|
customers who have subscribed to incidents. Please check subscriber alerts instead. </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/alert/</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="attribute-parameter-container">
|
|
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
</section>
|
|
</article>
|
|
|
|
<article id="Alert-getAll" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Get all alerts<span class="requestType">GET</span></h3>
|
|
<p>
|
|
<p> Get the log of all alerts sent to your team. </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/alert/:projectId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Query String</h3>
|
|
<ul class="doc-item-detail-container">
|
|
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type ">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for your Fyipe Project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>limit</span>
|
|
<span class="item-type ">integer</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Number of items you need from the API.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>skip</span>
|
|
<span class="item-type ">integer</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Number of items you want to skip. This is used for pagination.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code">
|
|
<p class="url"> https://api.fyipe.com/alert/:projectId?api-key=XXX&limit=10&skip=0</p>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>{
|
|
"data":
|
|
[
|
|
{
|
|
"_id": "5bf55a2ed2f835000fb63fae",
|
|
"createdAt": "2018-11-21T13:14:22.111Z",
|
|
"project": {
|
|
"_id": "5bd722c156f172000f33a2cc",
|
|
"name": "Sample Project"
|
|
},
|
|
"subProjectId": {
|
|
"_id": "5bd722c156f172000f33a2cc",
|
|
"name": "Sub Project Name"
|
|
},
|
|
"monitor": {
|
|
"_id": "5bf55957e2e78a000ff4c001",
|
|
"name": "Sample Monitor"
|
|
},
|
|
"alertVia": "sms",
|
|
"userId": {
|
|
"_id": "5b0c1298367534000fdbc46e",
|
|
"name": "Team Member Name"
|
|
},
|
|
"incidentId": "5bf55a2dd2f835000fb63fab",
|
|
|
|
},
|
|
{
|
|
"_id": "5bf55a2ed2f835000fb63fad",
|
|
"createdAt": "2018-11-21T13:14:22.089Z",
|
|
"project": {
|
|
"_id": "5bd722c156f172000f33a2cc",
|
|
"name": "Sample Project"
|
|
},
|
|
"subProjectId": {
|
|
"_id": "5bd722c156f172000f33a2cc",
|
|
"name": "Sub Project Name"
|
|
},
|
|
"monitor": {
|
|
"_id": "5bf55957e2e78a000ff4c001",
|
|
"name": "Sample Monitor"
|
|
},
|
|
"alertVia": "call",
|
|
"userId": {
|
|
"_id": "5b0c1298367534000fdbc46e",
|
|
"name": "Team Member Name"
|
|
},
|
|
"incidentId": "5bf55a2dd2f835000fb63fab",
|
|
|
|
}
|
|
],
|
|
"count":2,
|
|
"skip":"0",
|
|
"limit":"10"
|
|
}</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
</article>
|
|
|
|
<article id="Alert-By-Incident-getAll" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Get all alerts by Incident<span class="requestType">GET</span></h3>
|
|
<p>
|
|
<p> Get the log of all alerts sent to your team by Incident. </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/alert/:projectId/:incidentId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Query String</h3>
|
|
<ul class="doc-item-detail-container">
|
|
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type ">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for your Fyipe Project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>limit</span>
|
|
<span class="item-type ">integer</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Number of items you need from the API.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>skip</span>
|
|
<span class="item-type ">integer</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Number of items you want to skip. This is used for pagination.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code">
|
|
<p class="url"> https://api.fyipe.com/alert/:projectId?api-key=XXX&limit=10&skip=0</p>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>{
|
|
"data":
|
|
[
|
|
{
|
|
"_id": "5bf55a2ed2f835000fb63fae",
|
|
"createdAt": "2018-11-21T13:14:22.111Z",
|
|
"project": {
|
|
"_id": "5bd722c156f172000f33a2cc",
|
|
"name": "Sample Project"
|
|
},
|
|
"subProjectId": {
|
|
"_id": "5bd722c156f172000f33a2cc",
|
|
"name": "Sub Project Name"
|
|
},
|
|
"monitor": {
|
|
"_id": "5bf55957e2e78a000ff4c001",
|
|
"name": "Sample Monitor"
|
|
},
|
|
"alertVia": "sms",
|
|
"userId": {
|
|
"_id": "5b0c1298367534000fdbc46e",
|
|
"name": "Team Member Name"
|
|
},
|
|
"incidentId": "5bf55a2dd2f835000fb63fab",
|
|
|
|
},
|
|
{
|
|
"_id": "5bf55a2ed2f835000fb63fad",
|
|
"createdAt": "2018-11-21T13:14:22.089Z",
|
|
"project": {
|
|
"_id": "5bd722c156f172000f33a2cc",
|
|
"name": "Sample Project"
|
|
},
|
|
"subProjectId": {
|
|
"_id": "5bd722c156f172000f33a2cc",
|
|
"name": "Sub Project Name"
|
|
},
|
|
"monitor": {
|
|
"_id": "5bf55957e2e78a000ff4c001",
|
|
"name": "Sample Monitor"
|
|
},
|
|
"alertVia": "call",
|
|
"userId": {
|
|
"_id": "5b0c1298367534000fdbc46e",
|
|
"name": "Team Member Name"
|
|
},
|
|
"incidentId": "5bf55a2dd2f835000fb63fab",
|
|
|
|
}
|
|
],
|
|
"count":2,
|
|
"skip":"0",
|
|
"limit":"10"
|
|
}</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
<!--
|
|
Alert API End
|
|
-->
|
|
|
|
<!--
|
|
Incident API START
|
|
-->
|
|
|
|
<article id="incident" class="cf-grid-container dev-doc-item-container">
|
|
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<b>
|
|
<h1>Incidents</h1>
|
|
</b>
|
|
<p>
|
|
<p>Inidents are created when your monitor goes down. Incidents alerts team members which are responsible for
|
|
that monitor. Team members can Acknowledge the incident and when the issue is fixed, resolve it. </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/incident/</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="attribute-parameter-container">
|
|
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
</section>
|
|
</article>
|
|
|
|
<!-- POST -->
|
|
|
|
<article id="Incident-getAll" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Create Incident<span class="requestType">POST</span></h3>
|
|
<p>
|
|
<p> Create an incident for a monitor. If an unresolved incident exists, then it is returne and no new
|
|
incident is created. </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/incident/:projectId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Body</h3>
|
|
<ul class="doc-item-detail-container">
|
|
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>monitorId</span>
|
|
<span class="item-type ">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>ID of the monitor you want to create incidents for.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for the project or sub project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code example-response">
|
|
<p>Request URL</p>
|
|
<p class="url">https://api.fyipe.com/incident/:projectId</p>
|
|
<p>Request Body</p>
|
|
<pre><code class="language-json"><p>{
|
|
"api-key":"xxx",
|
|
"monitorId": "5b521b39f1a8f6000fce3839"
|
|
}</p></code></pre>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>{
|
|
"acknowledged": false,
|
|
"resolved": false,
|
|
"internalNote": "",
|
|
"investigationNote": "",
|
|
"_id": "5bf698dad2f835000fb63fb6",
|
|
"createdAt": "2018-11-22T11:54:02.716Z",
|
|
"project": {
|
|
"_id": "5bd722c156f172000f33a2cc",
|
|
"name": "Sample Project"
|
|
},
|
|
"subProjectId": "xf3cf7a6c6cc5a000fc523be",
|
|
"monitor": {
|
|
"_id": "5b521b39f1a8f6000fce3839",
|
|
"name": "cloudboost",
|
|
},
|
|
"createdBy": {
|
|
"_id": "5b0c1298367534000fdbc46e",
|
|
"name": "Nawaz Dhandala"
|
|
}
|
|
}</p></code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
<article id="Incidents-By-Monitor-getAll" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Get all incidents by Monitor<span class="requestType">GET</span></h3>
|
|
<p>
|
|
<p> Get the log of all incidents by Monitor. </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/incident/:projectId/:monitorId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Query String</h3>
|
|
<ul class="doc-item-detail-container">
|
|
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type ">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for your Fyipe Project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>limit</span>
|
|
<span class="item-type ">integer</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Number of items you need from the API.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>skip</span>
|
|
<span class="item-type ">integer</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Number of items you want to skip. This is used for pagination.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code">
|
|
<p class="url">
|
|
https://api.fyipe.com/incident/:projectId/:monitorId?api-key=XXX&limit=10&skip=0</p>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>{
|
|
"data":
|
|
[
|
|
{
|
|
"acknowledged": false,
|
|
"resolved": false,
|
|
"internalNote": "",
|
|
"investigationNote": "",
|
|
"_id": "5bf698dad2f835000fb63fb6",
|
|
"createdAt": "2018-11-22T11:54:02.716Z",
|
|
"project": {
|
|
"_id": "5bd722c156f172000f33a2cc",
|
|
"name": "Sample Project"
|
|
},
|
|
"subProjectId": "xf3cf7a6c6cc5a000fc523be",
|
|
"monitor": {
|
|
"_id": "5b521b39f1a8f6000fce3839",
|
|
"name": "cloudboost",
|
|
},
|
|
"createdBy": {
|
|
"_id": "5b0c1298367534000fdbc46e",
|
|
"name": "Nawaz Dhandala"
|
|
},
|
|
|
|
},
|
|
{
|
|
"acknowledged": false,
|
|
"resolved": false,
|
|
"internalNote": "",
|
|
"investigationNote": "",
|
|
"_id": "5bf698dad2f835000fb63fb6",
|
|
"createdAt": "2018-11-22T11:54:02.716Z",
|
|
"project": {
|
|
"_id": "5bd722c156f172000f33a2cc",
|
|
"name": "Sample Project"
|
|
},
|
|
"subProjectId": "xf3cf7a6c6cc5a000fc523be",
|
|
"monitor": {
|
|
"_id": "5b521b39f1a8f6000fce3839",
|
|
"name": "cloudboost",
|
|
},
|
|
"createdBy": {
|
|
"_id": "5b0c1298367534000fdbc46e",
|
|
"name": "Nawaz Dhandala"
|
|
},
|
|
|
|
}
|
|
],
|
|
"count":2,
|
|
"skip":"0",
|
|
"limit":"10"
|
|
}</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
<article id="Incidents-By-Project-getAll" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Get all incidents by Project<span class="requestType">GET</span></h3>
|
|
<p>
|
|
<p> Get the log of all incidents by Project. </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/incident/:projectId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Query String</h3>
|
|
<ul class="doc-item-detail-container">
|
|
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type ">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for your Fyipe Project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>limit</span>
|
|
<span class="item-type ">integer</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Number of items you need from the API.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>skip</span>
|
|
<span class="item-type ">integer</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Number of items you want to skip. This is used for pagination.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code">
|
|
<p class="url"> https://api.fyipe.com/incident/:projectId?api-key=XXX&limit=10&skip=0</p>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>{
|
|
"data":
|
|
[
|
|
{
|
|
"acknowledged": false,
|
|
"resolved": false,
|
|
"internalNote": "",
|
|
"investigationNote": "",
|
|
"_id": "5bf698dad2f835000fb63fb6",
|
|
"createdAt": "2018-11-22T11:54:02.716Z",
|
|
"project": {
|
|
"_id": "5bd722c156f172000f33a2cc",
|
|
"name": "Sample Project"
|
|
},
|
|
"subProjectId": "xf3cf7a6c6cc5a000fc523be",
|
|
"monitor": {
|
|
"_id": "5b521b39f1a8f6000fce3839",
|
|
"name": "cloudboost",
|
|
},
|
|
"createdBy": {
|
|
"_id": "5b0c1298367534000fdbc46e",
|
|
"name": "Nawaz Dhandala"
|
|
},
|
|
|
|
},
|
|
{
|
|
"acknowledged": false,
|
|
"resolved": false,
|
|
"internalNote": "",
|
|
"investigationNote": "",
|
|
"_id": "5bf698dad2f835000fb63fb6",
|
|
"createdAt": "2018-11-22T11:54:02.716Z",
|
|
"project": {
|
|
"_id": "5bd722c156f172000f33a2cc",
|
|
"name": "Sample Project"
|
|
},
|
|
"subProjectId": "xf3cf7a6c6cc5a000fc523be",
|
|
"monitor": {
|
|
"_id": "5b521b39f1a8f6000fce3839",
|
|
"name": "cloudboost",
|
|
},
|
|
"createdBy": {
|
|
"_id": "5b0c1298367534000fdbc46e",
|
|
"name": "Nawaz Dhandala"
|
|
},
|
|
|
|
}
|
|
],
|
|
"count":2,
|
|
"skip":"0",
|
|
"limit":"10"
|
|
}</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
<article id="Incident-get" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Get incident by Incident ID<span class="requestType">GET</span></h3>
|
|
<p>
|
|
<p> Get the incident by Incident ID. </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/incident/:projectId/:incidentId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Query String</h3>
|
|
<ul class="doc-item-detail-container">
|
|
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type ">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for your Fyipe Project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code">
|
|
<p class="url"> https://api.fyipe.com/incident/:projectId/:incidentId?api-key=XXX</p>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>{
|
|
"acknowledged": false,
|
|
"resolved": false,
|
|
"internalNote": "",
|
|
"investigationNote": "",
|
|
"_id": "5bf698dad2f835000fb63fb6",
|
|
"createdAt": "2018-11-22T11:54:02.716Z",
|
|
"project": {
|
|
"_id": "5bd722c156f172000f33a2cc",
|
|
"name": "Sample Project"
|
|
},
|
|
"subProjectId": "xf3cf7a6c6cc5a000fc523be",
|
|
"monitor": {
|
|
"_id": "5b521b39f1a8f6000fce3839",
|
|
"name": "cloudboost",
|
|
},
|
|
"createdBy": {
|
|
"_id": "5b0c1298367534000fdbc46e",
|
|
"name": "Nawaz Dhandala"
|
|
},
|
|
}</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
<!-- POST -->
|
|
|
|
<article id="Incident-update" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Update an incident<span class="requestType">PUT</span></h3>
|
|
<p>
|
|
<p> Update an incident (acknowledge it, resolve it, or post investigation notes or internal notes) </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/incident/:projectId/:incidentId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Body</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for the project or sub project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>resolved</span>
|
|
<span class="item-type">boolean</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Is this incident resolved?</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>acknowledged</span>
|
|
<span class="item-type">boolean</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Is this incident acknowledged?</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>internalNote</span>
|
|
<span class="item-type">boolean</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Internal note for your team</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>investigationNote</span>
|
|
<span class="item-type">boolean</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Investigation note that will be posted to status page.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code example-response">
|
|
<p>Request URL</p>
|
|
<p class="url">https://api.fyipe.com/incident/:projectId/:incidentId</p>
|
|
<p>Request Body</p>
|
|
<pre><code class="language-json"><p>{
|
|
"api-key":"xxx",
|
|
"acknowledged": true
|
|
}</p></code></pre>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>
|
|
{
|
|
"acknowledged": true,
|
|
"resolved": false,
|
|
"internalNote": "",
|
|
"investigationNote": "",
|
|
"_id": "5bf698dad2f835000fb63fb6",
|
|
"createdAt": "2018-11-22T11:54:02.716Z",
|
|
"project": {
|
|
"_id": "5bd722c156f172000f33a2cc",
|
|
"name": "Sample Project"
|
|
},
|
|
"subProjectId": "xf3cf7a6c6cc5a000fc523be",
|
|
"monitor": {
|
|
"_id": "5b521b39f1a8f6000fce3839",
|
|
"createdAt": "2018-07-20T17:26:17.087Z",
|
|
"pollTime": "2018-10-28T07:35:28.736Z",
|
|
"updateTime": "2018-10-28T00:00:18.320Z",
|
|
"createdBy": "5b0c1298367534000fdbc46e",
|
|
"name": "cloudboost",
|
|
"type": "url",
|
|
"data": {
|
|
"url": "https://cloudboost.io/"
|
|
},
|
|
"project": {
|
|
"_id": "5bd722c156f172000f33a2cc",
|
|
"name": "Sample Project"
|
|
}
|
|
},
|
|
"createdBy": {
|
|
"_id": "5b0c1298367534000fdbc46e",
|
|
"name": "Nawaz Dhandala"
|
|
},
|
|
"acknowledgedBy":{
|
|
"_id": "5b0c1298367534000fdbc46e",
|
|
"name": "Nawaz Dhandala"
|
|
},
|
|
"acknowledgedAt": "2018-11-22T11:54:02.716Z",
|
|
}
|
|
|
|
</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
|
|
<!--
|
|
INCIDENT API ENDS
|
|
-->
|
|
|
|
<!--
|
|
Monitor API Begins
|
|
-->
|
|
|
|
|
|
|
|
<!-- POST -->
|
|
|
|
<article id="monitor" class="cf-grid-container dev-doc-item-container">
|
|
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<b>
|
|
<h1>Monitors</h1>
|
|
</b>
|
|
<p>
|
|
<p>Monitors are the one's that actually monitors your resource, and creates a new incident when something
|
|
unexpected happens. Resource can be a URL, Device, Server, Application or a Process. </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/monitor/</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="attribute-parameter-container">
|
|
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
</section>
|
|
</article>
|
|
|
|
<article id="Monitor-create" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Create a monitor<span class="requestType">POST</span></h3>
|
|
<p>
|
|
<p> Create a monitor in the project. </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/monitor/:projectId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Body</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for the project or sub project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>name</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Monitor Name</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>monitorCategoryId (optional)</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Monitor category ID of the monitor category you want to attach with the monitor.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>type</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Monitor Type- This can be `url` if you monitor a URL, can be `device` if you want to monitor a
|
|
device or can be `manual` like the monitor to not monitor anything.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>type</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Monitor Type- This can be `url` if you monitor a URL, can be `device` if you want to monitor a
|
|
device or can be `manual` like the monitor to not monitor anything.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>data</span>
|
|
<span class="item-type">json</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>If monitor type is `url`. Data should be {url: 'https://anyurl.com'} which is the URL that you
|
|
would like to monitor. <br /> If monitor type is `device`. Data should be `{deviceId: 'any-id'}.
|
|
Device ID is any ID of an IoT device that you would like to monitor. <br /> If Monitor Type is
|
|
`Manual`. Data can be null. </p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code example-response">
|
|
<p>Request URL</p>
|
|
<p class="url">https://api.fyipe.com/monitor/:projectId</p>
|
|
<p>Request Body</p>
|
|
<pre><code class="language-json"><p>{
|
|
"api-key":"xxx",
|
|
"name": "Google",
|
|
"type": "url",
|
|
"monitorCategoryId":"5cf5f4c27428480b750ae199",
|
|
"data": {
|
|
"url": "https://google.com"
|
|
}
|
|
}</p></code></pre>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>{
|
|
"_id": "5b521b39f1a8f6000fce3839",
|
|
"createdAt": "2018-07-20T17:26:17.087Z",
|
|
"pollTime": "2018-10-28T07:35:28.736Z",
|
|
"updateTime": "2018-10-28T00:00:18.320Z",
|
|
"createdBy": "5b0c1298367534000fdbc46e",
|
|
"name": "Google",
|
|
"type": "url",
|
|
"monitorCategoryId":"5cf5f4c27428480b750ae199",
|
|
"data": {
|
|
"url": "https://google.com/"
|
|
},
|
|
"project": {
|
|
"_id": "5bd722c156f172000f33a2cc",
|
|
"name": "Sample Project"
|
|
},
|
|
} </p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
<article id="Monitor-update" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Update a monitor<span class="requestType">PUT</span></h3>
|
|
<p>
|
|
<p> Update a monitor in the project. You cannot change the type of the monitor. </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/monitor/:projectId/:monitorId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Body</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for the project or sub project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>name</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Monitor Name</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>type</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Monitor Type- This can be `url` if you monitor a URL, can be `device` if you want to monitor a
|
|
device or can be `manual` like the monitor to not monitor anything.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>data</span>
|
|
<span class="item-type">json</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>If monitor type is `url`. Data should be {url: 'https://anyurl.com'} which is the URL that you
|
|
would like to monitor. <br /> If monitor type is `device`. Data should be `{deviceId: 'any-id'}.
|
|
Device ID is any ID of an IoT device that you would like to monitor. <br /> If Monitor Type is
|
|
`Manual`. Data can be null. </p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code example-response">
|
|
<p>Request URL</p>
|
|
<p class="url">https://api.fyipe.com/monitor/:projectId/:monitorId</p>
|
|
<p>Request Body</p>
|
|
<pre><code class="language-json"><p>{
|
|
"api-key":"xxx",
|
|
"name": "Google",
|
|
"data": {
|
|
"url": "https://google.com"
|
|
}
|
|
}</p></code></pre>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>{
|
|
"_id": "5b521b39f1a8f6000fce3839",
|
|
"createdAt": "2018-07-20T17:26:17.087Z",
|
|
"pollTime": "2018-10-28T07:35:28.736Z",
|
|
"updateTime": "2018-10-28T00:00:18.320Z",
|
|
"createdBy": "5b0c1298367534000fdbc46e",
|
|
"name": "Google",
|
|
"type": "url",
|
|
"data": {
|
|
"url": "https://google.com/"
|
|
},
|
|
"project": {
|
|
"_id": "5bd722c156f172000f33a2cc",
|
|
"name": "Sample Project"
|
|
},
|
|
}</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
<article id="Monitor-getAll" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Get all monitors by Project ID<span class="requestType">GET</span></h3>
|
|
<p>
|
|
<p> Get all monitors by Project ID. </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/monitor/:projectId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Query String</h3>
|
|
<ul class="doc-item-detail-container">
|
|
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type ">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for your Fyipe Project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>skip</span>
|
|
<span class="item-type ">integer</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Items you would like to skip. This is used for pagination.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>limit</span>
|
|
<span class="item-type ">integer</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Number of items you want to get from the API.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code">
|
|
<p class="url"> https://api.fyipe.com/monitor/:projectId?api-key=XXX&skip=0&limit=10</p>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>
|
|
{
|
|
"monitors":
|
|
[
|
|
{
|
|
"_id": "5b521b39f1a8f6000fce3839",
|
|
"createdAt": "2018-07-20T17:26:17.087Z",
|
|
"pollTime": "2018-10-28T07:35:28.736Z",
|
|
"updateTime": "2018-10-28T00:00:18.320Z",
|
|
"createdBy": "5b0c1298367534000fdbc46e",
|
|
"name": "cloudboost",
|
|
"type": "url",
|
|
"data": {
|
|
"url": "https://cloudboost.io/"
|
|
},
|
|
"project": {
|
|
"_id": "5bd722c156f172000f33a2cc",
|
|
"name": "Sample Project"
|
|
},
|
|
}
|
|
],
|
|
"count":1,
|
|
"skip":"0",
|
|
"limit":"10"
|
|
}
|
|
|
|
</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
<article id="Monitor-get" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Get monitor by monitor ID<span class="requestType">GET</span></h3>
|
|
<p>
|
|
<p> Get all monitors by Monitor ID. </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/monitor/:projectId/:monitorId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Query String</h3>
|
|
<ul class="doc-item-detail-container">
|
|
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type ">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for your Fyipe Project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code">
|
|
<p class="url"> https://api.fyipe.com/monitor/:projectId/:monitorId?api-key=XXX</p>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>{
|
|
"_id": "5b521b39f1a8f6000fce3839",
|
|
"createdAt": "2018-07-20T17:26:17.087Z",
|
|
"pollTime": "2018-10-28T07:35:28.736Z",
|
|
"updateTime": "2018-10-28T00:00:18.320Z",
|
|
"createdBy": "5b0c1298367534000fdbc46e",
|
|
"name": "cloudboost",
|
|
"type": "url",
|
|
"data": {
|
|
"url": "https://cloudboost.io/"
|
|
},
|
|
"project": {
|
|
"_id": "5bd722c156f172000f33a2cc",
|
|
"name": "Sample Project"
|
|
},
|
|
|
|
}</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
<!-- DELETE -->
|
|
|
|
<article id="Monitor-delete" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Delete a monitor<span class="requestType">DELETE</span></h3>
|
|
<p>
|
|
<p> Delete a monitor by Monitor ID </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/monitor/:projectId/:monitorId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Query String</h3>
|
|
<ul class="doc-item-detail-container">
|
|
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type ">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for your Fyipe Project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code">
|
|
<p class="url"> https://api.fyipe.com/monitor/:projectId/:monitorId?api-key=XXX</p>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>
|
|
{
|
|
"_id": "5b521b39f1a8f6000fce3839",
|
|
"createdAt": "2018-07-20T17:26:17.087Z",
|
|
"pollTime": "2018-10-28T07:35:28.736Z",
|
|
"updateTime": "2018-10-28T00:00:18.320Z",
|
|
"createdBy": "5b0c1298367534000fdbc46e",
|
|
"name": "cloudboost",
|
|
"type": "url",
|
|
"data": {
|
|
"url": "https://cloudboost.io/"
|
|
},
|
|
"project": {
|
|
"_id": "5bd722c156f172000f33a2cc",
|
|
"name": "Sample Project"
|
|
},
|
|
|
|
}
|
|
</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
<article id="Monitor-Device-update" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Update Monitor of Type Device <span class="requestType">POST</span> or <span class="requestType">GET</span></h3>
|
|
<p>
|
|
<p> Monitor of Type device needs to send a post or a get request in order to keep the monitor updated. If the
|
|
monitor is not updated, then an incident is automatically created and that alerts the team. </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/monitor/:projectId/inbound/:deviceId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Query String or Body</h3>
|
|
<ul class="doc-item-detail-container">
|
|
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type ">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for your Fyipe Project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code">
|
|
<p class="url"> https://api.fyipe.com/monitor/:projectId/inbound/:deviceId?api-key=XXX</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>
|
|
{
|
|
|
|
}
|
|
|
|
</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
<!-- Monitor docs end-->
|
|
|
|
|
|
<!--Monitor Category docs start-->
|
|
|
|
<article id="monitor-category" class="cf-grid-container dev-doc-item-container">
|
|
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<b>
|
|
<h1>Monitor Category</h1>
|
|
</b>
|
|
<p>
|
|
<p>Monitor can be categorized in any way you like. Most of our customers categorize monitors by location - Eg: US EAST, US WEST, EU. You can also categorize monitors by projects. </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/monitorCategory/</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="attribute-parameter-container">
|
|
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
</section>
|
|
</article>
|
|
|
|
<article id="MonitorCategory-create" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Create a monitor category<span class="requestType">POST</span></h3>
|
|
<p>
|
|
<p>Create a monitor category in the project.</p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/monitorCategory/:projectId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Body</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li data-location="body">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for the project or sub project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="body">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>monitorCategoryName</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Name for your monitor category.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code example-response">
|
|
<p>Request URL</p>
|
|
<p class="url">https://api.fyipe.com/monitorCategory/:projectId</p>
|
|
<p>Request Body</p>
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>
|
|
{
|
|
"api-key":"xxx",
|
|
"monitorCategoryName":"US EAST"
|
|
}
|
|
</p>
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>
|
|
{
|
|
"_id": "5cf0415ad79fda043a0b0916",
|
|
"createdAt": "2019-05-30T20:47:22.581Z",
|
|
"projectId": "5ce6a2fd2ffa26020dbe00b7",
|
|
"createdById": "5ce6a2f52ffa26020dbe00b6",
|
|
"name": "US EAST",
|
|
"__v": 0
|
|
}
|
|
</p>
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
<article id="MonitorCategory-getAll" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Get all monitor categories by project<span class="requestType">GET</span></h3>
|
|
<p>
|
|
<p>Get all monitor categories by project ID.</p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/monitorCategory/:projectId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Query String</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li data-location="Query">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type ">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for your Fyipe Project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="query">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>skip</span>
|
|
<span class="item-type ">integer</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Items you would like to skip. This is used for pagination.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
|
|
<li data-location="query">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>limit</span>
|
|
<span class="item-type ">integer</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Number of items you want to get from the API.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code">
|
|
<p class="url"> https://api.fyipe.com/monitorCategory/:projectId?api-key=XXX&skip=0&limit=10</p>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>
|
|
{
|
|
"data": [
|
|
{
|
|
"name": "EU",
|
|
"_id": "5cef73a78b3eac1c10ec6ab2",
|
|
"createdAt": "2019-05-30T06:09:43.129Z"
|
|
},
|
|
{
|
|
"name": "US WEST",
|
|
"_id": "5cee7d95e194a35afba8b9aa",
|
|
"createdAt": "2019-05-29T12:39:49.062Z"
|
|
}
|
|
],
|
|
"count": 2,
|
|
"skip":0,
|
|
"limit":10
|
|
}
|
|
|
|
</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
<article id="MonitorCategory-delete" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Delete a monitor category<span class="requestType">DELETE</span></h3>
|
|
<p>
|
|
<p> Delete a monitor category by ID.</p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/monitorCategory/:projectId/:monitorCategoryId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Query String</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li data-location="Query">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type ">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for your Fyipe Project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code">
|
|
<p class="url"> https://api.fyipe.com/monitorCategory/:projectId/:monitorCategoryId?api-key=XXX</p>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>
|
|
{
|
|
"_id": "5ced0a7ed05b2e0ff15e0759",
|
|
"createdAt": "2019-05-28T10:16:30.829Z",
|
|
"projectId": "5ce6a2fd2ffa26020dbe00b7",
|
|
"createdById": "5ce6a2f52ffa26020dbe00b6",
|
|
"name": "US EAST",
|
|
"__v": 0,
|
|
}
|
|
</p>
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
|
|
<!--Monitor Category docs end-->
|
|
|
|
|
|
<!-- Scheudle API -->
|
|
|
|
<article id="schedule" class="cf-grid-container dev-doc-item-container">
|
|
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<b>
|
|
<h1>Schedule</h1>
|
|
</b>
|
|
<p>
|
|
<p>Schedules defines who in your team will be alerted when the incident is created. How the escalation polies
|
|
are created, and more. </p>
|
|
</p>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/schedule/</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="attribute-parameter-container">
|
|
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
</section>
|
|
</article>
|
|
|
|
<article id="Schedule-create" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Create a schedule<span class="requestType">POST</span></h3>
|
|
<p>
|
|
<p> Create a schedule in the project. </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/schedule/:projectId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Body</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for the project or sub project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>name</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Schedule Name</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>userIds</span>
|
|
<span class="item-type">Array</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Who in your team will be alerted for this schedule.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>monitorIds</span>
|
|
<span class="item-type">Array</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Which monitors do you want to include in this schedule.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code example-response">
|
|
<p>Request URL</p>
|
|
<p class="url">https://api.fyipe.com/schedule/:projectId</p>
|
|
<p>Request Body</p>
|
|
<pre><code class="language-json"><p>{
|
|
"api-key":"xxx",
|
|
"name": "Sample Schedule",
|
|
"monitorIds": ["5b521b39f1a8f6000fce3839"],
|
|
"userIds": ["5b0c1298367534000fdbc46e"]
|
|
}</p></code></pre>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>
|
|
{
|
|
"users": [{
|
|
"_id": "5b0c1298367534000fdbc46e",
|
|
"name": "Nawaz Dhandala"
|
|
}],
|
|
"monitors": [
|
|
{
|
|
"_id": "5b0ed2b5ff1870000fd249c0",
|
|
"name": "Dashboard"
|
|
}
|
|
],
|
|
"_id": "5bbe0286d2f835000fb63e91",
|
|
"name": "Sample Schedule",
|
|
"createdBy": {
|
|
"_id": "5b0c1298367534000fdbc46e",
|
|
"name": "Nawaz Dhandala"
|
|
},
|
|
"project": {
|
|
"_id": "5b0c129e367534000fdbc46f",
|
|
"name": "CloudBoost"
|
|
},
|
|
"createdAt": "2018-10-10T13:45:42.206Z",
|
|
|
|
}
|
|
|
|
</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
<article id="Schedule-getAll" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Get all schedules by Project<span class="requestType">GET</span></h3>
|
|
<p>
|
|
<p> Get all schedules by Project </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/schedule/:projectId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Query String</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for the project or sub project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>limit</span>
|
|
<span class="item-type">integer</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Number of items you would like to return from the API.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>skip</span>
|
|
<span class="item-type">integer</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Number of items you would need to skip. This is used in pagination</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code example-response">
|
|
<p>Request URL</p>
|
|
<p class="url">https://api.fyipe.com/schedule/:projectId?skip=0&limit=10&api-key=XXX</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>
|
|
{
|
|
"data" [{
|
|
"users": [
|
|
{
|
|
"_id": "5b0c1298367534000fdbc46e",
|
|
"name": "Nawaz Dhandala"
|
|
}
|
|
],
|
|
"monitors": [],
|
|
"_id": "5b49fab4d8dacb000fbfdaf7",
|
|
"name": "Dashboard",
|
|
"createdBy": {
|
|
"_id": "5b0c1298367534000fdbc46e",
|
|
"name": "Nawaz Dhandala"
|
|
},
|
|
"project": {
|
|
"_id": "5b0c129e367534000fdbc46f",
|
|
"name": "CloudBoost"
|
|
},
|
|
"createdAt": "2018-07-14T13:29:24.458Z",
|
|
|
|
}],
|
|
count:1,
|
|
skip:0,
|
|
limit:10
|
|
}
|
|
|
|
</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
<article id="Schedule-update" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Update a schedule<span class="requestType">PUT</span></h3>
|
|
<p>
|
|
<p> Update a schedule in the project. </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/schedule/:projectId/:scheduleId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Body</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for the project or sub project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>name</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Schedule Name</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>userIds</span>
|
|
<span class="item-type">Array</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Who in your team will be alerted for this schedule.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>monitorIds</span>
|
|
<span class="item-type">Array</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Which monitors do you want to include in this schedule.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code example-response">
|
|
<p>Request URL</p>
|
|
<p class="url">https://api.fyipe.com/schedule/:projectId/:scheduledId</p>
|
|
<p>Request Body</p>
|
|
<pre><code class="language-json"><p>{
|
|
"api-key":"xxx",
|
|
"name": "Sample Schedule",
|
|
"monitorIds": ["5b521b39f1a8f6000fce3839"],
|
|
"userIds": ["5b0c1298367534000fdbc46e"]
|
|
}</p></code></pre>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>
|
|
{
|
|
"users": [{
|
|
"_id": "5b0c1298367534000fdbc46e",
|
|
"name": "Nawaz Dhandala"
|
|
}],
|
|
"monitors": [
|
|
{
|
|
"_id": "5b0ed2b5ff1870000fd249c0",
|
|
"name": "Dashboard"
|
|
}
|
|
],
|
|
"_id": "5bbe0286d2f835000fb63e91",
|
|
"name": "Sample Schedule",
|
|
"createdBy": {
|
|
"_id": "5b0c1298367534000fdbc46e",
|
|
"name": "Nawaz Dhandala"
|
|
},
|
|
"project": {
|
|
"_id": "5b0c129e367534000fdbc46f",
|
|
"name": "CloudBoost"
|
|
},
|
|
"createdAt": "2018-10-10T13:45:42.206Z",
|
|
|
|
}
|
|
|
|
</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
|
|
<article id="Schedule-delete" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Delete a schedule<span class="requestType">DELETE</span></h3>
|
|
<p>
|
|
<p> Delete a schedule by Schedule ID </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/monitor/:projectId/:scheduleId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Query String</h3>
|
|
<ul class="doc-item-detail-container">
|
|
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type ">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for your Fyipe Project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code">
|
|
<p class="url"> https://api.fyipe.com/schedule/:projectId/:scheduleId?api-key=XXX</p>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>
|
|
{
|
|
"users": [{
|
|
"_id": "5b0c1298367534000fdbc46e",
|
|
"name": "Nawaz Dhandala"
|
|
}],
|
|
"monitors": [
|
|
{
|
|
"_id": "5b0ed2b5ff1870000fd249c0",
|
|
"name": "Dashboard"
|
|
}
|
|
],
|
|
"_id": "5bbe0286d2f835000fb63e91",
|
|
"name": "Sample Schedule",
|
|
"createdBy": {
|
|
"_id": "5b0c1298367534000fdbc46e",
|
|
"name": "Nawaz Dhandala"
|
|
},
|
|
"project": {
|
|
"_id": "5b0c129e367534000fdbc46f",
|
|
"name": "CloudBoost"
|
|
},
|
|
"createdAt": "2018-10-10T13:45:42.206Z",
|
|
|
|
}
|
|
</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
<!-- Schedule API Ends-->
|
|
|
|
|
|
<!-- Status Page API Starts -->
|
|
|
|
<article id="status-page" class="cf-grid-container dev-doc-item-container">
|
|
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<b>
|
|
<h1>Status Pages</h1>
|
|
</b>
|
|
<p>
|
|
<p>Status Pages creates a status page for your team or your customers (exactly like https://status.fyipe.com)
|
|
</p>
|
|
</p>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/statusPage/</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="attribute-parameter-container">
|
|
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
</section>
|
|
</article>
|
|
|
|
<article id="StatusPage-create" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Create a status page<span class="requestType">POST</span></h3>
|
|
<p>
|
|
<p> Create a status page in the project. </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/statusPage/:projectId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Body</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for the project or sub project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>name</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Status Page Name</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>title</span>
|
|
<span class="item-type">String</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Title of the status page</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>description</span>
|
|
<span class="item-type">String</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Description of the status page</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>copyright</span>
|
|
<span class="item-type">String</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Copyright Info about the status page</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>favicon</span>
|
|
<span class="item-type">String</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Favicon URL for the Status Page</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>logoPath</span>
|
|
<span class="item-type">String</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Logo URL for the status page</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>domain</span>
|
|
<span class="item-type">String</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Domain this status page will be hosted on</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>isPrivate</span>
|
|
<span class="item-type">Boolean</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Is this status page private to your team or public to the whole world.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>monitorIds</span>
|
|
<span class="item-type">Array</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Which monitors do you want to include in this status page?</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>links</span>
|
|
<span class="item-type">Array</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Links that you want in the footer of the status page. This should not exceed 5. The format
|
|
should be `{name: "Home", url: "https://homepage.com"}`</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code example-response">
|
|
<p>Request URL</p>
|
|
<p class="url">https://api.fyipe.com/statusPage/:projectId</p>
|
|
<p>Request Body</p>
|
|
<pre><code class="language-json"><p>{
|
|
"api-key":"xxx",
|
|
"name": "Sample Status Page",
|
|
"monitorIds": ["Ab0c129e367534000fdbc46f"],
|
|
"domain": "https://status.fyipe.com",
|
|
"links": {
|
|
"name": "Sample Link",
|
|
"url": "https://samplelink.com"
|
|
},
|
|
"isPrivate":false,
|
|
"description": "Sample description",
|
|
"title": "Sample Title",
|
|
"copyright": "HackerBay, Inc.",
|
|
"faviconPath": "https://path-to-fav-icon/favicon.ico",
|
|
"logoPath": "https://path-to-logo/logo.ico"
|
|
}</p></code></pre>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>{
|
|
"api-key":"xxx",
|
|
"name": "Sample Status Page",
|
|
"monitors": {
|
|
"_id": "Ab0c129e367534000fdbc46f",
|
|
"name": "Sample Monitor"
|
|
},
|
|
"domain": "https://status.fyipe.com",
|
|
"links": {
|
|
"name": "Sample Link",
|
|
"url": "https://samplelink.com"
|
|
},
|
|
"isPrivate":false,
|
|
"description": "Sample description",
|
|
"title": "Sample Title",
|
|
"copyright": "HackerBay, Inc.",
|
|
"faviconPath": "https://path-to-fav-icon/favicon.ico",
|
|
"logoPath": "https://path-to-logo/logo.ico",
|
|
"_id": "5bbe0286d2f835000fb63e91",
|
|
"createdBy": {
|
|
"_id": "5b0c1298367534000fdbc46e",
|
|
"name": "Nawaz Dhandala"
|
|
},
|
|
"project": {
|
|
"_id": "5b0c129e367534000fdbc46f",
|
|
"name": "CloudBoost"
|
|
},
|
|
"createdAt": "2018-10-10T13:45:42.206Z",
|
|
|
|
}
|
|
</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
<article id="StatusPage-By-Project-getAll" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Get all status pages by Project<span class="requestType">GET</span></h3>
|
|
<p>
|
|
<p> Get all status pages by Project </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/statusPage/:projectId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Query String</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for the project or sub project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>limit</span>
|
|
<span class="item-type">integer</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Number of items you would like to return from the API.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>skip</span>
|
|
<span class="item-type">integer</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Number of items you would need to skip. This is used in pagination</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code example-response">
|
|
<p>Request URL</p>
|
|
<p class="url">https://api.fyipe.com/statusPage/:projectId?skip=0&limit=10&api-key=XXX</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>
|
|
{
|
|
"data":[{
|
|
"_id":"5cef7d6d9d9d972fd9f505f4",
|
|
"monitorIds":[
|
|
{
|
|
"_id":"5cf0fea7a59bae3762ae4391",
|
|
"name":"Test",
|
|
"type":"url",
|
|
"data":{
|
|
"url":"https://www.test.com"
|
|
},
|
|
"monitorCategoryId":{
|
|
"_id":"5cf0cd658ffd6b2475396665",
|
|
"name":"US EAST"
|
|
},
|
|
"time":[
|
|
{
|
|
"date":"2019-06-04T05:54:53.114Z",
|
|
"monitorId":"5cf0fea7a59bae3762ae4391",
|
|
"upTime":254,
|
|
"downTime":3
|
|
},
|
|
{
|
|
"upTime":606,
|
|
"downTime":22,
|
|
"_id":"5cf56730c3e8414fe087425c",
|
|
"date":"2019-06-03T18:29:00.912Z",
|
|
"monitorId":"5cf0fea7a59bae3762ae4391",
|
|
"status":"online",
|
|
"__v":0
|
|
},
|
|
{
|
|
"upTime":491,
|
|
"downTime":7,
|
|
"_id":"5cf2c43a7319f36a0243b600",
|
|
"date":"2019-06-01T18:29:00.319Z",
|
|
"monitorId":"5cf0fea7a59bae3762ae4391",
|
|
"status":"online",
|
|
"__v":0
|
|
}
|
|
],
|
|
"stat":"online",
|
|
"totalUptimePercent":97.68618944323933
|
|
}
|
|
],
|
|
"links":null,
|
|
"isGroupedByMonitorCategory":true,
|
|
"deleted":false,
|
|
"createdAt":"2019-05-30T06:51:25.565Z",
|
|
"projectId":{
|
|
"_id":"5ce6a2fd2ffa26020dbe00b7",
|
|
"name":"Sample"
|
|
},
|
|
"domain":null,
|
|
"title":"Sample status page title",
|
|
"name":Sample status page name,
|
|
"isPrivate":false,
|
|
"description":null,
|
|
"copyright":null,
|
|
"faviconPath":null,
|
|
"logoPath":null,
|
|
"isSubscriberEnabled":true,
|
|
"__v":0
|
|
}],
|
|
"count":1,
|
|
"skip":0,
|
|
"limit":10
|
|
}
|
|
</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
<article id="StatusPage-By-Id-getAll" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Get status page by status page ID<span class="requestType">GET</span></h3>
|
|
<p>
|
|
<p> Get status pages by ID </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/statusPage/:projectId/:statusPageId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Query String</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for the project or sub project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code example-response">
|
|
<p>Request URL</p>
|
|
<p class="url">https://api.fyipe.com/statusPage/:projectId/:statusPageId?api-key=XXX</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>
|
|
{
|
|
"_id":"5cef7d6d9d9d972fd9f505f4",
|
|
"monitorIds":[
|
|
{
|
|
"_id":"5cf0fea7a59bae3762ae4391",
|
|
"name":"Test",
|
|
"type":"url",
|
|
"data":{
|
|
"url":"https://www.test.com"
|
|
},
|
|
"monitorCategoryId":{
|
|
"_id":"5cf0cd658ffd6b2475396665",
|
|
"name":"US EAST"
|
|
},
|
|
"time":[
|
|
{
|
|
"date":"2019-06-04T05:54:53.114Z",
|
|
"monitorId":"5cf0fea7a59bae3762ae4391",
|
|
"upTime":254,
|
|
"downTime":3
|
|
},
|
|
{
|
|
"upTime":606,
|
|
"downTime":22,
|
|
"_id":"5cf56730c3e8414fe087425c",
|
|
"date":"2019-06-03T18:29:00.912Z",
|
|
"monitorId":"5cf0fea7a59bae3762ae4391",
|
|
"status":"online",
|
|
"__v":0
|
|
},
|
|
{
|
|
"upTime":491,
|
|
"downTime":7,
|
|
"_id":"5cf2c43a7319f36a0243b600",
|
|
"date":"2019-06-01T18:29:00.319Z",
|
|
"monitorId":"5cf0fea7a59bae3762ae4391",
|
|
"status":"online",
|
|
"__v":0
|
|
}
|
|
],
|
|
"stat":"online",
|
|
"totalUptimePercent":97.68618944323933
|
|
}
|
|
],
|
|
"links":null,
|
|
"isGroupedByMonitorCategory":true,
|
|
"deleted":false,
|
|
"createdAt":"2019-05-30T06:51:25.565Z",
|
|
"projectId":{
|
|
"_id":"5ce6a2fd2ffa26020dbe00b7",
|
|
"name":"Sample"
|
|
},
|
|
"domain":null,
|
|
"title":"Sample status page",
|
|
"name":null,
|
|
"isPrivate":false,
|
|
"description":null,
|
|
"copyright":null,
|
|
"faviconPath":null,
|
|
"logoPath":null,
|
|
"isSubscriberEnabled":true,
|
|
"__v":0
|
|
}
|
|
</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
|
|
<article id="StatusPage-update" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Update a status page<span class="requestType">PUT</span></h3>
|
|
<p>
|
|
<p> Update a status page in the project. </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/statusPage/:projectId/:statusPageId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Body</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for the project or sub project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>name</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Status Page Name</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>title</span>
|
|
<span class="item-type">String</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Title of the status page</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>description</span>
|
|
<span class="item-type">String</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Description of the status page</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>copyright</span>
|
|
<span class="item-type">String</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Copyright Info about the status page</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>favicon</span>
|
|
<span class="item-type">String</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Favicon URL for the Status Page</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>logoPath</span>
|
|
<span class="item-type">String</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Logo URL for the status page</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>domain</span>
|
|
<span class="item-type">String</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Domain this status page will be hosted on</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>isPrivate</span>
|
|
<span class="item-type">Boolean</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Is this status page private to your team or public to the whole world.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>monitorIds</span>
|
|
<span class="item-type">Array</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Which monitors do you want to include in this status page?</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>links</span>
|
|
<span class="item-type">Array</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Links that you want in the footer of the status page. This should not exceed 5. The format
|
|
should be `{name: "Home", url: "https://homepage.com"}`</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code example-response">
|
|
<p>Request URL</p>
|
|
<p class="url">https://api.fyipe.com/statusPage/:projectId/:statusPageId</p>
|
|
<p>Request Body</p>
|
|
<pre><code class="language-json"><p>{
|
|
"api-key":"xxx",
|
|
"name": "Sample Status Page",
|
|
"monitorIds": ["Ab0c129e367534000fdbc46f"],
|
|
"domain": "https://status.fyipe.com",
|
|
"links": {
|
|
"name": "Sample Link",
|
|
"url": "https://samplelink.com"
|
|
},
|
|
"isPrivate":false,
|
|
"description": "Sample description",
|
|
"title": "Sample Title",
|
|
"copyright": "HackerBay, Inc.",
|
|
"faviconPath": "https://path-to-fav-icon/favicon.ico",
|
|
"logoPath": "https://path-to-logo/logo.ico"
|
|
}</p></code></pre>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>{
|
|
"api-key":"xxx",
|
|
"name": "Sample Status Page",
|
|
"monitors": {
|
|
"_id": "Ab0c129e367534000fdbc46f",
|
|
"name": "Sample Monitor"
|
|
},
|
|
"domain": "https://status.fyipe.com",
|
|
"links": {
|
|
"name": "Sample Link",
|
|
"url": "https://samplelink.com"
|
|
},
|
|
"isPrivate":false,
|
|
"description": "Sample description",
|
|
"title": "Sample Title",
|
|
"copyright": "HackerBay, Inc.",
|
|
"faviconPath": "https://path-to-fav-icon/favicon.ico",
|
|
"logoPath": "https://path-to-logo/logo.ico"
|
|
"_id": "5bbe0286d2f835000fb63e91",
|
|
"createdBy": {
|
|
"_id": "5b0c1298367534000fdbc46e",
|
|
"name": "Nawaz Dhandala"
|
|
},
|
|
"project": {
|
|
"_id": "5b0c129e367534000fdbc46f",
|
|
"name": "CloudBoost"
|
|
},
|
|
"createdAt": "2018-10-10T13:45:42.206Z",
|
|
|
|
}
|
|
</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
|
|
<article id="StatusPage-delete" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Delete a status page<span class="requestType">DELETE</span></h3>
|
|
<p>
|
|
<p> Delete a status page by Status Page ID </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/statusPage/:projectId/:statusPageId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Query String</h3>
|
|
<ul class="doc-item-detail-container">
|
|
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type ">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for your Fyipe Project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code">
|
|
<p class="url"> https://api.fyipe.com/statusPage/:projectId/:scheduleId?api-key=XXX</p>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>{
|
|
"api-key":"xxx",
|
|
"name": "Sample Status Page",
|
|
"monitors": {
|
|
"_id": "Ab0c129e367534000fdbc46f",
|
|
"name": "Sample Monitor"
|
|
},
|
|
"domain": "https://status.fyipe.com",
|
|
"links": {
|
|
"name": "Sample Link",
|
|
"url": "https://samplelink.com"
|
|
},
|
|
"isPrivate":false,
|
|
"description": "Sample description",
|
|
"title": "Sample Title",
|
|
"copyright": "HackerBay, Inc.",
|
|
"faviconPath": "https://path-to-fav-icon/favicon.ico",
|
|
"logoPath": "https://path-to-logo/logo.ico"
|
|
"_id": "5bbe0286d2f835000fb63e91",
|
|
"createdBy": {
|
|
"_id": "5b0c1298367534000fdbc46e",
|
|
"name": "Nawaz Dhandala"
|
|
},
|
|
"project": {
|
|
"_id": "5b0c129e367534000fdbc46f",
|
|
"name": "CloudBoost"
|
|
},
|
|
"createdAt": "2018-10-10T13:45:42.206Z",
|
|
|
|
}
|
|
</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
|
|
<!-- Status Page API Ends-->
|
|
|
|
|
|
<!-- Subscriber API Starts -->
|
|
|
|
<article id="subscribers" class="cf-grid-container dev-doc-item-container">
|
|
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<b>
|
|
<h1>Subscribers</h1>
|
|
</b>
|
|
<p>
|
|
<p>Subscribers are your customers who subscribe to alerts for your Monitors. They are alerted via SMS and
|
|
Email when something unexpected happens.
|
|
</p>
|
|
</p>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/subscriber/</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="attribute-parameter-container">
|
|
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
</section>
|
|
</article>
|
|
|
|
<article id="Subscriber-create" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Create a subscriber<span class="requestType">POST</span></h3>
|
|
<p>
|
|
<p> Create a subscriber for a monitor. </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/subscriber/:projectId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Body</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for the project or sub project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>monitorIds</span>
|
|
<span class="item-type">Array</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Array of monitor Id or monitor names you want subscriber to subscribe to.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>contactEmail</span>
|
|
<span class="item-type">String</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Email of the subscriber</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>contactPhone</span>
|
|
<span class="item-type">String</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Phone Number of the Subscriber</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>alertVia</span>
|
|
<span class="item-type">Array</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>How do you want the subscriber to be alerted. Can be any or all of these values ["call", "sms",
|
|
"email"]</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code example-response">
|
|
<p>Request URL</p>
|
|
<p class="url">https://api.fyipe.com/subscriber/:projectId</p>
|
|
<p>Request Body</p>
|
|
<pre><code class="language-json"><p>{
|
|
"api-key":"xxx",
|
|
"alertVia": ["sms", "email"],
|
|
"monitorIds": ["Ab0c129e367534000fdbc46f"],
|
|
"contactEmail":"my@email.com",
|
|
"contactPhone": "+1-510-751-0204",
|
|
}</p></code></pre>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>{
|
|
"_id": "eb0c129e36753400Xfdbc46l"
|
|
"alertVia": ["sms", "email"],
|
|
"monitors": [{
|
|
"_id": "Ab0c129e367534000fdbc46f",
|
|
"name": "Sample Monitor"
|
|
}],
|
|
"contactEmail":"my@email.com",
|
|
"contactPhone": "+1-510-751-0204",
|
|
}
|
|
</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
<article id="Subscriber-getAll" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Get all subscribers by Project<span class="requestType">GET</span></h3>
|
|
<p>
|
|
<p> Get all subscribers by Project </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/subscriber/:projectId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Query String</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for the project or sub project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>limit</span>
|
|
<span class="item-type">integer</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Number of items you would like to return from the API.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>skip</span>
|
|
<span class="item-type">integer</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Number of items you would need to skip. This is used in pagination</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code example-response">
|
|
<p>Request URL</p>
|
|
<p class="url">https://api.fyipe.com/subscriber/:projectId?skip=0&limit=10&api-key=XXX</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>
|
|
{
|
|
"subscribers" [{
|
|
"_id": "eb0c129e36753400Xfdbc46l"
|
|
"alertVia": ["sms", "email"],
|
|
"monitors": [{
|
|
_id: "Ab0c129e367534000fdbc46f",
|
|
name: "Sample Monitor"
|
|
}],
|
|
"contactEmail":"my@email.com",
|
|
"contactPhone": "+1-510-751-0204",
|
|
}],
|
|
count:1,
|
|
skip:0,
|
|
limit:10
|
|
}
|
|
|
|
</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
<article id="Subscriber-By-Project-getAll" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Get all subscribers by Project<span class="requestType">GET</span></h3>
|
|
<p>
|
|
<p> Get all subscribers by Project </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/subscriber/:projectId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Query String</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for the project or sub project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>limit</span>
|
|
<span class="item-type">integer</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Number of items you would like to return from the API.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>skip</span>
|
|
<span class="item-type">integer</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Number of items you would need to skip. This is used in pagination</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>monitorId (optional)</span>
|
|
<span class="item-type">String</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Set this value if you want to filter the results by Monitor</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code example-response">
|
|
<p>Request URL</p>
|
|
<p class="url">https://api.fyipe.com/subscriber/:projectId?skip=0&limit=10&api-key=XXX</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>
|
|
{
|
|
"subscribers" [{
|
|
"_id": "eb0c129e36753400Xfdbc46l"
|
|
"alertVia": ["sms", "email"],
|
|
"monitors": [{
|
|
_id: "Ab0c129e367534000fdbc46f",
|
|
name: "Sample Monitor"
|
|
}],
|
|
"contactEmail":"my@email.com",
|
|
"contactPhone": "+1-510-751-0204",
|
|
}],
|
|
count:1,
|
|
skip:0,
|
|
limit:10
|
|
}
|
|
|
|
</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
<article id="Subscriber-By-Id-getAll" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Get all subscriber by Subscriber ID<span class="requestType">GET</span></h3>
|
|
<p>
|
|
<p> Get all subscribers by Subscriber ID </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/subscriber/:projectId/:subscriberId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Query String</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for the project or sub project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code example-response">
|
|
<p>Request URL</p>
|
|
<p class="url">https://api.fyipe.com/subscriber/:projectId/:subscriberId?api-key=XXX</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>
|
|
{
|
|
"_id": "eb0c129e36753400Xfdbc46l"
|
|
"alertVia": ["sms", "email"],
|
|
"monitors": [{
|
|
"_id": "Ab0c129e367534000fdbc46f",
|
|
"name": "Sample Monitor"
|
|
}],
|
|
"contactEmail":"my@email.com",
|
|
"contactPhone": "+1-510-751-0204",
|
|
}
|
|
|
|
</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
|
|
<article id="Subscriber-update" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Update a subscriber<span class="requestType">PUT</span></h3>
|
|
<p>
|
|
<p> Update a subscriber in the project. </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/subscriber/:projectId/:subscriberId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Body</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for the project or sub project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>monitorIds</span>
|
|
<span class="item-type">Array</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Array of monitor Id or monitor names you want subscriber to subscribe to.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>contactEmail</span>
|
|
<span class="item-type">String</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Email of the subscriber</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>contactPhone</span>
|
|
<span class="item-type">String</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Phone Number of the Subscriber</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>alertVia</span>
|
|
<span class="item-type">Array</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>How do you want the subscriber to be alerted. Can be any or all of these values ["call", "sms",
|
|
"email"]</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code example-response">
|
|
<p>Request URL</p>
|
|
<p class="url">https://api.fyipe.com/subscriber/:projectId/:subscriberId</p>
|
|
<p>Request Body</p>
|
|
<pre><code class="language-json"><p>{
|
|
"alertVia": ["sms", "email"],
|
|
"monitorIds": ["Ab0c129e367534000fdbc46f"],
|
|
"contactEmail":"my@email.com",
|
|
"contactPhone": "+1-510-751-0204",
|
|
}</p></code></pre>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>{
|
|
"_id": "Xb0c129e367534000fdbc46f"
|
|
"alertVia": ["sms", "email"],
|
|
"monitors": [{
|
|
"_id": "Ab0c129e367534000fdbc46f",
|
|
"name": "Sample Monitor"
|
|
}],
|
|
"contactEmail":"my@email.com",
|
|
"contactPhone": "+1-510-751-0204",
|
|
|
|
}
|
|
</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
|
|
<article id="Subscriber-delete" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Delete a subscriber<span class="requestType">DELETE</span></h3>
|
|
<p>
|
|
<p> Delete a subscriber by Subscriber ID </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/subscriber/:projectId/:subscriberId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Query String</h3>
|
|
<ul class="doc-item-detail-container">
|
|
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type ">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for your Fyipe Project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code">
|
|
<p class="url"> https://api.fyipe.com/subscriber/:projectId/:subscriberId?api-key=XXX</p>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>{
|
|
"_id": "Xb0c129e367534000fdbc46f"
|
|
"alertVia": ["sms", "email"],
|
|
"monitors": [{
|
|
"_id": "Ab0c129e367534000fdbc46f",
|
|
"name": "Sample Monitor"
|
|
}],
|
|
"contactEmail":"my@email.com",
|
|
"contactPhone": "+1-510-751-0204",
|
|
|
|
}
|
|
</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
|
|
<!-- Subscriber API Ends -->
|
|
|
|
|
|
<!-- Subscriber API Starts -->
|
|
|
|
<article id="subscriber-alerts" class="cf-grid-container dev-doc-item-container">
|
|
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<b>
|
|
<h1>Subscriber Alert</h1>
|
|
</b>
|
|
<p>
|
|
<p>Subscriber Alert are alerts sent to your subscribers for monitors they have subscribed to.
|
|
</p>
|
|
</p>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/subscriberAlert/</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="attribute-parameter-container">
|
|
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
</section>
|
|
</article>
|
|
|
|
|
|
<article id="Subscriber-alert-getAll" class="cf-grid-container dev-doc-item-container">
|
|
<section class="col-lg-half col-md-half dev-doc-item">
|
|
<h3>Get all subscriber alerts by Project<span class="requestType">GET</span></h3>
|
|
<p>
|
|
<p> Get all subscribers by Project </p>
|
|
</p>
|
|
<div class="attribute-parameter-container">
|
|
<h3>Path</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li>
|
|
<div class="cf-grid-row">
|
|
<div class="col-full">
|
|
<div class="item-title">
|
|
<span>https://api.fyipe.com/subscriberAlert/:projectId</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="attribute-parameter-container">
|
|
<h3>Query String</h3>
|
|
<ul class="doc-item-detail-container">
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>api-key</span>
|
|
<span class="item-type">string</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>API Key for the project or sub project</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>limit</span>
|
|
<span class="item-type">integer</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Number of items you would like to return from the API.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>skip</span>
|
|
<span class="item-type">integer</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Number of items you would need to skip. This is used in pagination</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li data-location="header">
|
|
<div class="cf-grid-row">
|
|
<div class="col-lg-third-1 pull-left">
|
|
<div class="item-title">
|
|
<span>monitorId (optional)</span>
|
|
<span class="item-type">String</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-third-2 pull-left">
|
|
<div class="item-description">
|
|
<p>Set this value if you want to filter the results by Monitor</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
<section class="col-lg-half col-md-half dev-doc-example">
|
|
|
|
<div class="sample-type type-curl">
|
|
<div id="exampleRequest" class="doc-example-item doc-example-request">
|
|
<h1>Example Request</h1>
|
|
<div class="example-code example-response">
|
|
<p>Request URL</p>
|
|
<p class="url">https://api.fyipe.com/subscriberAlert/:projectId?skip=0&limit=10&api-key=XXX</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="doc-example-item">
|
|
<h1>Example Response (200)</h1>
|
|
<div class="example-code example-response">
|
|
<pre>
|
|
<code class="language-json">
|
|
<p>
|
|
{
|
|
"subscriberAlerts" [
|
|
"_id": "qb0c129e36753400Xfdbc46P"
|
|
"alertVia": "call",
|
|
"status": "success"
|
|
"subscriber": {
|
|
"_id": "eb0c129e36753400Xfdbc46l"
|
|
"alertVia": ["sms", "email"],
|
|
"monitors": [{
|
|
"_id": "Ab0c129e367534000fdbc46f",
|
|
"name": "Sample Monitor"
|
|
}],
|
|
"contactEmail":"my@email.com",
|
|
"contactPhone": "+1-510-751-0204",
|
|
}
|
|
}],
|
|
count:1,
|
|
skip:0,
|
|
limit:10
|
|
}
|
|
|
|
</p>
|
|
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
var ddlArray = [];
|
|
var ddl = document.getElementById('navSelect');
|
|
for (i = 0; i < ddl.options.length; i++) {
|
|
ddlArray[i] = ddl.options[i].value;
|
|
}
|
|
$(function () {
|
|
var currentHash = "#introduction";
|
|
$(document).scroll(function () {
|
|
$('.dev-doc-item-container').each(function () {
|
|
var top = window.pageYOffset;
|
|
var distance = top - $(this).offset().top;
|
|
var hash = $(this).attr('id');
|
|
// 30 is an arbitrary padding choice,
|
|
// if you want a precise check then use distance===0
|
|
if (distance < 30 && distance > -30 && currentHash != hash) {
|
|
//window.location.hash = (hash);
|
|
history.replaceState(undefined, undefined, "#" + hash);
|
|
currentHash = hash;
|
|
var navSelect = $('#navSelect');
|
|
ddlArray.forEach(function (value) {
|
|
if (hash == value) {
|
|
navSelect.val(hash);
|
|
}
|
|
});
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
|
<script src="assets/js/jquery.waypoints.min.js"></script>
|
|
<script src="assets/js/highlight.min.js"></script>
|
|
<script>
|
|
hljs.initHighlightingOnLoad();
|
|
</script>
|
|
<script src="assets/js/function.js"></script>
|
|
<script type="text/javascript">
|
|
var exampleContainerWidth = $('.dev-doc-example').width();
|
|
var docItemContainerWidth = $('.dev-doc-item').width() + 55;
|
|
var languageHeader = $('#languageHeader');
|
|
var navigationHeader = $('#navigationHeader');
|
|
languageHeader.css({
|
|
width: exampleContainerWidth + 'px'
|
|
});
|
|
navigationHeader.css({
|
|
width: docItemContainerWidth + 'px'
|
|
});
|
|
languageHeader.removeClass('hide');
|
|
navigationHeader.removeClass('hide');
|
|
$(window).resize(function () {
|
|
setTimeout(function () {
|
|
exampleContainerWidth = $('.dev-doc-example').width();
|
|
docItemContainerWidth = $('.dev-doc-item').width() + 55;
|
|
navigationHeader.css({
|
|
width: docItemContainerWidth + 'px'
|
|
});
|
|
}, 100);
|
|
});
|
|
|
|
function IsJsonString(str) {
|
|
try {
|
|
JSON.parse(str);
|
|
} catch (e) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
$.each($('.example-response'), function (key, value) {
|
|
if (IsJsonString($(value).text())) {
|
|
var json = JSON.stringify(eval("(" + $(value).text() + ")"), null, 4);
|
|
$(value).text(json);
|
|
hljs.highlightBlock(value);
|
|
}
|
|
});
|
|
|
|
$.each($('.doc-example-item'), function (key, value) {
|
|
var comment = $(value).children('.example-code').children('pre').children('code').children('h1');
|
|
var commentText = comment.text();
|
|
comment.text('#' + commentText);
|
|
});
|
|
|
|
$('.language-type').click(function () {
|
|
var languageType = $(this).attr('id');
|
|
$('.language-type').removeClass('active');
|
|
$(this).addClass('active');
|
|
$('.sample-type').addClass('hide');
|
|
$('.' + languageType).removeClass('hide');
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|