Last active
December 22, 2017 23:12
-
-
Save zallek/49edb9f9591dbacc164ca0d1a4978f2e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "swagger" : "2.0", | |
| "info" : { | |
| "description" : "To try out the API, get your token using the /login endpoint and use it in the Authorize panel.", | |
| "version" : "dev", | |
| "title" : "Tinyclues Backops API" | |
| }, | |
| "host" : "localhost:9000", | |
| "basePath" : "/", | |
| "tags" : [ { | |
| "name" : "Application" | |
| }, { | |
| "name" : "Domain" | |
| }, { | |
| "name" : "FileSummary" | |
| }, { | |
| "name" : "AssetDefinition" | |
| } ], | |
| "schemes" : [ "http" ], | |
| "paths" : { | |
| "/active-asset-definitions" : { | |
| "get" : { | |
| "tags" : [ "AssetDefinition" ], | |
| "summary" : "List active asset definitions", | |
| "description" : "", | |
| "operationId" : "listActive", | |
| "parameters" : [ ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "successful operation", | |
| "schema" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/definitions/AssetDefinition" | |
| } | |
| } | |
| } | |
| }, | |
| "security" : [ { | |
| "token" : [ ] | |
| } ] | |
| } | |
| }, | |
| "/asset-definitions" : { | |
| "get" : { | |
| "tags" : [ "AssetDefinition" ], | |
| "summary" : "Returns an asset definition by id", | |
| "description" : "", | |
| "operationId" : "list", | |
| "parameters" : [ { | |
| "name" : "domain", | |
| "in" : "query", | |
| "required" : false, | |
| "type" : "string" | |
| }, { | |
| "name" : "assetName", | |
| "in" : "query", | |
| "required" : false, | |
| "type" : "string" | |
| }, { | |
| "name" : "limit", | |
| "in" : "query", | |
| "required" : false, | |
| "type" : "integer", | |
| "default" : 50, | |
| "format" : "int32" | |
| }, { | |
| "name" : "onlyVersions", | |
| "in" : "query", | |
| "required" : false, | |
| "type" : "boolean", | |
| "default" : false | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "successful operation", | |
| "schema" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/definitions/VersionedAssetDefinition" | |
| } | |
| } | |
| } | |
| }, | |
| "security" : [ { | |
| "token" : [ ] | |
| } ] | |
| }, | |
| "post" : { | |
| "tags" : [ "AssetDefinition" ], | |
| "summary" : "Create an asset definition", | |
| "description" : "", | |
| "operationId" : "add", | |
| "parameters" : [ { | |
| "in" : "body", | |
| "name" : "body", | |
| "required" : true, | |
| "schema" : { | |
| "$ref" : "#/definitions/AssetDefinitionDraft" | |
| } | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "successful operation", | |
| "schema" : { | |
| "$ref" : "#/definitions/VersionedAssetDefinition" | |
| } | |
| } | |
| }, | |
| "security" : [ { | |
| "token" : [ ] | |
| } ] | |
| } | |
| }, | |
| "/asset-definitions-stats" : { | |
| "get" : { | |
| "tags" : [ "AssetDefinition" ], | |
| "summary" : "Get asset definitions stats", | |
| "description" : "", | |
| "operationId" : "getStats", | |
| "parameters" : [ ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "successful operation", | |
| "schema" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/definitions/AssetDefinitionStats" | |
| } | |
| } | |
| } | |
| }, | |
| "security" : [ { | |
| "token" : [ ] | |
| } ] | |
| } | |
| }, | |
| "/asset-definitions/dry-run" : { | |
| "post" : { | |
| "tags" : [ "AssetDefinition" ], | |
| "summary" : "Run a dry run on an asset definition", | |
| "description" : "", | |
| "operationId" : "dryRun", | |
| "parameters" : [ { | |
| "in" : "body", | |
| "name" : "body", | |
| "required" : true, | |
| "schema" : { | |
| "$ref" : "#/definitions/AssetDefinitionDryRun" | |
| } | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "successful operation", | |
| "schema" : { | |
| "$ref" : "#/definitions/Empty" | |
| } | |
| } | |
| }, | |
| "security" : [ { | |
| "token" : [ ] | |
| } ] | |
| } | |
| }, | |
| "/asset-definitions/publish" : { | |
| "post" : { | |
| "tags" : [ "AssetDefinition" ], | |
| "summary" : "Publish an asset definition", | |
| "description" : "", | |
| "operationId" : "publish", | |
| "parameters" : [ { | |
| "in" : "body", | |
| "name" : "body", | |
| "required" : true, | |
| "schema" : { | |
| "$ref" : "#/definitions/AssetDefinitionPublished" | |
| } | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "successful operation", | |
| "schema" : { | |
| "$ref" : "#/definitions/VersionedAssetDefinition" | |
| } | |
| } | |
| }, | |
| "security" : [ { | |
| "token" : [ ] | |
| } ] | |
| } | |
| }, | |
| "/asset-definitions/validate" : { | |
| "post" : { | |
| "tags" : [ "AssetDefinition" ], | |
| "summary" : "Validate an asset definition", | |
| "description" : "", | |
| "operationId" : "validate", | |
| "parameters" : [ { | |
| "in" : "body", | |
| "name" : "body", | |
| "required" : true, | |
| "schema" : { | |
| "$ref" : "#/definitions/AssetDefinitionDraft" | |
| } | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "successful operation", | |
| "schema" : { | |
| "$ref" : "#/definitions/Empty" | |
| } | |
| } | |
| }, | |
| "security" : [ { | |
| "token" : [ ] | |
| } ] | |
| } | |
| }, | |
| "/domains" : { | |
| "get" : { | |
| "tags" : [ "Domain" ], | |
| "summary" : "List all domains", | |
| "description" : "", | |
| "operationId" : "list", | |
| "parameters" : [ ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "successful operation", | |
| "schema" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/definitions/Domain" | |
| } | |
| } | |
| } | |
| }, | |
| "security" : [ { | |
| "token" : [ ] | |
| } ] | |
| } | |
| }, | |
| "/domains/{id}" : { | |
| "get" : { | |
| "tags" : [ "Domain" ], | |
| "summary" : "Get a domain by id", | |
| "description" : "", | |
| "operationId" : "get", | |
| "parameters" : [ { | |
| "name" : "id", | |
| "in" : "path", | |
| "required" : true, | |
| "type" : "string" | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "successful operation", | |
| "schema" : { | |
| "$ref" : "#/definitions/Domain" | |
| } | |
| } | |
| }, | |
| "security" : [ { | |
| "token" : [ ] | |
| } ] | |
| } | |
| }, | |
| "/file-summaries" : { | |
| "get" : { | |
| "tags" : [ "FileSummary" ], | |
| "summary" : "List file summaries by id", | |
| "description" : "", | |
| "operationId" : "list", | |
| "parameters" : [ { | |
| "name" : "domain", | |
| "in" : "query", | |
| "required" : false, | |
| "type" : "string" | |
| }, { | |
| "name" : "fileHeaderMd5", | |
| "in" : "query", | |
| "required" : false, | |
| "type" : "string" | |
| }, { | |
| "name" : "limit", | |
| "in" : "query", | |
| "required" : false, | |
| "type" : "integer", | |
| "default" : 50, | |
| "format" : "int32" | |
| }, { | |
| "name" : "format", | |
| "in" : "query", | |
| "required" : false, | |
| "type" : "string", | |
| "default" : "com.tinyclues.backops.models.FileSummaryFormat.full" | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "successful operation", | |
| "schema" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/definitions/FileSummary" | |
| } | |
| } | |
| } | |
| }, | |
| "security" : [ { | |
| "token" : [ ] | |
| } ] | |
| } | |
| }, | |
| "/file-summaries-stats" : { | |
| "get" : { | |
| "tags" : [ "FileSummary" ], | |
| "summary" : "Get file summaries stats", | |
| "description" : "", | |
| "operationId" : "getStats", | |
| "parameters" : [ ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "successful operation", | |
| "schema" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/definitions/FileSummaryStats" | |
| } | |
| } | |
| } | |
| }, | |
| "security" : [ { | |
| "token" : [ ] | |
| } ] | |
| } | |
| }, | |
| "/file-summaries/{id}" : { | |
| "get" : { | |
| "tags" : [ "FileSummary" ], | |
| "summary" : "Get a file summary by id", | |
| "description" : "", | |
| "operationId" : "get", | |
| "parameters" : [ { | |
| "name" : "id", | |
| "in" : "path", | |
| "required" : true, | |
| "type" : "string", | |
| "format" : "uuid" | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "successful operation", | |
| "schema" : { | |
| "$ref" : "#/definitions/FileSummary" | |
| } | |
| } | |
| }, | |
| "security" : [ { | |
| "token" : [ ] | |
| } ] | |
| } | |
| }, | |
| "/login" : { | |
| "post" : { | |
| "tags" : [ "Application" ], | |
| "summary" : "Login into the application", | |
| "description" : "", | |
| "operationId" : "login", | |
| "parameters" : [ { | |
| "in" : "body", | |
| "name" : "body", | |
| "required" : true, | |
| "schema" : { | |
| "$ref" : "#/definitions/Login" | |
| } | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "successful operation", | |
| "schema" : { | |
| "$ref" : "#/definitions/Token" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "/ping" : { | |
| "get" : { | |
| "tags" : [ "Application" ], | |
| "summary" : "Heartbeat", | |
| "description" : "", | |
| "operationId" : "ping", | |
| "parameters" : [ ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "successful operation", | |
| "schema" : { | |
| "type" : "string" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "/version" : { | |
| "get" : { | |
| "tags" : [ "Application" ], | |
| "summary" : "Get application version", | |
| "description" : "", | |
| "operationId" : "version", | |
| "parameters" : [ ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "successful operation", | |
| "schema" : { | |
| "$ref" : "#/definitions/Version" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "securityDefinitions" : { | |
| "token" : { | |
| "type" : "apiKey", | |
| "name" : "Authorization", | |
| "in" : "header" | |
| } | |
| }, | |
| "definitions" : { | |
| "FileSummaryDomainAndHeaderStats" : { | |
| "type" : "object", | |
| "required" : [ "count", "domain", "fileHeaderMd5", "latestCreatedAt", "latestFileName", "latestId", "latestSuccess" ], | |
| "properties" : { | |
| "domain" : { | |
| "type" : "string" | |
| }, | |
| "fileHeaderMd5" : { | |
| "type" : "string" | |
| }, | |
| "count" : { | |
| "type" : "integer", | |
| "format" : "int64" | |
| }, | |
| "latestId" : { | |
| "type" : "string", | |
| "format" : "uuid" | |
| }, | |
| "latestFileName" : { | |
| "type" : "string" | |
| }, | |
| "latestCreatedAt" : { | |
| "type" : "string", | |
| "format" : "date-time" | |
| }, | |
| "latestSuccess" : { | |
| "type" : "boolean" | |
| }, | |
| "latestErrorMessage" : { | |
| "type" : "string" | |
| } | |
| } | |
| }, | |
| "FileSummaryStats" : { | |
| "type" : "object", | |
| "required" : [ "count", "distinctHeadersCount", "domain", "headers", "latestCreatedAt", "live" ], | |
| "properties" : { | |
| "domain" : { | |
| "type" : "string" | |
| }, | |
| "live" : { | |
| "type" : "boolean" | |
| }, | |
| "count" : { | |
| "type" : "integer", | |
| "format" : "int64" | |
| }, | |
| "distinctHeadersCount" : { | |
| "type" : "integer", | |
| "format" : "int64" | |
| }, | |
| "latestCreatedAt" : { | |
| "type" : "string", | |
| "format" : "date-time" | |
| }, | |
| "headers" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/definitions/FileSummaryDomainAndHeaderStats" | |
| } | |
| } | |
| } | |
| }, | |
| "FileSummary" : { | |
| "type" : "object", | |
| "required" : [ "boneUrl", "createdAt", "datasaurusUrl", "domain", "fileHeaderMd5", "fileName", "id", "reportUrl", "success" ], | |
| "properties" : { | |
| "id" : { | |
| "type" : "string", | |
| "format" : "uuid" | |
| }, | |
| "domain" : { | |
| "type" : "string" | |
| }, | |
| "fileHeaderMd5" : { | |
| "type" : "string" | |
| }, | |
| "fileName" : { | |
| "type" : "string" | |
| }, | |
| "boneUrl" : { | |
| "type" : "string" | |
| }, | |
| "datasaurusUrl" : { | |
| "type" : "string" | |
| }, | |
| "createdAt" : { | |
| "type" : "string", | |
| "format" : "date-time" | |
| }, | |
| "success" : { | |
| "type" : "boolean" | |
| }, | |
| "report" : { | |
| "$ref" : "#/definitions/JsValue" | |
| }, | |
| "errorCategory" : { | |
| "type" : "string" | |
| }, | |
| "errorCode" : { | |
| "type" : "string" | |
| }, | |
| "errorMessage" : { | |
| "type" : "string" | |
| }, | |
| "reportUrl" : { | |
| "type" : "string" | |
| } | |
| } | |
| }, | |
| "JsValue" : { | |
| "type" : "object" | |
| }, | |
| "Empty" : { | |
| "type" : "object" | |
| }, | |
| "AssetDefinitionDryRun" : { | |
| "type" : "object", | |
| "required" : [ "assetName", "datasaurusUrls", "definition", "domain" ], | |
| "properties" : { | |
| "domain" : { | |
| "type" : "string" | |
| }, | |
| "assetName" : { | |
| "type" : "string" | |
| }, | |
| "definition" : { | |
| "type" : "string" | |
| }, | |
| "datasaurusUrls" : { | |
| "type" : "array", | |
| "items" : { | |
| "type" : "string" | |
| } | |
| } | |
| } | |
| }, | |
| "AssetDefinitionStats" : { | |
| "type" : "object", | |
| "required" : [ "assetDefinitions", "domain", "live" ], | |
| "properties" : { | |
| "domain" : { | |
| "type" : "string" | |
| }, | |
| "live" : { | |
| "type" : "boolean" | |
| }, | |
| "assetDefinitions" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/definitions/AssetDefinitionStatus" | |
| } | |
| } | |
| } | |
| }, | |
| "AssetDefinitionStatus" : { | |
| "type" : "object" | |
| }, | |
| "AssetDefinition" : { | |
| "type" : "object", | |
| "required" : [ "businessFailSafeRatio", "domain", "filters", "importMode", "mappings", "name", "sources", "version" ], | |
| "properties" : { | |
| "name" : { | |
| "type" : "string" | |
| }, | |
| "domain" : { | |
| "type" : "string" | |
| }, | |
| "version" : { | |
| "type" : "string" | |
| }, | |
| "importMode" : { | |
| "$ref" : "#/definitions/Value" | |
| }, | |
| "businessFailSafeRatio" : { | |
| "type" : "number", | |
| "format" : "double" | |
| }, | |
| "sources" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/definitions/Source" | |
| } | |
| }, | |
| "mappings" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/definitions/Mapping" | |
| } | |
| }, | |
| "deduplicationColumns" : { | |
| "type" : "array", | |
| "items" : { | |
| "type" : "string" | |
| } | |
| }, | |
| "filters" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/definitions/Filter" | |
| } | |
| } | |
| } | |
| }, | |
| "Filter" : { | |
| "type" : "object" | |
| }, | |
| "Mapping" : { | |
| "type" : "object", | |
| "required" : [ "field" ], | |
| "properties" : { | |
| "field" : { | |
| "type" : "string" | |
| }, | |
| "column" : { | |
| "type" : "string" | |
| } | |
| } | |
| }, | |
| "Source" : { | |
| "type" : "object" | |
| }, | |
| "Value" : { | |
| "type" : "object" | |
| }, | |
| "VersionedAssetDefinition" : { | |
| "type" : "object", | |
| "required" : [ "assetName", "createdAt", "createdBy", "definition", "domain", "id", "valid" ], | |
| "properties" : { | |
| "id" : { | |
| "type" : "string", | |
| "format" : "uuid" | |
| }, | |
| "domain" : { | |
| "type" : "string" | |
| }, | |
| "assetName" : { | |
| "type" : "string" | |
| }, | |
| "definition" : { | |
| "type" : "string" | |
| }, | |
| "valid" : { | |
| "type" : "boolean" | |
| }, | |
| "createdAt" : { | |
| "type" : "string", | |
| "format" : "date-time" | |
| }, | |
| "createdBy" : { | |
| "type" : "string" | |
| }, | |
| "version" : { | |
| "type" : "string" | |
| }, | |
| "changeDescription" : { | |
| "type" : "string" | |
| } | |
| } | |
| }, | |
| "AssetDefinitionPublished" : { | |
| "type" : "object", | |
| "required" : [ "assetName", "changeDescription", "definition", "domain" ], | |
| "properties" : { | |
| "domain" : { | |
| "type" : "string" | |
| }, | |
| "assetName" : { | |
| "type" : "string" | |
| }, | |
| "definition" : { | |
| "type" : "string" | |
| }, | |
| "changeDescription" : { | |
| "type" : "string" | |
| } | |
| } | |
| }, | |
| "AssetDefinitionDraft" : { | |
| "type" : "object", | |
| "required" : [ "assetName", "definition", "domain" ], | |
| "properties" : { | |
| "domain" : { | |
| "type" : "string" | |
| }, | |
| "assetName" : { | |
| "type" : "string" | |
| }, | |
| "definition" : { | |
| "type" : "string" | |
| } | |
| } | |
| }, | |
| "Domain" : { | |
| "type" : "object", | |
| "required" : [ "active", "id", "live", "name" ], | |
| "properties" : { | |
| "id" : { | |
| "type" : "string" | |
| }, | |
| "name" : { | |
| "type" : "string" | |
| }, | |
| "active" : { | |
| "type" : "boolean" | |
| }, | |
| "live" : { | |
| "type" : "boolean" | |
| } | |
| } | |
| }, | |
| "Token" : { | |
| "type" : "object", | |
| "required" : [ "token" ], | |
| "properties" : { | |
| "token" : { | |
| "type" : "string" | |
| } | |
| } | |
| }, | |
| "Login" : { | |
| "type" : "object", | |
| "required" : [ "password", "username" ], | |
| "properties" : { | |
| "username" : { | |
| "type" : "string" | |
| }, | |
| "password" : { | |
| "type" : "string" | |
| } | |
| } | |
| }, | |
| "Version" : { | |
| "type" : "object", | |
| "required" : [ "commit", "imageVersion", "name", "version" ], | |
| "properties" : { | |
| "name" : { | |
| "type" : "string" | |
| }, | |
| "version" : { | |
| "type" : "string" | |
| }, | |
| "imageVersion" : { | |
| "type" : "string" | |
| }, | |
| "commit" : { | |
| "type" : "string" | |
| } | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment