{"swagger":"2.0","info":{"version":"1.0","title":"1. iReporter","description":"TODO: Add Description","contact":{}},"host":"ireporter-nigeria.herokuapp.com","basePath":"/api/v1","securityDefinitions":{"auth":{"type":"oauth2","flow":"implicit","authorizationUrl":"https://ireporter-nigeria.herokuapp.com/api/v1","scopes":{}}},"schemes":["https"],"consumes":["application/json"],"produces":["application/json"],"paths":{"/red-flags/":{"get":{"description":"Returns a list of all red-flag records created by the current authorized user","summary":"Get red-flag records","tags":["Misc"],"operationId":"RedFlagsGet","produces":["application/json"],"parameters":[{"name":"Content-Type","in":"header","required":true,"type":"string","description":""}],"responses":{"200":{"description":"","headers":{}}},"security":[{"auth":[]}]},"post":{"description":"Creates a new red-flag record","summary":"Create red-flag record","tags":["Misc"],"operationId":"RedFlagsPost","produces":["application/json"],"consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"Content-Type","in":"header","required":true,"type":"string","description":""},{"name":"title","in":"formData","required":true,"type":"string","description":"Title of the red-flag record"},{"name":"comment","in":"formData","required":true,"type":"string","description":"Description of the red-flag record"},{"name":"latitude","in":"formData","required":true,"type":"string","description":"Latitude of the location where the red-flag incident happend"},{"name":"longitude","in":"formData","required":true,"type":"string","description":"Longitude of the location where the red-flag incident happend"},{"name":"Images","in":"formData","required":true,"type":"string","description":"Url of uploaded images"},{"name":"Videos","in":"formData","required":true,"type":"string","description":"Url of uploaded videos"}],"responses":{"200":{"description":"","headers":{}}},"security":[{"auth":[]}]}},"/red-flags/712857529":{"get":{"description":"Returns the details of a single red-flag record with the specified id","summary":"Get specific red-flag","tags":["Misc"],"operationId":"RedFlags712857529Get","produces":["application/json"],"parameters":[{"name":"Content-Type","in":"header","required":true,"type":"string","description":""}],"responses":{"200":{"description":"","headers":{}}},"security":[{"auth":[]}]}},"/red-flags/880075751/comment":{"patch":{"description":"Update the comment and title of a given red-flag record","summary":"Edit comment","tags":["Misc"],"operationId":"RedFlags880075751CommentPatch","produces":["application/json"],"consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"Content-Type","in":"header","required":true,"type":"string","description":""},{"name":"title","in":"formData","required":true,"type":"string","description":"The title of the red-flag report"},{"name":"comment","in":"formData","required":true,"type":"string","description":"The details of the red-flag report"}],"responses":{"200":{"description":"","headers":{}}},"security":[{"auth":[]}]}},"/red-flags/712857529/location":{"patch":{"description":"Update the latitude and longitude of a given red-flag record","summary":"Edit location","tags":["Misc"],"operationId":"RedFlags712857529LocationPatch","produces":["application/json"],"consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"Content-Type","in":"header","required":true,"type":"string","description":""},{"name":"latitude","in":"formData","required":true,"type":"string","description":"Latitude of the location where the red-flag incident happend"},{"name":"longitude","in":"formData","required":true,"type":"string","description":"Latitude of the location where the red-flag incident happend"}],"responses":{"200":{"description":"","headers":{}}},"security":[{"auth":[]}]}},"/red-flags/712857529/status":{"patch":{"description":"Changes the status of a red-flag record.\nPossible values are: \n1. under investigation\n2. resolved\n3. rejected\nThe values are case sensitive","summary":"Update red-flag status","tags":["Misc"],"operationId":"RedFlags712857529StatusPatch","produces":["application/json"],"consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"Content-Type","in":"header","required":true,"type":"string","description":""},{"name":"status","in":"formData","required":true,"type":"string","description":"The new status. Possible values are: \n1. under investigation\n2. resolved\n3. rejected\nThe values are case sensitive"}],"responses":{"200":{"description":"","headers":{}}},"security":[{"auth":[]}]}},"/interventions/375933236/status":{"patch":{"description":"Changes the status of an intervention record.\nPossible values are: \n1. under investigation\n2. resolved\n3. rejected\nThe values are case sensitive","summary":"Update intervention status","tags":["Misc"],"operationId":"Interventions375933236StatusPatch","produces":["application/json"],"consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"Content-Type","in":"header","required":true,"type":"string","description":""},{"name":"status","in":"formData","required":true,"type":"string","description":"The new status. Possible values are: \n1. under investigation\n2. resolved\n3. rejected\nThe values are case sensitive"}],"responses":{"200":{"description":"","headers":{}}},"security":[{"auth":[]}]}},"/auth/login":{"post":{"description":"Logs in a user as an admin and returns an authorization token that should be used with subsequent requests","summary":"Login","tags":["Misc"],"operationId":"AuthLoginPost","produces":["application/json"],"consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"Content-Type","in":"header","required":true,"type":"string","description":""},{"name":"username","in":"formData","required":true,"type":"string","description":"The username created during signup"},{"name":"password","in":"formData","required":true,"type":"string","description":"The password created during signup"}],"responses":{"200":{"description":"","headers":{}}},"security":[{"auth":[]}]}},"/auth/signup":{"post":{"description":"Creates a new account.","summary":"Signup","tags":["Misc"],"operationId":"AuthSignupPost","produces":["application/json"],"consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"Content-Type","in":"header","required":true,"type":"string","description":""},{"name":"firstname","in":"formData","required":true,"type":"string","description":"First name"},{"name":"lastname","in":"formData","required":true,"type":"string","description":"Last name or surname"},{"name":"email","in":"formData","required":true,"type":"string","description":"A valid email address"},{"name":"phoneNumber","in":"formData","required":true,"type":"string","description":"A valid mobile number. Nigerian format"},{"name":"othernames","in":"formData","required":true,"type":"string","description":"Other names"},{"name":"username","in":"formData","required":true,"type":"string","description":"Unique username"},{"name":"password","in":"formData","required":true,"type":"string","description":"Desired password"}],"responses":{"200":{"description":"","headers":{}}},"security":[{"auth":[]}]}},"/interventions/":{"get":{"description":"Returns a list of all intervention records created by the current authorized user","summary":"Get intervention records","tags":["Misc"],"operationId":"InterventionsGet","produces":["application/json"],"parameters":[{"name":"Content-Type","in":"header","required":true,"type":"string","description":""}],"responses":{"200":{"description":"","headers":{}}},"security":[{"auth":[]}]},"post":{"description":"Creates a new intervention record","summary":"Create intervention record","tags":["Misc"],"operationId":"InterventionsPost","produces":["application/json"],"consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"Content-Type","in":"header","required":true,"type":"string","description":""},{"name":"title","in":"formData","required":true,"type":"string","description":"Title of the intervention record"},{"name":"comment","in":"formData","required":true,"type":"string","description":"Description of the intervention record"},{"name":"latitude","in":"formData","required":true,"type":"string","description":"Latitude of the location where the incident happend"},{"name":"longitude","in":"formData","required":true,"type":"string","description":"Longitude of the location where the incident happend"},{"name":"Images","in":"formData","required":true,"type":"string","description":"Url of uploaded images"},{"name":"Videos","in":"formData","required":true,"type":"string","description":"Url of uploaded videos"}],"responses":{"200":{"description":"","headers":{}}},"security":[{"auth":[]}]}},"/interventions/375933236":{"get":{"description":"Returns the details of a single intervention record with the specified id","summary":"Get specific intervention","tags":["Misc"],"operationId":"Interventions375933236Get","produces":["application/json"],"parameters":[{"name":"Content-Type","in":"header","required":true,"type":"string","description":""}],"responses":{"200":{"description":"","headers":{}}},"security":[{"auth":[]}]}},"/interventions/375933236/comment":{"patch":{"description":"Update the comment and title of a given intervention record","summary":"Edit  intervention comment","tags":["Misc"],"operationId":"Interventions375933236CommentPatch","produces":["application/json"],"consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"Content-Type","in":"header","required":true,"type":"string","description":""},{"name":"title","in":"formData","required":true,"type":"string","description":"The title of the intervention report"},{"name":"comment","in":"formData","required":true,"type":"string","description":"The details of the intervention report"}],"responses":{"200":{"description":"","headers":{}}},"security":[{"auth":[]}]}},"/interventions/375933236/location":{"patch":{"description":"Update the latitude and longitude of a given red-flag record","summary":"Edit location1","tags":["Misc"],"operationId":"Interventions375933236LocationPatch","produces":["application/json"],"consumes":["application/x-www-form-urlencoded"],"parameters":[{"name":"Content-Type","in":"header","required":true,"type":"string","description":""},{"name":"latitude","in":"formData","required":true,"type":"string","description":"Latitude of the location where the red-flag incident happend"},{"name":"longitude","in":"formData","required":true,"type":"string","description":"Latitude of the location where the red-flag incident happend"}],"responses":{"200":{"description":"","headers":{}}},"security":[{"auth":[]}]}}},"tags":[{"name":"Misc","description":""}]}