APIMATIC API Portal API
{
"swagger": "2.0",
"info": {
"version": "",
"title": "API Portal Publish API",
"description": "An API to publish data to ACME's API Portal-as-as-Service.",
"license": {
"name": "MIT",
"url": "http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT"
}
},
"host": "acme.com",
"basePath": "/api",
"securityDefinitions": {
"APIKEY": {
"type": "apiKey",
"description": "API Key is to be obtained from ACME",
"name": "APIKEY",
"in": "header"
}
},
"schemes": [
"http"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/portals": {
"get": {
"description": "Gets all API portals for the user identified by his API Key",
"tags": [
"Portal"
],
"operationId": "Get All API Portal",
"produces": [
"application/json"
],
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Portal"
}
}
}
},
"security": [
{
"APIKEY": []
}
]
}
},
"/portals/{ID}": {
"get": {
"tags": [
"Portal"
],
"operationId": "Get Portal By Id",
"produces": [
"application/json"
],
"parameters": [
{
"name": "ID",
"in": "path",
"required": true,
"x-is-map": false,
"type": "string",
"description": "ID of the portal to retrieve"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Portal"
}
}
},
"security": [
{
"APIKEY": []
}
]
}
},
"/portals/{ID}/pages": {
"post": {
"description": "Creates a new page on API Portal",
"tags": [
"Portal"
],
"operationId": "Create Page in Portal",
"produces": [
"application/json"
],
"parameters": [
{
"name": "ID",
"in": "path",
"required": true,
"x-is-map": false,
"type": "string",
"description": "ID of the portal to create the page in"
},
{
"name": "Page",
"in": "body",
"required": true,
"x-is-map": false,
"description": "The page model to create",
"schema": {
"$ref": "#/definitions/Page"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/PageResponse"
}
}
},
"security": [
{
"APIKEY": []
}
]
}
},
"/pages/{ID}": {
"put": {
"tags": [
"Pages"
],
"operationId": "Update Page",
"produces": [
"application/json"
],
"parameters": [
{
"name": "ID",
"in": "path",
"required": true,
"x-is-map": false,
"type": "string",
"description": "The ID of the page to update"
},
{
"name": "Page",
"in": "body",
"required": true,
"x-is-map": false,
"description": "Page model with sections and content to update",
"schema": {
"$ref": "#/definitions/Page"
}
}
],
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"APIKEY": []
}
]
},
"delete": {
"description": "Delete a page",
"tags": [
"Pages"
],
"operationId": "Delete Page",
"produces": [
"application/json"
],
"parameters": [
{
"name": "ID",
"in": "path",
"required": true,
"x-is-map": false,
"type": "string",
"description": "The ID of the page to delete"
}
],
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"APIKEY": []
}
]
}
}
},
"definitions": {
"ContentTypes": {
"title": "ContentTypes",
"description": "Various content types are supported by portals.",
"type": "string",
"enum": [
"PlainText",
"Markdown",
"YAML",
"RTF",
"HTML",
"URL",
"Code"
]
},
"Section": {
"title": "Section",
"type": "object",
"properties": {
"Content": {
"description": "The content in this section",
"type": "string"
},
"ContentType": {
"description": "The type of content. Only supported content types should be shown in the enum.",
"$ref": "#/definitions/ContentTypes"
},
"Title": {
"description": "Title of the section",
"type": "string"
}
},
"required": [
"Content",
"ContentType",
"Title"
]
},
"Page": {
"title": "Page",
"type": "object",
"properties": {
"LastModified": {
"description": "The page was last modified on this date",
"type": "string",
"format": "date-time"
},
"Sections": {
"description": "List of sections in this page",
"type": "array",
"items": {
"$ref": "#/definitions/Section"
}
}
},
"required": [
"LastModified",
"Sections"
]
},
"PageResponse": {
"title": "Page Response",
"type": "object",
"properties": {
"ID": {
"description": "Page ID",
"type": "string"
}
},
"required": [
"ID"
],
"allOf": [
{
"$ref": "#/definitions/Page"
}
]
},
"Portal": {
"title": "Portal",
"type": "object",
"properties": {
"Name": {
"description": "Name of the API Portal",
"type": "string"
},
"Title": {
"description": "Title to display",
"type": "string"
},
"LastModified": {
"description": "The portal was last modified at this date/time",
"type": "string",
"format": "date-time"
},
"Pages": {
"description": "List of pages in this API Portal",
"type": "array",
"items": {
"$ref": "#/definitions/Page"
}
},
"ID": {
"description": "Portal ID",
"type": "string"
}
},
"required": [
"Name",
"Title",
"LastModified",
"Pages",
"ID"
]
}
}
}