{ "swagger": "2.0", "info": { "version": "1.0.0", "title": "krimfup.se", "description": "The internal API for https://www.krimfup.se/", "contact": { "name": "ScriptSector AB" } }, "host": "www.krimfup.se", "basePath": "/api.php", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "person.create": { "post": { "description": "Creates a new person in the database.", "operationId": "personCreate", "produces": [ "application/json" ], "parameters": [ { "name": "api_key", "in": "body", "description": "The API key", "required": true, "type": "string" }, { "name": "method", "in": "body", "description": "Always set to: person.create", "required": true, "type": "string" }, { "name": "full_name", "in": "body", "description": "The persons full name", "required": true, "type": "string" }, { "name": "ssn", "in": "body", "description": "The persons SSN number, idealy 12 digits", "required": true, "type": "string" }, { "name": "crimes", "in": "body", "description": "The crimes the person has committed. Separate each crime with a comma (,)", "required": false, "type": "string" } ], "responses": { "200": { "description": "personCreate response", "schema": { "type": "object", "properties": { "person_id": { "type": "integer" } } } } } } }, "file.create": { "post": { "description": "Creates a new file in the database.", "operationId": "fileCreate", "produces": [ "application/json" ], "parameters": [ { "name": "api_key", "in": "body", "description": "The API key", "required": true, "type": "string" }, { "name": "method", "in": "body", "description": "Always set to: file.create", "required": true, "type": "string" }, { "name": "external_reference", "in": "body", "description": "The file external reference", "required": true, "type": "string" }, { "name": "external_reference_2", "in": "body", "description": "The file external reference 2", "required": false, "type": "string" }, { "name": "filename", "in": "body", "description": "The filename of the file in the S3 storage space", "required": true, "type": "string" } ], "responses": { "200": { "description": "fileCreate response", "schema": { "type": "object", "properties": { "file_id": { "type": "integer" } } } } } } }, "file.connectPerson": { "post": { "description": "Connect a person to a file.", "operationId": "connectPerson", "produces": [ "application/json" ], "parameters": [ { "name": "api_key", "in": "body", "description": "The API key", "required": true, "type": "string" }, { "name": "method", "in": "body", "description": "Always set to: file.connectPerson", "required": true, "type": "string" }, { "name": "file_id", "in": "body", "description": "The ID of the file", "required": true, "type": "integer" }, { "name": "person_id", "in": "body", "description": "The ID of the person", "required": true, "type": "integer" }, { "name": "crime", "in": "body", "description": "The related crime", "required": false, "type": "string" } ], "responses": { "200": { "description": "connectPerson response", "schema": { "type": "object", "properties": {} } } } } } }, "definitions": { } }