{"swaggerDoc":{"swagger":"2.0","info":{"description":"API Documentation for the InterMine Registry RESTful API.","version":"1.1.0","title":"InterMine Registry","license":{"name":"GNU General Public License v3.0","url":"https://www.gnu.org/licenses/gpl-3.0.en.html"}},"host":"registry.intermine.org","basePath":"/service","tags":[{"name":"instances","description":"Operations regarding the InterMine Registry instances.","externalDocs":{"description":"Find out more","url":"https://github.com/intermine/intermine-registry/"}},{"name":"synchronize","description":"Operations regarding the InterMine Registry instances versions & branding updates.","externalDocs":{"description":"Find out more","url":"https://github.com/intermine/intermine-registry/"}},{"name":"namespace","description":"Operation regarding the InterMine Registry namespaces.","externalDocs":{"description":"Find out more","url":"https://github.com/intermine/intermine-registry/"}},{"name":"/{namespace}","description":"Operations regarding the InterMine Registry redirection.","externalDocs":{"description":"Find out more","url":"https://github.com/intermine/intermine-registry/"}}],"schemes":["http"],"paths":{"/instances":{"post":{"tags":["instances"],"summary":"Add an instance to the InterMine Registry.","description":"Add a new instance to the InterMine Registry. Name, Namespace and URL are required. Provided URL is subject to test by doing a ping to the mine /version endpoint.","operationId":"addinstances","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"Information needed to create an instance on the Registry","required":true,"schema":{"type":"object","required":["name","namespace","url"],"properties":{"name":{"type":"string","example":"FlyMine"},"namespace":{"type":"string","example":"flymine"},"neighbours":{"items":{"type":"string"},"example":["MODs"],"type":"array"},"organisms":{"items":{"type":"string"},"example":["Drosophila"],"type":"array"},"url":{"type":"string","example":"http://www.flymine.org/query"},"description":{"type":"string","example":"FlyMine is an integrated database of genomic, expression and protein data for Drosophila, Anopheles and C. elegans"},"location":{"properties":{"latitude":{"type":"string","example":"52.2003399"},"longitude":{"type":"string","example":"0.120109"}},"type":"object"},"twitter":{"type":"string","example":"@intermineorg"}}}}],"responses":{"201":{"description":"Instance Successfully Added to the Registry"},"400":{"description":"Malformed JSON. Invalid or Missing Data. Check for invalid URL."},"401":{"description":"Authentication information is missing or invalid","headers":{"WWW_Authenticate":{"type":"string"}}},"406":{"description":"Bad Request"}},"security":[{"basicAuth":[]}]},"get":{"tags":["instances"],"summary":"Get all InterMine Registry Instances information.","description":"Get all Registry Instances which status is Running.","operationId":"getAllInstances","produces":["application/json"],"parameters":[{"name":"q","in":"query","description":"A space-delimited list of word to look for in the instance name, organisms or brief description. If not given, all the instances are returned.","required":false,"type":"string"},{"name":"mines","in":"query","description":"Three possible values: 'dev', 'all' or 'prod'. Retrieves the InterMine instances that are 'development' mines, all the mines or 'production' mines respectively. ","required":false,"type":"string"}],"responses":{"200":{"description":"Successful Operation","schema":{"items":{"$ref":"#/definitions/instances"}}},"404":{"description":"Instances Not Found"}},"security":[]}},"/instances/{instanceIdOrNameOrNamespace}":{"get":{"tags":["instances"],"summary":"Finds an instance by its ID, Name or Namespace","description":"Get all the information of a given InterMine instance (id, Name or Namespace).","operationId":"findInstanceById","produces":["application/json"],"parameters":[{"name":"instanceIdOrNameOrNamespace","in":"path","description":"ID or Name or Namespace of instance to return","required":true,"type":"string"}],"responses":{"200":{"description":"Successful Operation","schema":{"type":"array","items":{"$ref":"#/definitions/instances"}}},"404":{"description":"Instance Not Found"}},"security":[]}},"/instances/{instancesId}":{"put":{"tags":["instances"],"summary":"Update an instance on the InterMine Registry","description":"Update the instance given in the URL on the InterMine Registry.","operationId":"updateInstance","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"instancesId","in":"path","description":"ID of the instance that needs to be updated","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"Information needed to update an instance on the Registry. Not all the fields are needed.","required":true,"schema":{"type":"object","properties":{"name":{"type":"string","example":"FlyMine"},"namespace":{"type":"string","example":"FlyMine"},"neighbours":{"items":{"type":"string"},"example":["MODs"],"type":"array"},"organisms":{"items":{"type":"string"},"example":["Drosophila"],"type":"array"},"url":{"type":"string","example":"http://www.flymine.org/query"},"description":{"type":"string","example":"FlyMine is an integrated database of genomic, expression and protein data for Drosophila, Anopheles and C. elegans"},"location":{"properties":{"latitude":{"type":"string","example":"52.2003399"},"longitude":{"type":"string","example":"0.120109"}},"type":"object"},"twitter":{"type":"string","example":"@intermineorg"}}}}],"responses":{"201":{"description":"Instance Successfully Updated on the Registry"},"400":{"description":"Malformed JSON. Invalid or Missing Data. Check for invalid URL."},"401":{"description":"Authentication information is missing or invalid","headers":{"WWW_Authenticate":{"type":"string"}}},"404":{"description":"Instance Not Found"},"406":{"description":"Bad Request"}},"security":[{"basicAuth":[]}]},"delete":{"tags":["instances"],"summary":"Deletes an instance from the InterMine Registry","description":"Delete the instance given in the URL from the registry.","operationId":"deleteinstances","produces":["application/json"],"parameters":[{"name":"instancesId","in":"path","description":"Id of the instance to delete","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"Instance Successfully Deleted"},"401":{"description":"Authentication information is missing or invalid","headers":{"WWW_Authenticate":{"type":"string"}}},"404":{"description":"Instance Not Found"}},"security":[{"basicAuth":[]}]}},"/synchronize":{"put":{"tags":["synchronize"],"summary":"Update the branding & version information of every instance on the InterMine Registry","description":"Update the branding & version information of every instance on the InterMine Registry. For each instance on the registry we do 4 parallel http requests to the branding & version endpoints to verify if they have been updated.","operationId":"synchronizeInstances","consumes":["application/json"],"produces":["application/json"],"responses":{"201":{"description":"Instance Version & Branding Successfully Updated on the InterMine Registry"},"401":{"description":"Authentication information is missing or invalid","headers":{"WWW_Authenticate":{"type":"string"}}},"406":{"description":"Bad Request"}},"security":[{"basicAuth":[]}]}},"/synchronize/{instanceIdOrName}":{"put":{"tags":["synchronize"],"summary":"Update the branding & version information on the InterMine Registry of the specified instance in the URL","description":"Update the branding & version information of the instance given in the URL","operationId":"synchronizeInstance","consumes":["application/json"],"parameters":[{"name":"instanceIdOrName","in":"path","description":"ID or Name of instance to update","required":true,"type":"string"}],"produces":["application/json"],"responses":{"201":{"description":"Instances Versions & Branding Successfully Updated on the Registry"},"401":{"description":"Authentication information is missing or invalid","headers":{"WWW_Authenticate":{"type":"string"}}},"404":{"description":"Instance Not Found"},"406":{"description":"Bad Request"}},"security":[{"basicAuth":[]}]}},"/namespace":{"get":{"tags":["namespace"],"summary":"","description":"Return the namespace assigned to the instance with URL given in input","operationId":"redirect","consumes":["application/json"],"parameters":[{"name":"url","in":"query","description":"The URL of the instance","required":true,"type":"string"}],"produces":["application/json"],"responses":{"200":{"description":"Successful Operation"},"404":{"description":"Url Not Found"}},"security":[]}},"/{namespace}":{"get":{"tags":["/{namespace}"],"summary":"","description":"Redirect to URL assigned to the namespace","operationId":"redirect","consumes":["application/json"],"parameters":[{"name":"namespace","in":"path","description":"The namespace of the instance","required":true,"type":"string"}],"produces":["application/json"],"responses":{"303":{"description":"Redirected to the URL assigned to the namespace"},"404":{"description":"Namespace Not Found"}},"security":[]}}},"securityDefinitions":{"basicAuth":{"type":"basic"}},"definitions":{"instances":{"type":"object","required":["name","namespace","url"],"properties":{"name":{"type":"string","example":"FlyMine"},"namespace":{"type":"string","example":"flymine"},"api_version":{"type":"string","example":"19"},"release_version":{"type":"string","example":"42.1 2016 Jan"},"intermine_version":{"type":"string","example":"1.7.1"},"neighbours":{"items":{"type":"string"},"example":["MODs"],"type":"array"},"organisms":{"items":{"type":"string"},"example":["Drosophila"],"type":"array"},"url":{"type":"string","example":"http://www.flymine.org/query"},"description":{"type":"string","example":"FlyMine is an integrated database of genomic, expression and protein data for Drosophila, Anopheles and C. elegans"},"location":{"properties":{"latitude":{"type":"string","example":"52.2003399"},"longitude":{"type":"string","example":"0.120109"}},"type":"object"},"colors":{"properties":{"focus":{"properties":{"bg":{"type":"string","example":"#fff"},"fg":{"type":"string","example":"#5c0075"}},"type":"object"},"main":{"properties":{"bg":{"type":"string","example":"#535353"},"fg":{"type":"string","example":"#fff"}},"type":"object"},"header":{"properties":{"text":{"type":"string","example":"#535353"},"main":{"type":"string","example":"#fff"}},"type":"object"}},"type":"object"},"images":{"properties":{"main":{"type":"string","example":"model/images/logo.png"},"small":{"type":"string","example":"model/images/logo.png"},"logo":{"type":"string","example":"model/images/logo.png"}},"type":"object"},"twitter":{"type":"string","example":"@intermineorg"},"status":{"type":"string","example":"Running"}}},"apiResponse":{"type":"object","properties":{"extraData":{"items":{"type":"object"},"type":"array"},"statusCode":{"type":"integer","format":"int32","example":"200"},"message":{"type":"string","example":"Instance Successfully Updated"},"executionTime":{"type":"string","example":"6/6/2017, 1:42:19 PM"}},"required":["message","executionTime","statusCode"]}},"externalDocs":{"description":"InterMine Registry GitHub","url":"https://github.com/intermine/intermine-registry/"}},"customOptions":{}}