2732 lines
71 KiB
JSON
2732 lines
71 KiB
JSON
{
|
|
"info": {
|
|
"title": "Barong",
|
|
"description": "RESTful AdminAPI for barong OAuth server",
|
|
"version": "2.7.0"
|
|
},
|
|
"swagger": "2.0",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"securityDefinitions": {
|
|
"BearerToken": {
|
|
"description": "Bearer Token authentication",
|
|
"type": "basic",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
}
|
|
},
|
|
"host": "www.alvand.local",
|
|
"basePath": "/api/v2/barong/admin",
|
|
"tags": [
|
|
{
|
|
"name": "api",
|
|
"description": "Operations about apis"
|
|
}
|
|
],
|
|
"paths": {
|
|
"/api/v2/barong/admin/users/data_storage": {
|
|
"delete": {
|
|
"description": "Deletes user's data storage record",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "uid",
|
|
"description": "user uniq id",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "title",
|
|
"description": "data storage uniq title",
|
|
"type": "string",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "Deletes user's data storage record",
|
|
"schema": {
|
|
"$ref": "#/definitions/API_V2_Admin_Entities_UserWithKYC"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "deleteApiV2BarongAdminUsersDataStorage"
|
|
}
|
|
},
|
|
"/api/v2/barong/admin/users/{uid}": {
|
|
"get": {
|
|
"description": "Returns user info",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "uid",
|
|
"description": "user uniq id",
|
|
"type": "string",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Returns user info",
|
|
"schema": {
|
|
"$ref": "#/definitions/API_V2_Admin_Entities_UserWithKYC"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "getApiV2BarongAdminUsersUid"
|
|
}
|
|
},
|
|
"/api/v2/barong/admin/users/documents": {
|
|
"put": {
|
|
"description": "change documents by admin",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "formData",
|
|
"name": "user_uid",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "doc_type",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "doc_state",
|
|
"type": "string",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "change documents by admin",
|
|
"schema": {
|
|
"$ref": "#/definitions/API_V2_Admin_Entities_Profile"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Required params are empty"
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
},
|
|
"404": {
|
|
"description": "doesnt exist"
|
|
},
|
|
"422": {
|
|
"description": "Validation errors"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "putApiV2BarongAdminUsersDocuments"
|
|
},
|
|
"get": {
|
|
"description": "Returns user documents",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "user_uid",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "doc_type",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "doc_category",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "doc_state",
|
|
"type": "string",
|
|
"required": false
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Returns user documents",
|
|
"schema": {
|
|
"$ref": "#/definitions/API_V2_Entities_Document"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Required params are empty"
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
},
|
|
"404": {
|
|
"description": "doesnt exist"
|
|
},
|
|
"422": {
|
|
"description": "Validation errors"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "getApiV2BarongAdminUsersDocuments"
|
|
}
|
|
},
|
|
"/api/v2/barong/admin/users/documents/pending": {
|
|
"get": {
|
|
"description": "Returns array of users with pending or replaced documents as paginated collection",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "extended",
|
|
"description": "When true endpoint returns full information about users",
|
|
"type": "boolean",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "uid",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "email",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "role",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "first_name",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "last_name",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "country",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "level",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "state",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "range",
|
|
"type": "string",
|
|
"default": "created",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "from",
|
|
"description": "An integer represents the seconds elapsed since Unix epoch.If set, only records FROM the time will be retrieved.",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "to",
|
|
"description": "An integer represents the seconds elapsed since Unix epoch.If set, only records BEFORE the time will be retrieved.",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "page",
|
|
"description": "Page number (defaults to 1).",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"default": 1,
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "limit",
|
|
"description": "Number of users per page (defaults to 100, maximum is 100).",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"default": 100,
|
|
"minimum": 1,
|
|
"maximum": 100,
|
|
"required": false
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Returns array of users with pending or replaced documents as paginated collection",
|
|
"schema": {
|
|
"$ref": "#/definitions/API_V2_Entities_User"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "getApiV2BarongAdminUsersDocumentsPending"
|
|
}
|
|
},
|
|
"/api/v2/barong/admin/users": {
|
|
"put": {
|
|
"description": "Update user attributes",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "formData",
|
|
"name": "uid",
|
|
"description": "user uniq id",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "email",
|
|
"description": "User Email",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "state",
|
|
"description": "user state",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "otp",
|
|
"description": "user 2fa status",
|
|
"type": "boolean",
|
|
"required": false
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "User attributes were created"
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "putApiV2BarongAdminUsers"
|
|
},
|
|
"get": {
|
|
"description": "Returns array of users as paginated collection",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "extended",
|
|
"description": "When true endpoint returns full information about users",
|
|
"type": "boolean",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "uid",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "email",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "role",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "country",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "level",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "state",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "range",
|
|
"type": "string",
|
|
"default": "created",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "ordering",
|
|
"description": "If set, returned values will be sorted in specific order, defaults to 'asc'.",
|
|
"type": "string",
|
|
"default": "asc",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "order_by",
|
|
"description": "Name of the field, which result will be ordered by.",
|
|
"type": "string",
|
|
"default": "id",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "from",
|
|
"description": "An integer represents the seconds elapsed since Unix epoch.If set, only records FROM the time will be retrieved.",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "to",
|
|
"description": "An integer represents the seconds elapsed since Unix epoch.If set, only records BEFORE the time will be retrieved.",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "page",
|
|
"description": "Page number (defaults to 1).",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"default": 1,
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "limit",
|
|
"description": "Number of users per page (defaults to 100, maximum is 100).",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"default": 100,
|
|
"minimum": 1,
|
|
"maximum": 100,
|
|
"required": false
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Returns array of users as paginated collection",
|
|
"schema": {
|
|
"$ref": "#/definitions/API_V2_Entities_User"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "getApiV2BarongAdminUsers"
|
|
}
|
|
},
|
|
"/api/v2/barong/admin/users/role": {
|
|
"post": {
|
|
"description": "Update user role",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "formData",
|
|
"name": "uid",
|
|
"description": "user uniq id",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "role",
|
|
"description": "user role",
|
|
"type": "string",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "User role was created"
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "postApiV2BarongAdminUsersRole"
|
|
}
|
|
},
|
|
"/api/v2/barong/admin/users/update": {
|
|
"post": {
|
|
"description": "Update user attributes",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "formData",
|
|
"name": "uid",
|
|
"description": "user uniq id",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "state",
|
|
"description": "user state",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "otp",
|
|
"description": "user 2fa status",
|
|
"type": "boolean",
|
|
"required": false
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "User attributes were updated"
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "postApiV2BarongAdminUsersUpdate"
|
|
}
|
|
},
|
|
"/api/v2/barong/admin/users/labels": {
|
|
"delete": {
|
|
"description": "Deletes label for user",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "uid",
|
|
"description": "user uniq id",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "key",
|
|
"description": "label key. [a-z0-9_-]+ should be used. Min - 3, max - 255 characters.",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "scope",
|
|
"description": "label key. [a-z0-9_-]+ should be used. Min - 3, max - 255 characters.",
|
|
"type": "string",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "Label was deleted"
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "deleteApiV2BarongAdminUsersLabels"
|
|
},
|
|
"put": {
|
|
"description": "Update user label scope",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "formData",
|
|
"name": "uid",
|
|
"description": "user uniq id",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "key",
|
|
"description": "Label key.",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "scope",
|
|
"description": "label key. [a-z0-9_-]+ should be used. Min - 3, max - 255 characters.",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "description",
|
|
"description": "label description. [A-Za-z0-9_-] should be used. max - 255 characters.",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "value",
|
|
"description": "Label value.",
|
|
"type": "string",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Label was updated"
|
|
},
|
|
"400": {
|
|
"description": "Required params are empty"
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
},
|
|
"404": {
|
|
"description": "Record is not found"
|
|
},
|
|
"422": {
|
|
"description": "Validation errors"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "putApiV2BarongAdminUsersLabels"
|
|
},
|
|
"post": {
|
|
"description": "Add label for user",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "formData",
|
|
"name": "uid",
|
|
"description": "user uniq id",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "key",
|
|
"description": "label key. [a-z0-9_-]+ should be used. Min - 3, max - 255 characters.",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "value",
|
|
"description": "label value. [A-Za-z0-9_-] should be used. Min - 3, max - 255 characters.",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "description",
|
|
"description": "label description. [A-Za-z0-9_-] should be used. max - 255 characters.",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "scope",
|
|
"description": "Label scope: 'public' or 'private'. Default is public",
|
|
"type": "string",
|
|
"required": false
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Label was created"
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "postApiV2BarongAdminUsersLabels"
|
|
},
|
|
"get": {
|
|
"description": "Returns array of users as paginated collection",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "key",
|
|
"description": "Label key",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "value",
|
|
"description": "Label value",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "page",
|
|
"description": "Page number (defaults to 1).",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"default": 1,
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "limit",
|
|
"description": "Number of users per page (defaults to 100, maximum is 100).",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"default": 100,
|
|
"minimum": 1,
|
|
"maximum": 100,
|
|
"required": false
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Returns array of users as paginated collection",
|
|
"schema": {
|
|
"$ref": "#/definitions/API_V2_Entities_User"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "getApiV2BarongAdminUsersLabels"
|
|
}
|
|
},
|
|
"/api/v2/barong/admin/users/labels/update": {
|
|
"post": {
|
|
"description": "Update user label value",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "formData",
|
|
"name": "uid",
|
|
"description": "user uniq id",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "key",
|
|
"description": "Label key.",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "scope",
|
|
"description": "label key. [a-z0-9_-]+ should be used. Min - 3, max - 255 characters.",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "value",
|
|
"description": "Label value.",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "description",
|
|
"description": "label description. [A-Za-z0-9_-] should be used. max - 255 characters.",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "replace",
|
|
"description": "When true label will be created if not exist",
|
|
"type": "boolean",
|
|
"default": true,
|
|
"required": false
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Label was updated"
|
|
},
|
|
"400": {
|
|
"description": "Required params are empty"
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
},
|
|
"404": {
|
|
"description": "Record is not found"
|
|
},
|
|
"422": {
|
|
"description": "Validation errors"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "postApiV2BarongAdminUsersLabelsUpdate"
|
|
}
|
|
},
|
|
"/api/v2/barong/admin/users/labels/list": {
|
|
"get": {
|
|
"description": "Returns existing labels keys and values",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Returns existing labels keys and values"
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "getApiV2BarongAdminUsersLabelsList"
|
|
}
|
|
},
|
|
"/api/v2/barong/admin/users/comments": {
|
|
"delete": {
|
|
"description": "Delete user's comment",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "id",
|
|
"description": "comment uniq id",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "Delete user's comment",
|
|
"schema": {
|
|
"$ref": "#/definitions/API_V2_Admin_Entities_UserWithKYC"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "deleteApiV2BarongAdminUsersComments"
|
|
},
|
|
"put": {
|
|
"description": "Edit user's comment",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "formData",
|
|
"name": "id",
|
|
"description": "comment uniq id",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "title",
|
|
"description": "comment title",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "data",
|
|
"description": "comment data",
|
|
"type": "string",
|
|
"required": false
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Edit user's comment",
|
|
"schema": {
|
|
"$ref": "#/definitions/API_V2_Admin_Entities_UserWithKYC"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "putApiV2BarongAdminUsersComments"
|
|
},
|
|
"post": {
|
|
"description": "Adds new user's comment",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "formData",
|
|
"name": "uid",
|
|
"description": "user uniq id",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "title",
|
|
"description": "comment uniq title",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "data",
|
|
"description": "comment data",
|
|
"type": "string",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Adds new user's comment",
|
|
"schema": {
|
|
"$ref": "#/definitions/API_V2_Admin_Entities_UserWithKYC"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "postApiV2BarongAdminUsersComments"
|
|
}
|
|
},
|
|
"/api/v2/barong/admin/api_keys": {
|
|
"get": {
|
|
"description": "List all api keys for selected account.",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "uid",
|
|
"description": "user uniq id",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "ordering",
|
|
"description": "If set, returned values will be sorted in specific order, defaults to 'asc'.",
|
|
"type": "string",
|
|
"default": "asc",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "order_by",
|
|
"description": "Name of the field, which result will be ordered by.",
|
|
"type": "string",
|
|
"default": "id",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "page",
|
|
"description": "Page number (defaults to 1).",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"default": 1,
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "limit",
|
|
"description": "Number of users per page (defaults to 100, maximum is 100).",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"default": 100,
|
|
"minimum": 1,
|
|
"maximum": 100,
|
|
"required": false
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List all api keys for selected account.",
|
|
"schema": {
|
|
"$ref": "#/definitions/API_V2_Entities_APIKey"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "getApiV2BarongAdminApiKeys"
|
|
}
|
|
},
|
|
"/api/v2/barong/admin/permissions": {
|
|
"put": {
|
|
"description": "Update Permission",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "formData",
|
|
"name": "id",
|
|
"description": "Permission id",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "role",
|
|
"description": "permission field - role",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "verb",
|
|
"description": "permission field - request verb",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "path",
|
|
"description": "permission field - request path",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "action",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "topic",
|
|
"type": "string",
|
|
"required": false
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Permission was updated"
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "putApiV2BarongAdminPermissions"
|
|
},
|
|
"delete": {
|
|
"description": "Deletes permission",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "id",
|
|
"description": "permission id",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "Permission was deleted"
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "deleteApiV2BarongAdminPermissions"
|
|
},
|
|
"post": {
|
|
"description": "Create permission",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "formData",
|
|
"name": "role",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "verb",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "path",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "action",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "topic",
|
|
"type": "string",
|
|
"required": false
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Permission was created"
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "postApiV2BarongAdminPermissions"
|
|
},
|
|
"get": {
|
|
"description": "Returns array of permissions as paginated collection",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "page",
|
|
"description": "Page number (defaults to 1).",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"default": 1,
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "limit",
|
|
"description": "Number of users per page (defaults to 100, maximum is 100).",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"default": 100,
|
|
"minimum": 1,
|
|
"maximum": 100,
|
|
"required": false
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Returns array of permissions as paginated collection",
|
|
"schema": {
|
|
"$ref": "#/definitions/API_V2_Entities_Permission"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "getApiV2BarongAdminPermissions"
|
|
}
|
|
},
|
|
"/api/v2/barong/admin/activities/admin": {
|
|
"get": {
|
|
"description": "Returns array of activities as paginated collection",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "topic",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "action",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "uid",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "email",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "from",
|
|
"description": "An integer represents the seconds elapsed since Unix epoch.If set, only records FROM the time will be retrieved.",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "to",
|
|
"description": "An integer represents the seconds elapsed since Unix epoch.If set, only records BEFORE the time will be retrieved.",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "page",
|
|
"description": "Page number (defaults to 1).",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"default": 1,
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "limit",
|
|
"description": "Number of users per page (defaults to 100, maximum is 100).",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"default": 100,
|
|
"minimum": 1,
|
|
"maximum": 100,
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "target_uid",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "range",
|
|
"type": "string",
|
|
"default": "created",
|
|
"required": false
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Returns array of activities as paginated collection",
|
|
"schema": {
|
|
"$ref": "#/definitions/API_V2_Admin_Entities_AdminActivity"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "getApiV2BarongAdminActivitiesAdmin"
|
|
}
|
|
},
|
|
"/api/v2/barong/admin/activities": {
|
|
"get": {
|
|
"description": "Returns array of activities as paginated collection",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "topic",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "action",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "uid",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "email",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "from",
|
|
"description": "An integer represents the seconds elapsed since Unix epoch.If set, only records FROM the time will be retrieved.",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "to",
|
|
"description": "An integer represents the seconds elapsed since Unix epoch.If set, only records BEFORE the time will be retrieved.",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "page",
|
|
"description": "Page number (defaults to 1).",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"default": 1,
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "limit",
|
|
"description": "Number of users per page (defaults to 100, maximum is 100).",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"default": 100,
|
|
"minimum": 1,
|
|
"maximum": 100,
|
|
"required": false
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Returns array of activities as paginated collection",
|
|
"schema": {
|
|
"$ref": "#/definitions/API_V2_Admin_Entities_ActivityWithUser"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "getApiV2BarongAdminActivities"
|
|
}
|
|
},
|
|
"/api/v2/barong/admin/metrics": {
|
|
"get": {
|
|
"description": "Returns main statistic in the given time period",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "created_from",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "created_to",
|
|
"type": "string",
|
|
"required": false
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Returns main statistic in the given time period"
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "getApiV2BarongAdminMetrics"
|
|
}
|
|
},
|
|
"/api/v2/barong/admin/restrictions": {
|
|
"delete": {
|
|
"description": "Delete restriction",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "id",
|
|
"description": "Restriction id",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "Restriction was deleted"
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "deleteApiV2BarongAdminRestrictions"
|
|
},
|
|
"put": {
|
|
"description": "Update restriction",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "formData",
|
|
"name": "id",
|
|
"description": "Restriction id",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "scope",
|
|
"type": "string",
|
|
"enum": [
|
|
"continent",
|
|
"country",
|
|
"ip",
|
|
"ip_subnet",
|
|
"all"
|
|
],
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "category",
|
|
"type": "string",
|
|
"enum": [
|
|
"whitelist",
|
|
"maintenance",
|
|
"blacklist",
|
|
"blocklogin"
|
|
],
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "value",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "state",
|
|
"type": "string",
|
|
"enum": [
|
|
"enabled",
|
|
"disabled"
|
|
],
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "code",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"required": false
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Restriction was updated"
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "putApiV2BarongAdminRestrictions"
|
|
},
|
|
"post": {
|
|
"description": "Create restriction",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "formData",
|
|
"name": "scope",
|
|
"type": "string",
|
|
"enum": [
|
|
"continent",
|
|
"country",
|
|
"ip",
|
|
"ip_subnet",
|
|
"all"
|
|
],
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "value",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "category",
|
|
"type": "string",
|
|
"enum": [
|
|
"whitelist",
|
|
"maintenance",
|
|
"blacklist",
|
|
"blocklogin"
|
|
],
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "state",
|
|
"type": "string",
|
|
"default": "enabled",
|
|
"enum": [
|
|
"enabled",
|
|
"disabled"
|
|
],
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "code",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"required": false
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Restriction was created"
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "postApiV2BarongAdminRestrictions"
|
|
},
|
|
"get": {
|
|
"description": "Returns array of restrictions as a paginated collection",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "scope",
|
|
"type": "string",
|
|
"enum": [
|
|
"continent",
|
|
"country",
|
|
"ip",
|
|
"ip_subnet",
|
|
"all"
|
|
],
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "category",
|
|
"type": "string",
|
|
"enum": [
|
|
"whitelist",
|
|
"maintenance",
|
|
"blacklist",
|
|
"blocklogin"
|
|
],
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "range",
|
|
"type": "string",
|
|
"default": "created",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "page",
|
|
"description": "Page number (defaults to 1).",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"default": 1,
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "limit",
|
|
"description": "Number of users per page (defaults to 100, maximum is 100).",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"default": 100,
|
|
"minimum": 1,
|
|
"maximum": 100,
|
|
"required": false
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Returns array of restrictions as a paginated collection",
|
|
"schema": {
|
|
"$ref": "#/definitions/API_V2_Entities_Restriction"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "getApiV2BarongAdminRestrictions"
|
|
}
|
|
},
|
|
"/api/v2/barong/admin/restrictions/whitelink": {
|
|
"post": {
|
|
"description": "Create whitelink",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "formData",
|
|
"name": "expire_time",
|
|
"description": "link will be active for (Time.now + expire_time in following range)",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"default": 1,
|
|
"minimum": 1,
|
|
"maximum": 30,
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "range",
|
|
"description": "In combination with expire_time gives full controll over token expiration",
|
|
"type": "string",
|
|
"default": "day",
|
|
"required": false
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Created whitelink"
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "postApiV2BarongAdminRestrictionsWhitelink"
|
|
}
|
|
},
|
|
"/api/v2/barong/admin/profiles/label": {
|
|
"put": {
|
|
"description": "verifying labels by admin",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "formData",
|
|
"name": "user_uid",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "label_key",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "label_value",
|
|
"type": "string",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "verifying labels by admin",
|
|
"schema": {
|
|
"$ref": "#/definitions/API_V2_Admin_Entities_Profile"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Required params are empty"
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
},
|
|
"404": {
|
|
"description": "doesnt exist"
|
|
},
|
|
"422": {
|
|
"description": "Validation errors"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "putApiV2BarongAdminProfilesLabel"
|
|
}
|
|
},
|
|
"/api/v2/barong/admin/profiles": {
|
|
"post": {
|
|
"description": "Create a profile for user",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "formData",
|
|
"name": "uid",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "first_name",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "last_name",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "dob",
|
|
"type": "string",
|
|
"format": "date",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "address",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "postcode",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "city",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "country",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "metadata",
|
|
"description": "Any additional key: value pairs in json string format",
|
|
"type": "string",
|
|
"required": false
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Create a profile for user",
|
|
"schema": {
|
|
"$ref": "#/definitions/API_V2_Admin_Entities_Profile"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Required params are empty"
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
},
|
|
"422": {
|
|
"description": "Validation errors"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "postApiV2BarongAdminProfiles"
|
|
},
|
|
"put": {
|
|
"description": "Verify user's profile",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "formData",
|
|
"name": "uid",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "state",
|
|
"type": "string",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Verify user's profile",
|
|
"schema": {
|
|
"$ref": "#/definitions/API_V2_Admin_Entities_Profile"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Required params are empty"
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
},
|
|
"422": {
|
|
"description": "Validation errors"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "putApiV2BarongAdminProfiles"
|
|
},
|
|
"get": {
|
|
"description": "Return all profiles",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "page",
|
|
"description": "Page number (defaults to 1).",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"default": 1,
|
|
"required": false
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "limit",
|
|
"description": "Number of users per page (defaults to 100, maximum is 100).",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"default": 100,
|
|
"minimum": 1,
|
|
"maximum": 100,
|
|
"required": false
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Return all profiles",
|
|
"schema": {
|
|
"$ref": "#/definitions/API_V2_Admin_Entities_Profile"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "getApiV2BarongAdminProfiles"
|
|
}
|
|
},
|
|
"/api/v2/barong/admin/profiles/treasury/list": {
|
|
"get": {
|
|
"description": "Return list of treasuries",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "user_uid",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "kind",
|
|
"type": "string",
|
|
"required": false
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Return list of treasuries",
|
|
"schema": {
|
|
"$ref": "#/definitions/API_V2_Entities_Treasury"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
},
|
|
"404": {
|
|
"description": "User has no treasuries"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "getApiV2BarongAdminProfilesTreasuryList"
|
|
}
|
|
},
|
|
"/api/v2/barong/admin/levels": {
|
|
"put": {
|
|
"description": "Change vip level",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "formData",
|
|
"name": "uid",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "formData",
|
|
"name": "level",
|
|
"description": "change level from vip",
|
|
"type": "string",
|
|
"default": "3",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Change vip level",
|
|
"schema": {
|
|
"$ref": "#/definitions/API_V2_Entities_User"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Required params are empty"
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
},
|
|
"422": {
|
|
"description": "Validation errors"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "putApiV2BarongAdminLevels"
|
|
},
|
|
"get": {
|
|
"description": "Returns array of permissions as paginated collection",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Returns array of permissions as paginated collection",
|
|
"schema": {
|
|
"$ref": "#/definitions/API_V2_Entities_Level"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Invalid bearer token"
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "getApiV2BarongAdminLevels"
|
|
}
|
|
},
|
|
"/api/v2/barong/admin/abilities": {
|
|
"get": {
|
|
"description": "Get all roles and admin_permissions of barong cancan.",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Get all roles and admin_permissions of barong cancan."
|
|
}
|
|
},
|
|
"tags": [
|
|
"api"
|
|
],
|
|
"operationId": "getApiV2BarongAdminAbilities"
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"API_V2_Admin_Entities_UserWithKYC": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"description": "User Email"
|
|
},
|
|
"uid": {
|
|
"type": "string",
|
|
"description": "User UID"
|
|
},
|
|
"role": {
|
|
"type": "string",
|
|
"description": "User role"
|
|
},
|
|
"level": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "User level"
|
|
},
|
|
"otp": {
|
|
"type": "boolean",
|
|
"description": "is 2FA enabled for account"
|
|
},
|
|
"state": {
|
|
"type": "string",
|
|
"description": "User state: active, pending, inactive"
|
|
},
|
|
"referral_uid": {
|
|
"type": "string",
|
|
"description": "UID of referrer"
|
|
},
|
|
"data": {
|
|
"type": "string",
|
|
"description": "Additional phone and profile info"
|
|
},
|
|
"profiles": {
|
|
"$ref": "#/definitions/API_V2_Admin_Entities_Profile"
|
|
},
|
|
"labels": {
|
|
"$ref": "#/definitions/API_V2_Entities_AdminLabelView"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"documents": {
|
|
"$ref": "#/definitions/API_V2_Admin_Entities_Document"
|
|
}
|
|
},
|
|
"description": "Adds new user's comment"
|
|
},
|
|
"API_V2_Admin_Entities_Profile": {
|
|
"type": "object",
|
|
"properties": {
|
|
"first_name": {
|
|
"type": "string",
|
|
"description": "first name"
|
|
},
|
|
"last_name": {
|
|
"type": "string",
|
|
"description": "Last name"
|
|
},
|
|
"national_code": {
|
|
"type": "string",
|
|
"description": "National Code"
|
|
},
|
|
"dob": {
|
|
"type": "string",
|
|
"format": "date",
|
|
"description": "Birth date"
|
|
},
|
|
"address": {
|
|
"type": "string",
|
|
"description": "Address"
|
|
},
|
|
"postcode": {
|
|
"type": "string",
|
|
"description": "Address Postcode"
|
|
},
|
|
"city": {
|
|
"type": "string",
|
|
"description": "City name"
|
|
},
|
|
"country": {
|
|
"type": "string",
|
|
"description": "Country name"
|
|
},
|
|
"state": {
|
|
"type": "string",
|
|
"description": "Profile state: drafted, submitted, verified, rejected"
|
|
},
|
|
"metadata": {
|
|
"type": "object",
|
|
"description": "Profile additional fields"
|
|
},
|
|
"upload": {
|
|
"type": "string",
|
|
"description": "Address Postcode"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"description": "Return all profiles"
|
|
},
|
|
"API_V2_Entities_AdminLabelView": {
|
|
"type": "object",
|
|
"properties": {
|
|
"key": {
|
|
"type": "string",
|
|
"description": "Label key. [a-z0-9_-]+ should be used. Min - 3, max - 255 characters."
|
|
},
|
|
"value": {
|
|
"type": "string",
|
|
"description": "Label value. [A-Za-z0-9_-] should be used. Min - 3, max - 255 characters."
|
|
},
|
|
"scope": {
|
|
"type": "string",
|
|
"description": "Label scope: 'public' or 'private'"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": "Label desc: json string with any additional information"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"API_V2_Admin_Entities_Document": {
|
|
"type": "object",
|
|
"properties": {
|
|
"upload": {
|
|
"type": "string",
|
|
"description": "File Upload"
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"description": "File url"
|
|
},
|
|
"doc_type": {
|
|
"type": "string",
|
|
"description": "Document type: passport, driver license, utility bill, identity card, institutional, address, residental"
|
|
},
|
|
"doc_number": {
|
|
"type": "string",
|
|
"description": "document number: AB123123 type"
|
|
},
|
|
"doc_expire": {
|
|
"type": "string",
|
|
"description": "Expire date of uploaded documents"
|
|
},
|
|
"metadata": {
|
|
"type": "string",
|
|
"description": "Any additional stored data"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"API_V2_Entities_Document": {
|
|
"type": "object",
|
|
"properties": {
|
|
"upload": {
|
|
"type": "string",
|
|
"description": "File Upload"
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"description": "File url"
|
|
},
|
|
"doc_type": {
|
|
"type": "string",
|
|
"description": "Document type: passport, driver license, utility bill, identity card, institutional, address, residental"
|
|
},
|
|
"doc_number": {
|
|
"type": "string",
|
|
"description": "Submasked document number: AB123123 type"
|
|
},
|
|
"doc_expire": {
|
|
"type": "string",
|
|
"description": "Expire date of uploaded documents"
|
|
},
|
|
"metadata": {
|
|
"type": "string",
|
|
"description": "Any additional stored data"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"description": "Returns user documents"
|
|
},
|
|
"API_V2_Entities_User": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"description": "User Email"
|
|
},
|
|
"uid": {
|
|
"type": "string",
|
|
"description": "User UID"
|
|
},
|
|
"role": {
|
|
"type": "string",
|
|
"description": "User role"
|
|
},
|
|
"level": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "User level"
|
|
},
|
|
"otp": {
|
|
"type": "boolean",
|
|
"description": "is 2FA enabled for account"
|
|
},
|
|
"state": {
|
|
"type": "string",
|
|
"description": "User state: active, pending, inactive"
|
|
},
|
|
"referral_uid": {
|
|
"type": "string",
|
|
"description": "UID of referrer"
|
|
},
|
|
"data": {
|
|
"type": "string",
|
|
"description": "Additional phone and profile info"
|
|
}
|
|
},
|
|
"description": "Change vip level"
|
|
},
|
|
"API_V2_Entities_APIKey": {
|
|
"type": "object",
|
|
"properties": {
|
|
"kid": {
|
|
"type": "string",
|
|
"description": "JWT public key"
|
|
},
|
|
"algorithm": {
|
|
"type": "string",
|
|
"description": "Cryptographic hash function type"
|
|
},
|
|
"scope": {
|
|
"type": "string",
|
|
"description": "Serialized array of scopes"
|
|
},
|
|
"state": {
|
|
"type": "string",
|
|
"description": "active/non-active state of key"
|
|
},
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "Api key secret"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"description": "List all api keys for selected account."
|
|
},
|
|
"API_V2_Entities_Permission": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "Permission id"
|
|
},
|
|
"action": {
|
|
"type": "string",
|
|
"description": "Permission action: accept (allow access (drop access), audit (record activity)"
|
|
},
|
|
"role": {
|
|
"type": "string",
|
|
"description": "Permission user role"
|
|
},
|
|
"verb": {
|
|
"type": "string",
|
|
"description": "Permission verb: put, post, delete, get"
|
|
},
|
|
"path": {
|
|
"type": "string",
|
|
"description": "API path"
|
|
},
|
|
"topic": {
|
|
"type": "string",
|
|
"description": "Permission topic: general, session etc"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"description": "Returns array of permissions as paginated collection"
|
|
},
|
|
"API_V2_Admin_Entities_AdminActivity": {
|
|
"type": "object",
|
|
"properties": {
|
|
"user_ip": {
|
|
"type": "string",
|
|
"description": "User IP"
|
|
},
|
|
"user_agent": {
|
|
"type": "string",
|
|
"description": "User Browser Agent"
|
|
},
|
|
"topic": {
|
|
"type": "string",
|
|
"description": "Defined topic (session, adjustments) or general by default"
|
|
},
|
|
"action": {
|
|
"type": "string",
|
|
"description": "API action: POST => 'create', PUT => 'update', GET => 'read', DELETE => 'delete', PATCH => 'update' or system if there is no match of HTTP method"
|
|
},
|
|
"result": {
|
|
"type": "string",
|
|
"description": "Status of API response: succeed, failed, denied"
|
|
},
|
|
"data": {
|
|
"type": "string",
|
|
"description": "Parameters which was sent to specific API endpoint"
|
|
},
|
|
"admin": {
|
|
"$ref": "#/definitions/API_V2_Entities_User"
|
|
},
|
|
"target": {
|
|
"$ref": "#/definitions/API_V2_Entities_User"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"description": "Returns array of activities as paginated collection"
|
|
},
|
|
"API_V2_Admin_Entities_ActivityWithUser": {
|
|
"type": "object",
|
|
"properties": {
|
|
"user_ip": {
|
|
"type": "string",
|
|
"description": "User IP"
|
|
},
|
|
"user_agent": {
|
|
"type": "string",
|
|
"description": "User Browser Agent"
|
|
},
|
|
"topic": {
|
|
"type": "string",
|
|
"description": "Defined topic (session, adjustments) or general by default"
|
|
},
|
|
"action": {
|
|
"type": "string",
|
|
"description": "API action: POST => 'create', PUT => 'update', GET => 'read', DELETE => 'delete', PATCH => 'update' or system if there is no match of HTTP method"
|
|
},
|
|
"result": {
|
|
"type": "string",
|
|
"description": "Status of API response: succeed, failed, denied"
|
|
},
|
|
"data": {
|
|
"type": "string",
|
|
"description": "Parameters which was sent to specific API endpoint"
|
|
},
|
|
"user": {
|
|
"$ref": "#/definitions/API_V2_Entities_User"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"description": "Returns array of activities as paginated collection"
|
|
},
|
|
"API_V2_Entities_Restriction": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "Restriction id"
|
|
},
|
|
"category": {
|
|
"type": "string",
|
|
"description": "Restriction categories: blacklist, maintenance, whitelist, blocklogin"
|
|
},
|
|
"scope": {
|
|
"type": "string",
|
|
"description": "Restriction scopes: continent, country, ip, ip_subnet, all"
|
|
},
|
|
"value": {
|
|
"type": "string",
|
|
"description": "Restriction value: IP address, country abbreviation, all"
|
|
},
|
|
"code": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "Restriction codes: {\"continent\"=>423, \"country\"=>423, \"ip_subnet\"=>403, \"ip\"=>401, \"all\"=>401}"
|
|
},
|
|
"state": {
|
|
"type": "string",
|
|
"description": "Restriction states: disabled, enabled"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"description": "Returns array of restrictions as a paginated collection"
|
|
},
|
|
"API_V2_Entities_Treasury": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "id of record"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"state": {
|
|
"type": "string",
|
|
"description": "state"
|
|
},
|
|
"kind": {
|
|
"type": "string",
|
|
"description": "kind"
|
|
},
|
|
"data": {
|
|
"type": "string",
|
|
"description": "Submasked data"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"description": "Return list of treasuries"
|
|
},
|
|
"API_V2_Entities_Level": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "Level identifier, level number"
|
|
},
|
|
"key": {
|
|
"type": "string",
|
|
"description": "Label key. [A-Za-z0-9_-] should be used. Min - 3, max - 255 characters."
|
|
},
|
|
"value": {
|
|
"type": "string",
|
|
"description": "Label value. [A-Za-z0-9_-] should be used. Min - 3, max - 255 characters."
|
|
}
|
|
},
|
|
"description": "Returns array of permissions as paginated collection"
|
|
},
|
|
"API_V2_Admin_Entities_Phone": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": {
|
|
"type": "string",
|
|
"description": "Phone country"
|
|
},
|
|
"number": {
|
|
"type": "string",
|
|
"description": "Phone number"
|
|
},
|
|
"validated_at": {
|
|
"type": "s",
|
|
"format": "g",
|
|
"description": "Phone validation date"
|
|
}
|
|
}
|
|
},
|
|
"API_V2_Admin_Entities_UserWithProfile": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"description": "User Email"
|
|
},
|
|
"uid": {
|
|
"type": "string",
|
|
"description": "User UID"
|
|
},
|
|
"role": {
|
|
"type": "string",
|
|
"description": "User role"
|
|
},
|
|
"level": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "User level"
|
|
},
|
|
"otp": {
|
|
"type": "boolean",
|
|
"description": "is 2FA enabled for account"
|
|
},
|
|
"state": {
|
|
"type": "string",
|
|
"description": "User state: active, pending, inactive"
|
|
},
|
|
"referral_uid": {
|
|
"type": "string",
|
|
"description": "UID of referrer"
|
|
},
|
|
"data": {
|
|
"type": "string",
|
|
"description": "Additional phone and profile info"
|
|
},
|
|
"profiles": {
|
|
"$ref": "#/definitions/API_V2_Admin_Entities_Profile"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|