openapi: 3.0.0 info: title: 'Items api' description: "Items api is a api to store or get a item based on a user and a app.\n * [Readme](https://matteobrusa.github.io/md-styler/?url=https://www.odusseus.org/php/elpida/README.md)\n * [swagger editor](https://editor.swagger.io/)\n * [Github Item's](https://github.com/Odusseus/php/tree/master/items/elpida)" version: '1.1.2 Elpida 19-9-2020' servers: - url: 'https://www.odusseus.org/php/elpida' paths: /php/elpida/ItemGetApi.php/isalive: get: summary: 'is Api alive?' parameters: - name: isalive in: query description: 'Check if the methode is alive when string is available in the query.' required: false schema: type: string responses: '200': description: 'When is alive.' /php/elpida/ItemGetApi.php/maxlength: get: summary: 'return the maxlength allowed in bytes of a item?' parameters: - name: maxlength in: query description: 'Return the maxlength of a item when string is available in the query.' required: false schema: type: string responses: '200': description: 'the maxlength of a item in bytes.' /php/elpida/ItemGetApi.php/itemlength: get: summary: 'return the length (bytes and %) of the saved item.' parameters: - name: itemlength in: query description: 'Return the length of the saved item when string is available in the query.' required: false schema: type: string responses: '200': description: 'the length (bytes and %) of the saved item.' /php/elpida/ItemGetApi.php: get: summary: 'Get a item.' description: 'Get a saved item based on the authorisation cookie.' responses: '200': description: 'return the item.' /php/elpida/ItemSetApi.php/isalive: get: summary: 'is Api alive?' parameters: - name: isalive in: query description: 'Check if the methode is alive when string is available in the query.' required: false schema: type: string responses: '200': description: 'When is alive.' /php/elpida/ItemSetApi.php: post: summary: 'Save a item.' description: 'Save a item based on the authorisation cookie.' requestBody: content: application/json: schema: properties: value: description: 'The value of the item.' type: string version: description: 'The version of the item. The new version must always be higher than the saved version.' type: number type: object example: value: 'demo value...' version: 2 responses: '200': description: 'Success when item is saved.' '400': description: 'BAD_REQUEST when version of the item is obsolete.' '401': description: 'UNAUTHORIZED when cookie is unauthorised of not found.' '403': description: 'FORBIDDEN when Ip is blacklisted or when User already exists..' '404': description: 'NOT_FOUND when COOKIE_TOKEN/USER/VALUE is not found.' '406': description: 'NOT_ACCEPTABLE when Item is to long.' '422': description: 'UNPROCESSABLE_ENTITY when COOKIE_TOKEN/VALUE is missing.' '500': description: 'INTERNAL_SERVER_ERROR when Item is not saved.' /php/elpida/UserActivateApi.php/isalive: get: summary: 'is Api alive?' parameters: - name: isalive in: query description: 'Check if the methode is alive when string is available in the query.' required: false schema: type: string responses: '200': description: 'When is alive.' /php/elpida/UserActivateApi.php: post: summary: 'Activate a account' description: 'Call UserActivateApi with the parameters below to activate the account.' parameters: - name: nickname in: query description: 'Nickname of the user.' required: true schema: type: string - name: activationcode in: query description: 'The email activationcode.' required: true schema: type: number - name: appname in: query description: 'The name of the app.' required: true schema: type: string responses: '200': description: 'When account is activated.' '403': description: 'FORBIDDEN when Ip is blacklisted or when User already exists..' '404': description: 'NOT_FOUND when NICKNAME/APPNAME/ACTIVATION_CODE is not found.' '422': description: 'UNPROCESSABLE_ENTITY when NICKNAME/APPNAME/ACTIVATION_CODE is missing.' /php/elpida/UserCreateApi.php/isalive: get: summary: 'is Api alive?' parameters: - name: isalive in: query description: 'Check if the methode is alive when string is available in the query.' required: false schema: type: string responses: '200': description: 'When is alive.' /php/elpida/UserCreateApi.php: post: summary: 'Create a account for a user and a app.' description: 'Call UserCreateApi with the parameters below to create a account. A email will be send to validate the account' requestBody: content: application/json: schema: properties: appname: type: string nickname: type: string password: type: string email: type: string type: object example: appname: myApp nickname: myNickname password: myPassword email: my@email.org responses: '200': description: 'Success when account is created.' '403': description: 'FORBIDDEN when Ip is blacklisted or when User already exists..' '423': description: 'LOCKED when Maximum users is reached.' '404': description: 'NOT_FOUND when APPNAME is not found.' '422': description: 'UNPROCESSABLE_ENTITY when NICKNAME/PASSWORD/EMAIL/APPNAME is missing.' /php/elpida/UserLoginApi.php/isalive: get: summary: 'is Api alive?' parameters: - name: isalive in: query description: 'Check if the methode is alive when string is available in the query.' required: false schema: type: string responses: '200': description: 'When is alive.' /php/elpida/UserLoginApi.php/isloggedin: get: summary: 'Api is user logged in?' parameters: - name: isloggedin in: query description: 'Check if the user is logged in when a active cookie match with a user.' required: false schema: type: string responses: '200': description: 'When is logged in.' /php/elpida/UserLoginApi.php: post: summary: 'User log in for a app and get a authorisation cookie.' description: 'User log in for a app.' requestBody: content: application/json: schema: properties: appname: type: string nickname: type: string password: type: string type: object example: appname: myApp nickname: myNickname password: myPassword responses: '200': description: 'Success when user is log in. He gets a authorisation cookie' '403': description: 'FORBIDDEN when Ip is blacklisted or when User already exists..' '404': description: 'NOT_FOUND when APPNAME/NICKNAME/PASSWORD or the combination appname and nickname are not found.' '422': description: 'UNPROCESSABLE_ENTITY when APPNAME/NICKNAME/PASSWORD is missing.'