{ "openapi": "3.0.1", "info": { "title": "Afkanerd developers manager API", "version": "0.1.0" }, "servers": [{ "url": "http://localhost:9000" }], "tags": [{ "name": "Users", "description": "Manage Users" }, { "name": "Authenticate", "description": "Authenticate a user's access" }, { "name": "Projects", "description": "Manage Projects" } ], "paths": { "/users": { "post": { "tags": [ "Users" ], "summary": "Create a new user", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "auth_id": { "type": "string" }, "auth_key": { "type": "string" }, "email": { "type": "string" }, "password": { "type": "string" } } } } } }, "responses": { "200": { "description": "Successful", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "auth_id": { "type": "string" }, "auth_key": { "type": "string" }, "email": { "type": "string" }, "password": { "type": "string" } } } } } }, "400": { "description": "Bad Request (e.g missing required fields)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "401": { "description": "Unauthorized (e.g User not found)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "409": { "description": "Conflict (e.g Duplicate Users found)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } } } } }, "/users/login": { "post": { "tags": [ "Users" ], "summary": "Login to dev console", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string" }, "password": { "type": "string" } } } } } }, "responses": { "200": { "description": "Successful", "content": { "application/json": { "schema": { "type": "object", "properties": { "sessionId": { "type": "string" }, "userId": { "type": "string" } } } } } }, "400": { "description": "Bad Request (e.g missing required fields)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "401": { "description": "Unauthorized (e.g User not found)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "409": { "description": "Conflict (e.g Duplicate Users found)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "429": { "description": "Maximum number of failed login attempts exceeded", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } } } } }, "/users/profile": { "post": { "tags": [ "Users" ], "summary": "Get users details", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "auth_id": { "type": "string" }, "auth_key": { "type": "string" }, "email": { "type": "string" } } } } } }, "responses": { "200": { "description": "Successful", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "auth_id": { "type": "string" }, "auth_key": { "type": "string" }, "email": { "type": "string" } } } } } }, "400": { "description": "Bad Request (e.g missing required fields)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "401": { "description": "Unauthorized (e.g User not found)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "409": { "description": "Conflict (e.g Duplicate Users found)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } } } } }, "/users/{user_id}/profile": { "post": { "tags": [ "Users" ], "summary": "Get users details with browser", "parameters": [{ "in": "path", "name": "user_id", "schema": { "type": "string" }, "required": true, "description": "Your user_id here" }], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "session_id": { "type": "string" } } } } } }, "responses": { "200": { "description": "Successful", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "auth_id": { "type": "string" }, "auth_key": { "type": "string" }, "email": { "type": "string" } } } } } }, "400": { "description": "Bad Request (e.g missing required fields)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "401": { "description": "Unauthorized (e.g User not found)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "409": { "description": "Conflict (e.g Duplicate Users found)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } } } } }, "/users/{user_id}/password": { "put": { "tags": [ "Users" ], "summary": "Update user password", "parameters": [{ "in": "path", "name": "user_id", "schema": { "type": "string" }, "required": true, "description": "Your user_id here" }], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "session_id": { "type": "string" }, "password": { "type": "string" }, "new_password": { "type": "string" } } } } } }, "responses": { "200": { "description": "Successful", "content": { "application/json": { "schema": { "type": "object", "properties": { "sessionId": { "type": "string" } } } } } }, "400": { "description": "Bad Request (e.g missing required fields)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "401": { "description": "Unauthorized (e.g User not found)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "409": { "description": "Conflict (e.g Duplicate Users found)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } } } } }, "/users/{user_id}/logout": { "post": { "tags": [ "Users" ], "summary": "Delete user session", "parameters": [{ "in": "path", "name": "user_id", "schema": { "type": "string" }, "required": true, "description": "Your user_id here" }], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "session_id": { "type": "string" } } } } } }, "responses": { "200": { "description": "Successful", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Bad Request (e.g missing required fields)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "401": { "description": "Unauthorized (e.g User not found)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "409": { "description": "Conflict (e.g Duplicate Users found)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } } } } }, "/auth/users/{user_id}/projects/{project_id}": { "post": { "tags": [ "Authenticate" ], "parameters": [{ "in": "path", "name": "user_id", "schema": { "type": "string" }, "required": true, "description": "Your user_id here" }, { "in": "path", "name": "project_id", "schema": { "type": "string" }, "required": true, "description": "Your project_id here" } ], "summary": "Authenticate user's project", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "auth_id": { "type": "string" }, "auth_key": { "type": "string" }, "scope": { "type": "array", "items": { "type": "string" } } } } } } }, "responses": { "200": { "description": "Successful", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Bad Request (e.g missing required fields)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "401": { "description": "Unauthorized (e.g User, Provder or Platform not found)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "409": { "description": "Conflict (e.g Duplicate Users, Providers or Platforms found)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } } } } }, "/auth/users/{user_id}": { "post": { "tags": [ "Authenticate" ], "parameters": [{ "in": "path", "name": "user_id", "schema": { "type": "string" }, "required": true, "description": "Your user_id here" }], "summary": "Authenticate user", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "auth_id": { "type": "string" }, "auth_key": { "type": "string" }, "dev_auth_id": { "type": "string" }, "dev_auth_key": { "type": "string" } } } } } }, "responses": { "200": { "description": "Successful", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Bad Request (e.g missing required fields)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "401": { "description": "Unauthorized (e.g User, Provder or Platform not found)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "409": { "description": "Conflict (e.g Duplicate Users, Providers or Platforms found)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } } } } }, "/projects": { "post": { "tags": [ "Projects" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "auth_id": { "type": "string" }, "auth_key": { "type": "string" }, "project_name": { "type": "string" } } } } } }, "summary": "Create a new Project", "responses": { "200": { "description": "Successful", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } } } } }, "400": { "description": "Bad Request (e.g missing required fields)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "401": { "description": "Unauthorized (e.g User not found)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "409": { "description": "Conflict (e.g Duplicate Users found)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } } } } }, "/projects/{project_id}/name": { "put": { "tags": [ "Projects" ], "parameters": [{ "in": "path", "name": "project_id", "schema": { "type": "string" }, "required": true, "description": "Your project_id here" }], "summary": "Update project's name", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "auth_id": { "type": "string" }, "auth_key": { "type": "string" }, "project_name": { "type": "string" } } } } } }, "responses": { "200": { "description": "Successful", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } } } } }, "400": { "description": "Bad Request (e.g missing required fields)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "401": { "description": "Unauthorized (e.g User not found)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "409": { "description": "Conflict (e.g Duplicate Users found)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } } } } }, "/users/{user_id}/projects": { "post": { "tags": [ "Users" ], "parameters": [{ "in": "path", "name": "user_id", "schema": { "type": "string" }, "required": true, "description": "Your user_id here" }], "summary": "Assign user to project", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "auth_id": { "type": "string" }, "auth_key": { "type": "string" }, "project_id": { "type": "string" } } } } } }, "responses": { "200": { "description": "Successful", "content": { "application/json": { "schema": { "type": "object", "properties": { "userId": { "type": "string" }, "projectId": { "type": "string" }, "scope": { "type": "string" } } } } } }, "400": { "description": "Bad Request (e.g missing required fields)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "401": { "description": "Unauthorized (e.g User not found)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "409": { "description": "Conflict (e.g Duplicate Users found)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } } } } }, "/users/{user_id}/projects/{project_id}/scopes": { "put": { "tags": [ "Users" ], "parameters": [{ "in": "path", "name": "user_id", "schema": { "type": "string" }, "required": true, "description": "Your user_id here" }, { "in": "path", "name": "project_id", "schema": { "type": "string" }, "required": true, "description": "Your project_id here" }], "summary": "Update user's project scope", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "auth_id": { "type": "string" }, "auth_key": { "type": "string" }, "scope": { "type": "array", "items": { "type": "string" } } } } } } }, "responses": { "200": { "description": "Successful", "content": { "application/json": { "schema": { "type": "object", "properties": { "userId": { "type": "string" }, "projectId": { "type": "string" }, "scope": { "type": "string" } } } } } }, "400": { "description": "Bad Request (e.g missing required fields)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "401": { "description": "Unauthorized (e.g User not found)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "409": { "description": "Conflict (e.g Duplicate Users found)", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "statusCode": { "type": "string" }, "message": { "type": "string" } } } } } } } } } } }