{ "swagger" : "2.0", "info" : { "description" : "The Digital Linguistics (DLx) database API", "version" : "0.1.0", "title" : "DLx", "contact" : { "name" : "Daniel W. Hieber", "url" : "http://danielhieber.com", "email" : "dhieber@umail.ucsb.edu" }, "license" : { "name" : "MIT" } }, "host" : "api.digitallinguistics.io", "basePath" : "/v0", "tags" : [ { "name" : "Language", "description" : "Operations on Languages" }, { "name" : "Lexeme", "description" : "Operations on Lexemes" }, { "name" : "Lexicon", "description" : "Operations on Lexicons" }, { "name" : "Location", "description" : "Operations on Locations" }, { "name" : "Media", "description" : "Operations on Media Items" }, { "name" : "Orthography", "description" : "Operations on Orthographies" }, { "name" : "Person", "description" : "Operations on Persons" }, { "name" : "Text", "description" : "Operations on Texts" } ], "schemes" : [ "https" ], "consumes" : [ "application/json" ], "produces" : [ "application/json" ], "security" : [ { "token" : [ ] } ], "paths" : { "/languages" : { "get" : { "tags" : [ "Language" ], "summary" : "Retrieve multiple Languages by ID", "description" : "If the \"ids\" parameter is omitted, returns all items that the user has permission to access.", "operationId" : "getLanguages", "parameters" : [ { "name" : "ids", "in" : "query", "description" : "A comma-separated list of IDs", "required" : false, "type" : "array", "items" : { "type" : "string" }, "collectionFormat" : "csv", "allowEmptyValue" : false } ], "responses" : { "200" : { "description" : "Operation successful." } } }, "put" : { "tags" : [ "Language" ], "summary" : "Upsert a Language", "operationId" : "upsertLanguage", "parameters" : [ { "in" : "body", "name" : "body", "description" : "An database object to upsert", "required" : true, "schema" : { "$ref" : "#/definitions/Document" } } ], "responses" : { "201" : { "description" : "Upsert successful." } } } }, "/languages/{languageId}" : { "get" : { "tags" : [ "Language" ], "summary" : "Retrieve a Language by ID", "operationId" : "getLanguage", "parameters" : [ { "name" : "languageId", "in" : "path", "description" : "The ID of the Language to perform the operation on", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Operation successful." } } }, "delete" : { "tags" : [ "Language" ], "summary" : "Delete a Language by ID", "operationId" : "deleteLanguage", "parameters" : [ { "name" : "languageId", "in" : "path", "description" : "The ID of the Language to perform the operation on", "required" : true, "type" : "string" } ], "responses" : { "204" : { "description" : "Delete operation successful." } } } }, "/lexemes" : { "get" : { "tags" : [ "Lexeme" ], "summary" : "Retrieve multiple Lexemes by IDs", "description" : "If the \"ids\" parameter is omitted, returns all items that the user has permission to access.", "operationId" : "getLexemes", "parameters" : [ { "name" : "ids", "in" : "query", "description" : "A comma-separated list of IDs", "required" : false, "type" : "array", "items" : { "type" : "string" }, "collectionFormat" : "csv", "allowEmptyValue" : false } ], "responses" : { "200" : { "description" : "Operation successful." } } }, "put" : { "tags" : [ "Lexeme" ], "summary" : "Upsert a Lexeme", "operationId" : "upsertLexeme", "parameters" : [ { "in" : "body", "name" : "body", "description" : "An database object to upsert", "required" : true, "schema" : { "$ref" : "#/definitions/Document" } } ], "responses" : { "201" : { "description" : "Upsert successful." } } } }, "/lexemes/{lexemeId}" : { "get" : { "tags" : [ "Lexeme" ], "summary" : "Retrieve a Lexeme by ID", "operationId" : "getLexeme", "parameters" : [ { "name" : "lexemeId", "in" : "path", "description" : "The ID of the Lexeme to perform the operation on", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Operation successful." } } }, "delete" : { "tags" : [ "Lexeme" ], "summary" : "Delete a Lexeme by ID", "operationId" : "deleteLexeme", "parameters" : [ { "name" : "lexemeId", "in" : "path", "description" : "The ID of the Lexeme to perform the operation on", "required" : true, "type" : "string" } ], "responses" : { "204" : { "description" : "Delete operation successful." } } } }, "/lexicons" : { "get" : { "tags" : [ "Lexicon" ], "summary" : "Retrieve multiple Lexicons by ID", "description" : "If the \"ids\" parameter is omitted, returns all items that the user has permission to access.", "operationId" : "getLexicons", "parameters" : [ { "name" : "ids", "in" : "query", "description" : "A comma-separated list of IDs", "required" : false, "type" : "array", "items" : { "type" : "string" }, "collectionFormat" : "csv", "allowEmptyValue" : false } ], "responses" : { "200" : { "description" : "Operation successful." } } }, "put" : { "tags" : [ "Lexicon" ], "summary" : "Upsert a Lexicon", "operationId" : "upsertLexicon", "parameters" : [ { "in" : "body", "name" : "body", "description" : "An database object to upsert", "required" : true, "schema" : { "$ref" : "#/definitions/Document" } } ], "responses" : { "201" : { "description" : "Upsert successful." } } } }, "/lexicons/{lexiconId}" : { "get" : { "tags" : [ "Lexicon" ], "summary" : "Retrieve a Lexicon by ID", "operationId" : "getLexicon", "parameters" : [ { "name" : "lexiconId", "in" : "path", "description" : "The ID of the Lexicon to perform the operation on", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Operation successful." } } }, "delete" : { "tags" : [ "Lexicon" ], "summary" : "Delete a Lexicon by ID", "operationId" : "deleteLexicon", "parameters" : [ { "name" : "lexiconId", "in" : "path", "description" : "The ID of the Lexicon to perform the operation on", "required" : true, "type" : "string" } ], "responses" : { "204" : { "description" : "Delete operation successful." } } } }, "/locations" : { "get" : { "tags" : [ "Location" ], "summary" : "Retrieve multiple Locations by ID", "description" : "If the \"ids\" parameter is omitted, returns all items that the user has permission to access.", "operationId" : "getLocations", "parameters" : [ { "name" : "ids", "in" : "query", "description" : "A comma-separated list of IDs", "required" : false, "type" : "array", "items" : { "type" : "string" }, "collectionFormat" : "csv", "allowEmptyValue" : false } ], "responses" : { "200" : { "description" : "Operation successful." } } }, "put" : { "tags" : [ "Location" ], "summary" : "Upsert a Location", "operationId" : "upsertLocation", "parameters" : [ { "in" : "body", "name" : "body", "description" : "An database object to upsert", "required" : true, "schema" : { "$ref" : "#/definitions/Document" } } ], "responses" : { "201" : { "description" : "Upsert successful." } } } }, "/locations/{locationId}" : { "get" : { "tags" : [ "Location" ], "summary" : "Retrieve a Location by ID", "operationId" : "getLocation", "parameters" : [ { "name" : "locationId", "in" : "path", "description" : "The ID of the Location to perform the operation on", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Operation successful." } } }, "delete" : { "tags" : [ "Location" ], "summary" : "Delete a Location by ID", "operationId" : "deleteLocation", "parameters" : [ { "name" : "locationId", "in" : "path", "description" : "The ID of the Location to perform the operation on", "required" : true, "type" : "string" } ], "responses" : { "204" : { "description" : "Delete operation successful." } } } }, "/media" : { "get" : { "tags" : [ "Media" ], "summary" : "Retrieve multiple Media Items by ID", "description" : "If the \"ids\" parameter is omitted, returns all items that the user has permission to access.", "operationId" : "getMediaItems", "parameters" : [ { "name" : "ids", "in" : "query", "description" : "A comma-separated list of IDs", "required" : false, "type" : "array", "items" : { "type" : "string" }, "collectionFormat" : "csv", "allowEmptyValue" : false } ], "responses" : { "200" : { "description" : "Operation successful." } } }, "put" : { "tags" : [ "Media" ], "summary" : "Upsert a Media Item", "operationId" : "upsertMediaItem", "parameters" : [ { "in" : "body", "name" : "body", "description" : "An database object to upsert", "required" : true, "schema" : { "$ref" : "#/definitions/Document" } } ], "responses" : { "201" : { "description" : "Upsert successful." } } } }, "/media/{mediaId}" : { "get" : { "tags" : [ "Media" ], "summary" : "Retrieve a Media Item by ID", "operationId" : "getMediaItem", "parameters" : [ { "name" : "mediaId", "in" : "path", "description" : "The ID of the Media Item to perform the operation on", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Operation successful." } } }, "delete" : { "tags" : [ "Media" ], "summary" : "Delete a Media Item by ID", "operationId" : "deleteMediaItem", "parameters" : [ { "name" : "mediaId", "in" : "path", "description" : "The ID of the Media Item to perform the operation on", "required" : true, "type" : "string" } ], "responses" : { "204" : { "description" : "Delete operation successful." } } } }, "/orthographies" : { "get" : { "tags" : [ "Orthography" ], "summary" : "Retrieve multiple Orthographies by ID", "description" : "If the \"ids\" parameter is omitted, returns all items that the user has permission to access.", "operationId" : "getOrthographies", "parameters" : [ { "name" : "ids", "in" : "query", "description" : "A comma-separated list of IDs", "required" : false, "type" : "array", "items" : { "type" : "string" }, "collectionFormat" : "csv", "allowEmptyValue" : false } ], "responses" : { "200" : { "description" : "Operation successful." } } }, "put" : { "tags" : [ "Orthography" ], "summary" : "Upsert an Orthography", "operationId" : "upsertOrthography", "parameters" : [ { "in" : "body", "name" : "body", "description" : "An database object to upsert", "required" : true, "schema" : { "$ref" : "#/definitions/Document" } } ], "responses" : { "201" : { "description" : "Upsert successful." } } } }, "/orthographies/{orthographyId}" : { "get" : { "tags" : [ "Orthography" ], "summary" : "Retrieve an Orthography by ID", "operationId" : "getOrthography", "parameters" : [ { "name" : "orthographyId", "in" : "path", "description" : "The ID of the Orthography to perform the operation on", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Operation successful." } } }, "delete" : { "tags" : [ "Orthography" ], "summary" : "Delete an Orthography by ID", "operationId" : "deleteOrthography", "parameters" : [ { "name" : "orthographyId", "in" : "path", "description" : "The ID of the Orthography to perform the operation on", "required" : true, "type" : "string" } ], "responses" : { "204" : { "description" : "Delete operation successful." } } } }, "/persons" : { "get" : { "tags" : [ "Person" ], "summary" : "Retrieve multiple Persons by ID", "description" : "If the \"ids\" parameter is omitted, returns all items that the user has permission to access.", "operationId" : "getPersons", "parameters" : [ { "name" : "ids", "in" : "query", "description" : "A comma-separated list of IDs", "required" : false, "type" : "array", "items" : { "type" : "string" }, "collectionFormat" : "csv", "allowEmptyValue" : false } ], "responses" : { "200" : { "description" : "Operation successful." } } }, "put" : { "tags" : [ "Person" ], "summary" : "Upsert a Person", "operationId" : "upsertPerson", "parameters" : [ { "in" : "body", "name" : "body", "description" : "An database object to upsert", "required" : true, "schema" : { "$ref" : "#/definitions/Document" } } ], "responses" : { "201" : { "description" : "Upsert successful." } } } }, "/persons/{personId}" : { "get" : { "tags" : [ "Person" ], "summary" : "Retrieve a Person by ID", "operationId" : "getPerson", "parameters" : [ { "name" : "personId", "in" : "path", "description" : "The ID of the Person to perform the operation on", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Operation successful." } } }, "delete" : { "tags" : [ "Person" ], "summary" : "Delete a Person by ID", "operationId" : "deletePerson", "parameters" : [ { "name" : "personId", "in" : "path", "description" : "The ID of the Person to perform the operation on", "required" : true, "type" : "string" } ], "responses" : { "204" : { "description" : "Delete operation successful." } } } }, "/texts" : { "get" : { "tags" : [ "Text" ], "summary" : "Retrieve multiple Texts by ID", "description" : "If the \"ids\" parameter is omitted, returns all items that the user has permission to access.", "operationId" : "getTexts", "parameters" : [ { "name" : "ids", "in" : "query", "description" : "A comma-separated list of IDs", "required" : false, "type" : "array", "items" : { "type" : "string" }, "collectionFormat" : "csv", "allowEmptyValue" : false } ], "responses" : { "200" : { "description" : "Operation successful." } } }, "put" : { "tags" : [ "Text" ], "summary" : "Upsert a Text", "operationId" : "upsertText", "parameters" : [ { "in" : "body", "name" : "body", "description" : "An database object to upsert", "required" : true, "schema" : { "$ref" : "#/definitions/Document" } } ], "responses" : { "201" : { "description" : "Upsert successful." } } } }, "/texts/{textId}" : { "get" : { "tags" : [ "Text" ], "summary" : "Retrieve a Text by ID", "operationId" : "getText", "parameters" : [ { "name" : "textId", "in" : "path", "description" : "The ID of the Text to perform the operation on", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Operation successful." } } }, "delete" : { "tags" : [ "Text" ], "summary" : "Delete a Text by ID", "operationId" : "deleteText", "parameters" : [ { "name" : "textId", "in" : "path", "description" : "The ID of the Text to perform the operation on", "required" : true, "type" : "string" } ], "responses" : { "204" : { "description" : "Delete operation successful." } } } } }, "securityDefinitions" : { "token" : { "description" : "An access token (JSON Web Token) included in the Authorization header. Tokens may be retrieved programmatically from https://login.digitallinguistics.io. See the documentation at http://digitallinguistics.github.io/dlx-login/.", "type" : "apiKey", "name" : "token", "in" : "header" } }, "definitions" : { "Document" : { "type" : "object", "required" : [ "type" ], "properties" : { "id" : { "type" : "string" }, "type" : { "type" : "string" } }, "title" : "Document", "description" : "A document in the DLx database" } }, "parameters" : { "body" : { "in" : "body", "name" : "body", "description" : "An database object to upsert", "required" : true, "schema" : { "$ref" : "#/definitions/Document" } }, "ids" : { "name" : "ids", "in" : "query", "description" : "A comma-separated list of IDs", "required" : false, "type" : "array", "items" : { "type" : "string" }, "collectionFormat" : "csv", "allowEmptyValue" : false } }, "responses" : { "DeleteSuccessful" : { "description" : "Delete operation successful." }, "Success" : { "description" : "Operation successful." }, "UpsertSuccessful" : { "description" : "Upsert successful." } }, "externalDocs" : { "description" : "How to use the API", "url" : "http://digitallinguistics.github.io/api/" } }