{"swagger":"2.0","info":{"title":"Congo","description":"Congo","contact":{"name":"congo","email":"congo","url":"https://congo.gopheracademy.com"},"version":""},"host":"congo.gopheracademy.com","basePath":"/api","schemes":["https"],"consumes":["application/json","application/xml","application/gob","application/x-gob"],"produces":["application/json","application/xml","application/gob","application/x-gob"],"paths":{"/admin/users":{"get":{"description":"List all users\n\n** Required security scopes**:\n","operationId":"adminuser#list","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/UserCollection"}},"404":{"description":"Not Found"}},"schemes":["https"]},"post":{"description":"Record new user\n\n** Required security scopes**:\n","operationId":"adminuser#create","parameters":[{"name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/CreateAdminuserPayload"}}],"responses":{"201":{"description":"Resource created","headers":{"Location":{"description":"href to created resource","type":"string","pattern":"^/admin/users/[0-9]+$"}}}},"schemes":["https"]}},"/admin/users/{userID}":{"get":{"description":"Retrieve user with given id\n\n** Required security scopes**:\n","operationId":"adminuser#show","parameters":[{"name":"userID","in":"path","required":true,"type":"integer"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/User"}},"404":{"description":"Not Found"}},"schemes":["https"]},"delete":{"description":"\n\n** Required security scopes**:\n","operationId":"adminuser#delete","parameters":[{"name":"userID","in":"path","description":"UserID ","required":true,"type":"integer"}],"responses":{"204":{"description":"No Content"},"404":{"description":"Not Found"}},"schemes":["https"]},"patch":{"description":"\n\n** Required security scopes**:\n","operationId":"adminuser#update","parameters":[{"name":"userID","in":"path","required":true,"type":"integer"},{"name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/UpdateAdminuserPayload"}}],"responses":{"204":{"description":"No Content"},"404":{"description":"Not Found"}},"schemes":["https"]}},"/auth/refresh":{"post":{"description":"Obtain a refreshed access token","operationId":"auth#refresh","responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/Authorize"}}},"schemes":["https"],"security":[{"password":[]}]}},"/auth/token":{"post":{"description":"Obtain an access token","operationId":"auth#token","responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/Authorize"}}},"schemes":["https"],"security":[{"password":[]}]}},"/healthz":{"get":{"description":"Get Server Status","operationId":"healthz#status","schemes":["https"]}},"/tenants":{"get":{"description":"List all tenants","operationId":"tenant#list","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/TenantCollection"}},"404":{"description":"Not Found"}},"schemes":["https"]},"post":{"description":"Record new tenant","operationId":"tenant#create","parameters":[{"name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/CreateTenantPayload"}}],"responses":{"201":{"description":"Resource created","headers":{"Location":{"description":"href to created resource","type":"string","pattern":"^/tenants/[0-9]+$"}}}},"schemes":["https"]}},"/tenants/{tenantID}":{"get":{"description":"Retrieve tenant with given id","operationId":"tenant#show","parameters":[{"name":"tenantID","in":"path","required":true,"type":"integer"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/Tenant"}},"404":{"description":"Not Found"}},"schemes":["https"]},"delete":{"operationId":"tenant#delete","parameters":[{"name":"tenantID","in":"path","description":"Tenant ID","required":true,"type":"integer"}],"responses":{"204":{"description":"No Content"},"404":{"description":"Not Found"}},"schemes":["https"]},"patch":{"operationId":"tenant#update","parameters":[{"name":"tenantID","in":"path","required":true,"type":"integer"},{"name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/UpdateTenantPayload"}}],"responses":{"204":{"description":"No Content"},"404":{"description":"Not Found"}},"schemes":["https"]}},"/tenants/{tenantID}/events":{"get":{"description":"List all events\n\n** Required security scopes**:\n","operationId":"event#list","parameters":[{"name":"tenantID","in":"path","required":true,"type":"integer"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/EventCollection"}},"404":{"description":"Not Found"}},"schemes":["https"]},"post":{"description":"Record new event\n\n** Required security scopes**:\n","operationId":"event#create","parameters":[{"name":"tenantID","in":"path","required":true,"type":"integer"},{"name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/CreateEventPayload"}}],"responses":{"201":{"description":"Resource created","headers":{"Location":{"description":"href to created resource","type":"string","pattern":"^/tenants/[0-9]/events/[0-9]+$"}}}},"schemes":["https"]}},"/tenants/{tenantID}/events/{eventID}":{"get":{"description":"Retrieve event with given id","operationId":"event#show","parameters":[{"name":"eventID","in":"path","required":true,"type":"integer"},{"name":"tenantID","in":"path","required":true,"type":"integer"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/Event"}},"404":{"description":"Not Found"}},"schemes":["https"]},"delete":{"description":"\n\n** Required security scopes**:\n","operationId":"event#delete","parameters":[{"name":"eventID","in":"path","description":"Event ID","required":true,"type":"integer"},{"name":"tenantID","in":"path","required":true,"type":"integer"}],"responses":{"204":{"description":"No Content"},"404":{"description":"Not Found"}},"schemes":["https"]},"patch":{"description":"\n\n** Required security scopes**:\n","operationId":"event#update","parameters":[{"name":"eventID","in":"path","required":true,"type":"integer"},{"name":"tenantID","in":"path","required":true,"type":"integer"},{"name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/UpdateEventPayload"}}],"responses":{"204":{"description":"No Content"},"404":{"description":"Not Found"}},"schemes":["https"]}},"/tenants/{tenantID}/series":{"get":{"description":"List all series\n\n** Required security scopes**:\n","operationId":"series#list","parameters":[{"name":"tenantID","in":"path","required":true,"type":"integer"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/SeriesCollection"}},"404":{"description":"Not Found"}},"schemes":["https"]},"post":{"description":"Record new series\n\n** Required security scopes**:\n","operationId":"series#create","parameters":[{"name":"tenantID","in":"path","required":true,"type":"integer"},{"name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/CreateSeriesPayload"}}],"responses":{"201":{"description":"Resource created","headers":{"Location":{"description":"href to created resource","type":"string","pattern":"^/tenants/[0-9]/series/[0-9]+$"}}}},"schemes":["https"]}},"/tenants/{tenantID}/series/{seriesID}":{"get":{"description":"Retrieve series with given id\n\n** Required security scopes**:\n","operationId":"series#show","parameters":[{"name":"seriesID","in":"path","required":true,"type":"integer"},{"name":"tenantID","in":"path","required":true,"type":"integer"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/Series"}},"404":{"description":"Not Found"}},"schemes":["https"]},"delete":{"description":"\n\n** Required security scopes**:\n","operationId":"series#delete","parameters":[{"name":"seriesID","in":"path","description":"Series ID","required":true,"type":"integer"},{"name":"tenantID","in":"path","required":true,"type":"integer"}],"responses":{"204":{"description":"No Content"},"404":{"description":"Not Found"}},"schemes":["https"]},"patch":{"description":"\n\n** Required security scopes**:\n","operationId":"series#update","parameters":[{"name":"seriesID","in":"path","required":true,"type":"integer"},{"name":"tenantID","in":"path","required":true,"type":"integer"},{"name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/UpdateSeriesPayload"}}],"responses":{"204":{"description":"No Content"},"404":{"description":"Not Found"}},"schemes":["https"]}},"/tenants/{tenantID}/users":{"get":{"description":"List all users for a tenant\n\n** Required security scopes**:\n","operationId":"user#list","parameters":[{"name":"tenantID","in":"path","required":true,"type":"integer"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/UserCollection"}},"404":{"description":"Not Found"}},"schemes":["https"]},"post":{"description":"Record new user\n\n** Required security scopes**:\n","operationId":"user#create","parameters":[{"name":"tenantID","in":"path","required":true,"type":"integer"},{"name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/CreateUserPayload"}}],"responses":{"201":{"description":"Resource created","headers":{"Location":{"description":"href to created resource","type":"string","pattern":"^/tenants/[0-9]+/users/[0-9]+$"}}}},"schemes":["https"]}},"/tenants/{tenantID}/users/{userID}":{"get":{"description":"Retrieve user with given id\n\n** Required security scopes**:\n","operationId":"user#show","parameters":[{"name":"tenantID","in":"path","required":true,"type":"integer"},{"name":"userID","in":"path","required":true,"type":"integer"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/User"}},"404":{"description":"Not Found"}},"schemes":["https"]},"delete":{"description":"\n\n** Required security scopes**:\n","operationId":"user#delete","parameters":[{"name":"tenantID","in":"path","required":true,"type":"integer"},{"name":"userID","in":"path","description":"UserID ","required":true,"type":"integer"}],"responses":{"204":{"description":"No Content"},"404":{"description":"Not Found"}},"schemes":["https"]},"patch":{"description":"\n\n** Required security scopes**:\n","operationId":"user#update","parameters":[{"name":"tenantID","in":"path","required":true,"type":"integer"},{"name":"userID","in":"path","required":true,"type":"integer"},{"name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/UpdateUserPayload"}}],"responses":{"204":{"description":"No Content"},"404":{"description":"Not Found"}},"schemes":["https"]}},"/validate/{userID}":{"get":{"description":"validate user email","operationId":"validate#validate","parameters":[{"name":"userID","in":"path","required":true,"type":"string"},{"name":"v","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"OK"},"404":{"description":"Not Found"}},"schemes":["https"]}}},"definitions":{"Authorize":{"title":"Mediatype identifier: application/vnd.authorize+json","type":"object","properties":{"access_token":{"type":"string","description":"access token","example":"Aut aspernatur excepturi."},"expires_in":{"type":"integer","description":"Time to expiration in seconds","example":1423874802512420957,"format":"int64"},"tenant":{"type":"object","properties":{"id":{"type":"integer","description":"ID","example":1999400714536249347,"format":"int64"},"name":{"type":"string","description":"name","example":"Sit eos."}},"description":"tenant","example":{"id":3969518700682667638,"name":"Et libero culpa."}},"token_type":{"type":"string","description":"type of token","example":"Error dolores dolorem tempora aut."},"user":{"type":"object","properties":{"active":{"type":"boolean","description":"Activation status","example":false},"email":{"type":"string","description":"Email address of user","example":"wz","format":"email","minLength":2},"first_name":{"type":"string","description":"First name of user","example":"bjyh","minLength":2},"href":{"type":"string","description":"API href of record","example":"Nisi aspernatur non voluptatibus."},"id":{"type":"integer","description":"ID of record","example":8769875072716209837,"format":"int64"},"last_name":{"type":"string","description":"Last name of user","example":"j8","minLength":2},"role":{"type":"string","description":"User's role","example":"Aliquid aut id quia."},"tenant_id":{"type":"integer","example":7069450719703720201,"format":"int64"},"validated":{"type":"boolean","description":"Validation status","example":true}},"description":"user","example":{"active":false,"email":"Ut magnam odit nemo numquam.","first_name":"Tempora a odit dolores voluptas quis.","href":"In eos ab porro est exercitationem nisi.","id":7180736786154332961,"last_name":"Velit excepturi aut minus nam.","role":"Doloremque blanditiis quo nostrum quo esse.","tenant_id":8701398505595027364,"validated":false}}},"description":"Token authorization response","example":{"access_token":"Laudantium tempore voluptatem.","expires_in":4869192690920850514,"tenant":{"id":5728362918364472433,"name":"Est aut adipisci eaque molestias dolorum illo."},"token_type":"Optio beatae aperiam quo.","user":{"active":false,"email":"Beatae consequatur mollitia sed explicabo id.","first_name":"Eos tempora corporis aliquam id nulla suscipit.","href":"Est esse a inventore libero sint cumque.","id":7831165214039818002,"last_name":"Qui molestiae.","role":"Atque dolorem voluptas et.","tenant_id":6244484567252341207,"validated":false}}},"CreateAdminuserPayload":{"title":"CreateAdminuserPayload","type":"object","properties":{"email":{"type":"string","minLength":2},"first_name":{"type":"string","minLength":2},"id":{"type":"integer","format":"int64"},"last_name":{"type":"string","minLength":2},"password":{"type":"string","minLength":8},"role":{"type":"string"},"tenant_id":{"type":"integer","format":"int64"},"validated":{"type":"boolean"},"validation_code":{"type":"string","minLength":8}},"required":["first_name","last_name","email","password","role"]},"CreateEventPayload":{"title":"CreateEventPayload","type":"object","properties":{"name":{"type":"string","example":"tw","minLength":2}},"required":["name"]},"CreateSeriesPayload":{"title":"CreateSeriesPayload","type":"object","properties":{"name":{"type":"string","example":"snyg","minLength":2}},"required":["name"]},"CreateTenantPayload":{"title":"CreateTenantPayload","type":"object","properties":{"name":{"type":"string","example":"z6k","minLength":2}},"required":["name"]},"CreateUserPayload":{"title":"CreateUserPayload","type":"object","properties":{"email":{"type":"string","example":"6rjm","minLength":2},"first_name":{"type":"string","minLength":2},"id":{"type":"integer","format":"int64"},"last_name":{"type":"string","minLength":2},"password":{"type":"string","example":"3rle6ysw","minLength":8},"role":{"type":"string","example":"Blanditiis aut id iusto minima."},"validated":{"type":"boolean","example":false},"validation_code":{"type":"string","example":"qgm3gf1gi9","minLength":8}},"required":["first_name","last_name","email","password","role"]},"Event":{"title":"Mediatype identifier: application/vnd.event+json","type":"object","properties":{"end_date":{"type":"string","description":"end_date","example":"2003-04-17T13:45:10-04:00","format":"date-time"},"location":{"type":"string","description":"location","example":"Sit ut."},"name":{"type":"string","description":"name","example":"Qui quia voluptates culpa suscipit quia."},"start_date":{"type":"string","description":"start_date","example":"1995-03-23T19:05:53-05:00","format":"date-time"},"url":{"type":"string","description":"event URL","example":"Aliquam qui."}},"description":"An event is a specific instance of a conference, e.g. GopherCon 2016","example":{"end_date":"1989-11-30T02:51:32-05:00","location":"Est sit.","name":"Cupiditate quo molestias dicta excepturi.","start_date":"2004-02-11T09:42:24-05:00","url":"Itaque ex eum hic accusamus qui aspernatur."}},"EventCollection":{"title":"Mediatype identifier: application/vnd.event+json; type=collection","type":"array","items":{"type":"object","properties":{"end_date":{"type":"string","description":"end_date","example":"2003-04-17T13:45:10-04:00","format":"date-time"},"location":{"type":"string","description":"location","example":"Sit ut."},"name":{"type":"string","description":"name","example":"Qui quia voluptates culpa suscipit quia."},"start_date":{"type":"string","description":"start_date","example":"1995-03-23T19:05:53-05:00","format":"date-time"},"url":{"type":"string","description":"event URL","example":"Aliquam qui."}},"example":{"end_date":"1988-02-03T17:47:27-05:00","location":"Saepe odit porro.","name":"Harum tenetur sint aspernatur nemo inventore placeat.","start_date":"1976-05-31T06:39:48-04:00","url":"Vel cumque delectus ipsum facere qui vel."}},"example":[{"end_date":"1999-11-22T14:52:31-05:00","location":"Nostrum aut quia aut sed recusandae amet.","name":"Omnis necessitatibus sequi ab qui itaque.","start_date":"1989-11-24T06:14:49-05:00","url":"Delectus sint id reiciendis hic."},{"end_date":"2001-05-24T18:33:18-04:00","location":"Voluptatem veniam et dolor excepturi molestias.","name":"Rerum mollitia et sunt.","start_date":"1999-04-16T02:08:59-04:00","url":"Id tempora facilis voluptas quia."},{"end_date":"2014-06-18T01:15:35-04:00","location":"Aperiam nihil voluptatem qui voluptate.","name":"Nihil nesciunt voluptatem reprehenderit et qui.","start_date":"1987-03-08T07:14:21-05:00","url":"Cumque aut sit."}]},"Series":{"title":"Mediatype identifier: application/vnd.series+json","type":"object","properties":{"name":{"type":"string","description":"name","example":"Dolor in voluptatem sit neque iusto."}},"description":"A series is a recurring event, e.g. GopherCon","example":{"name":"Et quae."}},"SeriesCollection":{"title":"Mediatype identifier: application/vnd.series+json; type=collection","type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"name","example":"Dolor in voluptatem sit neque iusto."}},"example":{"name":"Voluptatem dolores."}},"example":[{"name":"Impedit magnam itaque praesentium incidunt illo."},{"name":"Fugit molestias eos ex harum quis ea."}]},"Tenant":{"title":"Mediatype identifier: application/vnd.tenant+json","type":"object","properties":{"id":{"type":"integer","description":"ID","example":1999400714536249347,"format":"int64"},"name":{"type":"string","description":"name","example":"Sit eos."}},"description":"Tenant account in Congo","example":{"id":868821950740357472,"name":"Dolor tempore."}},"TenantCollection":{"title":"Mediatype identifier: application/vnd.tenant+json; type=collection","type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"ID","example":1999400714536249347,"format":"int64"},"name":{"type":"string","description":"name","example":"Sit eos."}},"example":{"id":5995525989492453452,"name":"Sapiente consequatur sit autem vel mollitia et."}},"example":[{"id":4837478509094110843,"name":"Ab officia aut eum similique reiciendis."},{"id":3137364601285796204,"name":"Nisi et voluptatem."}]},"UpdateAdminuserPayload":{"title":"UpdateAdminuserPayload","type":"object","properties":{"email":{"type":"string","minLength":2},"first_name":{"type":"string","minLength":2},"id":{"type":"integer","format":"int64"},"last_name":{"type":"string","minLength":2},"password":{"type":"string","minLength":8},"role":{"type":"string"},"validated":{"type":"boolean"},"validation_code":{"type":"string","minLength":8}}},"UpdateEventPayload":{"title":"UpdateEventPayload","type":"object","properties":{"end_date":{"type":"string","example":"1993-02-24T21:28:42-05:00","format":"date-time"},"name":{"type":"string","minLength":2},"start_date":{"type":"string","example":"1998-06-05T03:55:04-04:00","format":"date-time"},"url":{"type":"string","example":"jmk0diz","minLength":5}}},"UpdateSeriesPayload":{"title":"UpdateSeriesPayload","type":"object","properties":{"name":{"type":"string","minLength":2}}},"UpdateTenantPayload":{"title":"UpdateTenantPayload","type":"object","properties":{"name":{"type":"string","minLength":2}}},"UpdateUserPayload":{"title":"UpdateUserPayload","type":"object","properties":{"email":{"type":"string","minLength":2},"first_name":{"type":"string","minLength":2},"id":{"type":"integer","format":"int64"},"last_name":{"type":"string","minLength":2},"password":{"type":"string","minLength":8},"role":{"type":"string"},"validated":{"type":"boolean"},"validation_code":{"type":"string","minLength":8}}},"User":{"title":"Mediatype identifier: application/vnd.user+json","type":"object","properties":{"active":{"type":"boolean","description":"Activation status","example":false},"email":{"type":"string","description":"Email address of user","example":"wz","format":"email","minLength":2},"first_name":{"type":"string","description":"First name of user","example":"bjyh","minLength":2},"href":{"type":"string","description":"API href of record","example":"Nisi aspernatur non voluptatibus."},"id":{"type":"integer","description":"ID of record","example":8769875072716209837,"format":"int64"},"last_name":{"type":"string","description":"Last name of user","example":"j8","minLength":2},"role":{"type":"string","description":"User's role","example":"Aliquid aut id quia."},"tenant_id":{"type":"integer","example":7069450719703720201,"format":"int64"},"validated":{"type":"boolean","description":"Validation status","example":true}},"description":"A user belonging to a tenant","example":{"active":true,"email":"Omnis quasi consectetur iusto dolor iure fuga.","first_name":"Aut placeat cumque.","href":"Praesentium id quis asperiores ipsum aliquam corporis.","id":9128591559483346470,"last_name":"Nihil vero quae fuga tempora exercitationem nihil.","role":"Facilis qui molestias nihil saepe.","tenant_id":5309379774313110300,"validated":false}},"UserCollection":{"title":"Mediatype identifier: application/vnd.user+json; type=collection","type":"array","items":{"type":"object","properties":{"active":{"type":"boolean","description":"Activation status","example":false},"email":{"type":"string","description":"Email address of user","example":"wz","format":"email","minLength":2},"first_name":{"type":"string","description":"First name of user","example":"bjyh","minLength":2},"href":{"type":"string","description":"API href of record","example":"Nisi aspernatur non voluptatibus."},"id":{"type":"integer","description":"ID of record","example":8769875072716209837,"format":"int64"},"last_name":{"type":"string","description":"Last name of user","example":"j8","minLength":2},"role":{"type":"string","description":"User's role","example":"Aliquid aut id quia."},"tenant_id":{"type":"integer","example":7069450719703720201,"format":"int64"},"validated":{"type":"boolean","description":"Validation status","example":true}},"example":{"active":false,"email":"Quis pariatur.","first_name":"Et reprehenderit et ad.","href":"Ad blanditiis officiis sint hic ex.","id":927951982180792872,"last_name":"Quas dignissimos rerum.","role":"Aut tempora nihil voluptas quo nesciunt dolor.","tenant_id":3215247721325459068,"validated":true}},"example":[{"active":true,"email":"Earum ut eum alias voluptatibus dolorem non.","first_name":"Praesentium quia enim et eos earum.","href":"Officiis a at quia.","id":1985859656651032298,"last_name":"Nihil aperiam est.","role":"Velit et atque earum ipsa.","tenant_id":2953071587754057667,"validated":false}]}},"responses":{"NoContent":{"description":"No Content"},"NotFound":{"description":"Not Found"},"OK":{"description":"OK","schema":{"$ref":"#/definitions/User"}}},"securityDefinitions":{"jwt":{"type":"apiKey","description":"\n\n**Token URL**: \u003ca href='https://congo.gopheracademy.com/api/auth/token'\u003ehttps://congo.gopheracademy.com/api/auth/token\u003c/a\u003e","name":"Authorization","in":"header"},"password":{"type":"basic","description":"Use your own password!"}},"externalDocs":{"description":"Getting Started Guide","url":"https://congodocs.gopheracademy.com"}}