1716 строки
53 KiB
JSON
1716 строки
53 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"version": "1.0.0",
|
|
"title": "Motimate",
|
|
"description": "Motimate is the result of more than 10 years of working with some of Scandinavias largest companies in improving their internal communication, increasing their sales and refining their employee training. We provide an award winning SAAS-solution making internal communication and corporate training fun and easy.\n\nRead more about Motimate on motimateapp.com.",
|
|
"contact": {
|
|
"name": "Motimate AS",
|
|
"url": "https://about.motimateapp.com",
|
|
"email": "support@motimateapp.com"
|
|
}
|
|
},
|
|
"host": "motimate.motimateapp.com",
|
|
"basePath": "/",
|
|
"schemes": [
|
|
"https"
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"paths": {
|
|
"/public_api/users": {
|
|
"get": {
|
|
"summary": "User - get all",
|
|
"description": "Get all users in organization",
|
|
"operationId": "User_GetAll",
|
|
"parameters": [
|
|
{
|
|
"name": "Auth",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"default": "Bearer <Access token>",
|
|
"description": "Authorization with access token (Format: \"Bearer \" + {access_token})",
|
|
"x-ms-summary": "Authorization"
|
|
},
|
|
{
|
|
"name": "subdomain",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Specify your organization's subdomain to motimateapp.com.",
|
|
"x-ms-summary": "Subdomain"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"description": "email"
|
|
},
|
|
"employee_number": {
|
|
"type": "string",
|
|
"description": "employee_number"
|
|
},
|
|
"first_name": {
|
|
"type": "string",
|
|
"description": "first_name"
|
|
},
|
|
"last_name": {
|
|
"type": "string",
|
|
"description": "last_name"
|
|
},
|
|
"phone_number": {
|
|
"type": "string",
|
|
"description": "phone_number"
|
|
},
|
|
"organization_role": {
|
|
"type": "string",
|
|
"description": "organization_role"
|
|
}
|
|
}
|
|
},
|
|
"description": "data"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"summary": "User - create",
|
|
"description": "Create new user",
|
|
"operationId": "User_Create",
|
|
"parameters": [
|
|
{
|
|
"name": "Auth",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"default": "Bearer <Access token>",
|
|
"description": "Authorization with access token (Format: \"Bearer \" + {access_token})",
|
|
"x-ms-summary": "Authorization"
|
|
},
|
|
{
|
|
"name": "subdomain",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Specify your organization's subdomain to motimateapp.com.",
|
|
"x-ms-summary": "Subdomain"
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"description": "email"
|
|
},
|
|
"employee_number": {
|
|
"type": "string",
|
|
"description": "employee_number"
|
|
},
|
|
"first_name": {
|
|
"type": "string",
|
|
"description": "first_name"
|
|
},
|
|
"last_name": {
|
|
"type": "string",
|
|
"description": "last_name"
|
|
},
|
|
"phone_number": {
|
|
"type": "string",
|
|
"description": "phone_number"
|
|
},
|
|
"organization_role": {
|
|
"type": "string",
|
|
"description": "organization_role",
|
|
"title": "",
|
|
"enum": [
|
|
"normal_user",
|
|
"organization_admin",
|
|
"pulse_editor",
|
|
"training_editor"
|
|
]
|
|
},
|
|
"group_relations": {
|
|
"type": "array",
|
|
"items": {},
|
|
"description": "group_relations"
|
|
},
|
|
"position_relations": {
|
|
"type": "array",
|
|
"items": {},
|
|
"description": "position_relations"
|
|
}
|
|
},
|
|
"default": {
|
|
"email": null,
|
|
"employee_number": null,
|
|
"first_name": null,
|
|
"last_name": null,
|
|
"phone_number": null,
|
|
"organization_role": "normal_user",
|
|
"group_relations": [],
|
|
"position_relations": []
|
|
}
|
|
},
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"description": "email"
|
|
},
|
|
"employee_number": {
|
|
"type": "string",
|
|
"description": "employee_number"
|
|
},
|
|
"first_name": {
|
|
"type": "string",
|
|
"description": "first_name"
|
|
},
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "id"
|
|
},
|
|
"last_name": {
|
|
"type": "string",
|
|
"description": "last_name"
|
|
},
|
|
"phone_number": {
|
|
"type": "string",
|
|
"description": "phone_number"
|
|
},
|
|
"organization_role": {
|
|
"type": "string",
|
|
"description": "organization_role"
|
|
},
|
|
"groups": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "groups.id",
|
|
"title": ""
|
|
},
|
|
"kind": {
|
|
"type": "string",
|
|
"description": "kind"
|
|
},
|
|
"level": {
|
|
"type": "string",
|
|
"description": "level"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "name"
|
|
}
|
|
}
|
|
},
|
|
"description": "groups"
|
|
},
|
|
"positions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "positions.id",
|
|
"title": ""
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "name"
|
|
}
|
|
}
|
|
},
|
|
"description": "positions"
|
|
}
|
|
},
|
|
"description": "data"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "id"
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"description": "message"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/public_api/users/{user_id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"description": "email"
|
|
},
|
|
"employee_number": {
|
|
"type": "string",
|
|
"description": "employee_number"
|
|
},
|
|
"first_name": {
|
|
"type": "string",
|
|
"description": "first_name"
|
|
},
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "id"
|
|
},
|
|
"last_name": {
|
|
"type": "string",
|
|
"description": "last_name"
|
|
},
|
|
"phone_number": {
|
|
"type": "string",
|
|
"description": "phone_number"
|
|
},
|
|
"organization_role": {
|
|
"type": "string",
|
|
"description": "organization_role"
|
|
},
|
|
"groups": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "groups.id",
|
|
"title": ""
|
|
},
|
|
"kind": {
|
|
"type": "string",
|
|
"description": "groups.kind",
|
|
"title": ""
|
|
},
|
|
"level": {
|
|
"type": "string",
|
|
"description": "groups.level",
|
|
"title": ""
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "groups.name"
|
|
}
|
|
}
|
|
},
|
|
"description": "groups"
|
|
},
|
|
"positions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "positions.id",
|
|
"title": ""
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "positions.name",
|
|
"title": ""
|
|
}
|
|
}
|
|
},
|
|
"description": "positions"
|
|
}
|
|
},
|
|
"description": "data"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "id"
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"description": "message"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"operationId": "User_GetById",
|
|
"summary": "User - Get by id",
|
|
"description": "Get user by user_id",
|
|
"parameters": [
|
|
{
|
|
"name": "user_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "User ID in Motimate",
|
|
"x-ms-summary": "User id",
|
|
"x-ms-url-encoding": "single"
|
|
},
|
|
{
|
|
"name": "Auth",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"default": "Bearer <Access token>",
|
|
"description": "Authorization with access token (Format: \"Bearer \" + {access_token})",
|
|
"x-ms-summary": "Authorization"
|
|
},
|
|
{
|
|
"name": "subdomain",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Specify your organization's subdomain to motimateapp.com.",
|
|
"x-ms-summary": "Subdomain"
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"204": {
|
|
"description": "default",
|
|
"schema": {}
|
|
},
|
|
"404": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "id"
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"description": "message"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"summary": "User - delete by id",
|
|
"operationId": "User_DeleteById",
|
|
"description": "Delete user by user_id",
|
|
"parameters": [
|
|
{
|
|
"name": "user_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "User ID in Motimate",
|
|
"x-ms-summary": "User id",
|
|
"x-ms-url-encoding": "single"
|
|
},
|
|
{
|
|
"name": "Auth",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"default": "Bearer <Access token>",
|
|
"description": "Authorization with access token (Format: \"Bearer \" + {access_token})",
|
|
"x-ms-summary": "Authorization"
|
|
},
|
|
{
|
|
"name": "subdomain",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Specify your organization's subdomain to motimateapp.com.",
|
|
"x-ms-summary": "Subdomain"
|
|
}
|
|
]
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"description": "email"
|
|
},
|
|
"employee_number": {
|
|
"type": "string",
|
|
"description": "employee_number"
|
|
},
|
|
"first_name": {
|
|
"type": "string",
|
|
"description": "first_name"
|
|
},
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "id"
|
|
},
|
|
"last_name": {
|
|
"type": "string",
|
|
"description": "last_name"
|
|
},
|
|
"phone_number": {
|
|
"type": "string",
|
|
"description": "phone_number"
|
|
},
|
|
"organization_role": {
|
|
"type": "string",
|
|
"description": "organization_role"
|
|
},
|
|
"groups": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "groups.id",
|
|
"title": ""
|
|
},
|
|
"kind": {
|
|
"type": "string",
|
|
"description": "groups.kind",
|
|
"title": ""
|
|
},
|
|
"level": {
|
|
"type": "string",
|
|
"description": "groups.level",
|
|
"title": ""
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "groups.name",
|
|
"title": ""
|
|
}
|
|
}
|
|
},
|
|
"description": "groups"
|
|
},
|
|
"positions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "positions.id",
|
|
"title": ""
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "positions.name",
|
|
"title": ""
|
|
}
|
|
}
|
|
},
|
|
"description": "positions"
|
|
}
|
|
},
|
|
"description": "data"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "id"
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"description": "message"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"summary": "User - update by id",
|
|
"description": "Update user by user_id",
|
|
"operationId": "User_UpdateById",
|
|
"parameters": [
|
|
{
|
|
"name": "user_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "User ID in Motimate",
|
|
"x-ms-summary": "User id",
|
|
"x-ms-url-encoding": "single"
|
|
},
|
|
{
|
|
"name": "Auth",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"default": "Bearer <Access token>",
|
|
"description": "Authorization with access token (Format: \"Bearer \" + {access_token})",
|
|
"x-ms-summary": "Authorization"
|
|
},
|
|
{
|
|
"name": "subdomain",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Specify your organization's subdomain to motimateapp.com.",
|
|
"x-ms-summary": "Subdomain"
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"description": "email"
|
|
},
|
|
"first_name": {
|
|
"type": "string",
|
|
"description": "first_name"
|
|
},
|
|
"last_name": {
|
|
"type": "string",
|
|
"description": "last_name"
|
|
},
|
|
"phone_number": {
|
|
"type": "string",
|
|
"description": "phone_number"
|
|
},
|
|
"organization_role": {
|
|
"type": "string",
|
|
"description": "organization_role"
|
|
},
|
|
"group_relations": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"_delete": {
|
|
"type": "boolean",
|
|
"description": "_delete"
|
|
},
|
|
"group_id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "group_id"
|
|
},
|
|
"role": {
|
|
"type": "string",
|
|
"description": "role"
|
|
}
|
|
}
|
|
},
|
|
"description": "group_relations"
|
|
},
|
|
"position_relations": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"_delete": {
|
|
"type": "boolean",
|
|
"description": "_delete"
|
|
},
|
|
"position_id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "position_id"
|
|
}
|
|
}
|
|
},
|
|
"description": "position_relations"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/public_api/positions": {
|
|
"get": {
|
|
"summary": "Position - get all",
|
|
"description": "Get all positions in organization",
|
|
"operationId": "Position_GetAll",
|
|
"parameters": [
|
|
{
|
|
"name": "Auth",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"default": "Bearer <Access token>",
|
|
"description": "Authorization with access token (Format: \"Bearer \" + {access_token})",
|
|
"x-ms-summary": "Authorization"
|
|
},
|
|
{
|
|
"name": "subdomain",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Specify your organization's subdomain to motimateapp.com.",
|
|
"x-ms-summary": "Subdomain"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "id"
|
|
},
|
|
"import_id": {
|
|
"type": "string",
|
|
"description": "import_id"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "name"
|
|
}
|
|
}
|
|
},
|
|
"description": "data"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"summary": "Position - create",
|
|
"description": "Create new position",
|
|
"operationId": "Position_Create",
|
|
"parameters": [
|
|
{
|
|
"name": "Auth",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"default": "Bearer <Access token>",
|
|
"description": "Authorization with access token (Format: \"Bearer \" + {access_token})",
|
|
"x-ms-summary": "Authorization"
|
|
},
|
|
{
|
|
"name": "subdomain",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Specify your organization's subdomain to motimateapp.com.",
|
|
"x-ms-summary": "Subdomain"
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"key": {
|
|
"type": "string",
|
|
"description": "key"
|
|
},
|
|
"value": {
|
|
"type": "string",
|
|
"description": "value"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": "description"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"enabled": {
|
|
"type": "boolean",
|
|
"description": "enabled"
|
|
}
|
|
},
|
|
"default": {
|
|
"key": "name",
|
|
"value": "\"Test\"",
|
|
"description": "",
|
|
"type": "text",
|
|
"enabled": true
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "id"
|
|
},
|
|
"import_id": {
|
|
"type": "string",
|
|
"description": "import_id"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "name"
|
|
}
|
|
},
|
|
"description": "data"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/public_api/positions/{position_id}": {
|
|
"get": {
|
|
"summary": "Position - get by id",
|
|
"description": "Get position by position_id",
|
|
"operationId": "Position_GetById",
|
|
"parameters": [
|
|
{
|
|
"name": "Auth",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"default": "Bearer <Access token>",
|
|
"description": "Authorization with access token (Format: \"Bearer \" + {access_token})",
|
|
"x-ms-summary": "Authorization"
|
|
},
|
|
{
|
|
"name": "subdomain",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Specify your organization's subdomain to motimateapp.com.",
|
|
"x-ms-summary": "Subdomain"
|
|
},
|
|
{
|
|
"name": "position_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Position ID in Motimate",
|
|
"x-ms-summary": "Position id",
|
|
"x-ms-url-encoding": "single"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "id"
|
|
},
|
|
"import_id": {
|
|
"type": "string",
|
|
"description": "import_id"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "name"
|
|
}
|
|
},
|
|
"description": "data"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "id"
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"description": "message"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"summary": "DELETE positions",
|
|
"description": "Delete position by position_id",
|
|
"operationId": "Position_DeleteById",
|
|
"parameters": [
|
|
{
|
|
"name": "Auth",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"default": "Bearer <Access token>",
|
|
"description": "Authorization with access token (Format: \"Bearer \" + {access_token})",
|
|
"x-ms-summary": "Authorization"
|
|
},
|
|
{
|
|
"name": "subdomain",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Specify your organization's subdomain to motimateapp.com.",
|
|
"x-ms-summary": "Subdomain"
|
|
},
|
|
{
|
|
"name": "position_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Position ID in Motimate",
|
|
"x-ms-summary": "Position id",
|
|
"x-ms-url-encoding": "single"
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "default",
|
|
"schema": {}
|
|
},
|
|
"404": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "id"
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"description": "message"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"summary": "Position - update by id",
|
|
"description": "Update position by position_id",
|
|
"operationId": "Position_UpdateById",
|
|
"parameters": [
|
|
{
|
|
"name": "position_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Position ID in Motimate",
|
|
"x-ms-summary": "Position id",
|
|
"x-ms-url-encoding": "single"
|
|
},
|
|
{
|
|
"name": "Auth",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"default": "Bearer <Access token>",
|
|
"description": "Authorization with access token (Format: \"Bearer \" + {access_token})",
|
|
"x-ms-summary": "Authorization"
|
|
},
|
|
{
|
|
"name": "subdomain",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Specify your organization's subdomain to motimateapp.com.",
|
|
"x-ms-summary": "Subdomain"
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"import_id": {
|
|
"type": "string",
|
|
"description": "import_id"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "name"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "id"
|
|
},
|
|
"import_id": {
|
|
"type": "string",
|
|
"description": "import_id"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "name"
|
|
}
|
|
},
|
|
"description": "data"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/public_api/groups": {
|
|
"get": {
|
|
"summary": "Group - get all",
|
|
"description": "Get all groups",
|
|
"operationId": "Group_GetAll",
|
|
"parameters": [
|
|
{
|
|
"name": "Auth",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"default": "Bearer <Access token>",
|
|
"description": "Authorization with access token (Format: \"Bearer \" + {access_token})",
|
|
"x-ms-summary": "Authorization"
|
|
},
|
|
{
|
|
"name": "subdomain",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Specify your organization's subdomain to motimateapp.com.",
|
|
"x-ms-summary": "Subdomain"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "id"
|
|
},
|
|
"kind": {
|
|
"type": "string",
|
|
"description": "kind"
|
|
},
|
|
"level": {
|
|
"type": "string",
|
|
"description": "level"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "name"
|
|
},
|
|
"parent_id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "parent_id"
|
|
}
|
|
}
|
|
},
|
|
"description": "data"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"summary": "Group - create",
|
|
"description": "Create new group",
|
|
"operationId": "Group_Create",
|
|
"parameters": [
|
|
{
|
|
"name": "Auth",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"default": "Bearer <Access token>",
|
|
"description": "Authorization with access token (Format: \"Bearer \" + {access_token})",
|
|
"x-ms-summary": "Authorization"
|
|
},
|
|
{
|
|
"name": "subdomain",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Specify your organization's subdomain to motimateapp.com.",
|
|
"x-ms-summary": "Subdomain"
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"key": {
|
|
"type": "string",
|
|
"description": "key"
|
|
},
|
|
"value": {
|
|
"type": "string",
|
|
"description": "value"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": "description"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"enabled": {
|
|
"type": "boolean",
|
|
"description": "enabled"
|
|
}
|
|
},
|
|
"default": {
|
|
"key": "name",
|
|
"value": "test",
|
|
"description": "",
|
|
"type": "text",
|
|
"enabled": true
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "id"
|
|
},
|
|
"kind": {
|
|
"type": "string",
|
|
"description": "kind"
|
|
},
|
|
"level": {
|
|
"type": "string",
|
|
"description": "level"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "name"
|
|
},
|
|
"parent_id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "parent_id"
|
|
}
|
|
},
|
|
"description": "data"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/public_api/groups/{group_id}": {
|
|
"get": {
|
|
"summary": "Group - get by id",
|
|
"description": "Get group by group_id",
|
|
"operationId": "Group_GetById",
|
|
"parameters": [
|
|
{
|
|
"name": "Auth",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"default": "Bearer <Access token>",
|
|
"description": "Authorization with access token (Format: \"Bearer \" + {access_token})",
|
|
"x-ms-summary": "Authorization"
|
|
},
|
|
{
|
|
"name": "subdomain",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Specify your organization's subdomain to motimateapp.com.",
|
|
"x-ms-summary": "Subdomain"
|
|
},
|
|
{
|
|
"name": "group_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Group ID in Motimate",
|
|
"x-ms-summary": "Group id",
|
|
"x-ms-url-encoding": "single"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "id"
|
|
},
|
|
"kind": {
|
|
"type": "string",
|
|
"description": "kind"
|
|
},
|
|
"level": {
|
|
"type": "string",
|
|
"description": "level"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "name"
|
|
}
|
|
},
|
|
"description": "data"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "id"
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"description": "message"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"summary": "Group - delete by id",
|
|
"description": "Delete group by group_id",
|
|
"operationId": "Group_DeleteById",
|
|
"parameters": [
|
|
{
|
|
"name": "Auth",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"default": "Bearer <Access token>",
|
|
"description": "Authorization with access token (Format: \"Bearer \" + {access_token})",
|
|
"x-ms-summary": "Authorization"
|
|
},
|
|
{
|
|
"name": "subdomain",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Specify your organization's subdomain to motimateapp.com.",
|
|
"x-ms-summary": "Subdomain"
|
|
},
|
|
{
|
|
"name": "group_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Group ID in Motimate",
|
|
"x-ms-summary": "Group id",
|
|
"x-ms-url-encoding": "single"
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "default",
|
|
"schema": {}
|
|
},
|
|
"404": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "id"
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"description": "message"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"summary": "Group - Update by id",
|
|
"description": "Update group by group_id",
|
|
"operationId": "Group_UpdateById",
|
|
"parameters": [
|
|
{
|
|
"name": "group_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Group ID in Motimate",
|
|
"x-ms-summary": "Group id",
|
|
"x-ms-url-encoding": "single"
|
|
},
|
|
{
|
|
"name": "Auth",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"default": "Bearer <Access token>",
|
|
"description": "Authorization with access token (Format: \"Bearer \" + {access_token})",
|
|
"x-ms-summary": "Authorization"
|
|
},
|
|
{
|
|
"name": "subdomain",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Specify your organization's subdomain to motimateapp.com.",
|
|
"x-ms-summary": "Subdomain"
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": {
|
|
"type": "string",
|
|
"description": "kind"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "name"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "id"
|
|
},
|
|
"kind": {
|
|
"type": "string",
|
|
"description": "kind"
|
|
},
|
|
"level": {
|
|
"type": "string",
|
|
"description": "level"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "name"
|
|
}
|
|
},
|
|
"description": "data"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "id"
|
|
},
|
|
"kind": {
|
|
"type": "string",
|
|
"description": "kind"
|
|
},
|
|
"level": {
|
|
"type": "string",
|
|
"description": "level"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "name"
|
|
},
|
|
"parent_id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "parent_id"
|
|
}
|
|
},
|
|
"description": "data"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/oauth/token": {
|
|
"post": {
|
|
"summary": "POST token",
|
|
"description": "Get oauth token",
|
|
"operationId": "Token_Get",
|
|
"parameters": [
|
|
{
|
|
"name": "subdomain",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Specify your organization's subdomain to motimateapp.com.",
|
|
"x-ms-summary": "Subdomain"
|
|
},
|
|
{
|
|
"name": "grant_type",
|
|
"default": "password",
|
|
"in": "query",
|
|
"type": "string",
|
|
"required": true,
|
|
"format": "password",
|
|
"x-ms-visibility": "internal",
|
|
"description": "Type of authentication",
|
|
"x-ms-summary": "Grant type"
|
|
},
|
|
{
|
|
"name": "username",
|
|
"in": "query",
|
|
"type": "string",
|
|
"required": true,
|
|
"description": "Admin user in Motimate",
|
|
"x-ms-summary": "Username"
|
|
},
|
|
{
|
|
"name": "password",
|
|
"in": "query",
|
|
"type": "string",
|
|
"required": true,
|
|
"format": "password",
|
|
"description": "Admin password in Motimate",
|
|
"x-ms-summary": "Password"
|
|
},
|
|
{
|
|
"name": "client_id",
|
|
"in": "query",
|
|
"type": "string",
|
|
"required": true,
|
|
"description": "Application client ID (provided by Motimate)",
|
|
"x-ms-summary": "Client id",
|
|
"format": "password"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"access_token": {
|
|
"type": "string",
|
|
"description": "access_token"
|
|
},
|
|
"created_at": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "created_at"
|
|
},
|
|
"expires_in": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "expires_in"
|
|
},
|
|
"refresh_token": {
|
|
"type": "string",
|
|
"description": "refresh_token"
|
|
},
|
|
"token_type": {
|
|
"type": "string",
|
|
"description": "token_type"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/public_api/me": {
|
|
"get": {
|
|
"summary": "GET me",
|
|
"description": "Me",
|
|
"operationId": "_me",
|
|
"parameters": [
|
|
{
|
|
"name": "Auth",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"default": "Bearer <Access token>",
|
|
"description": "Authorization with access token (Format: \"Bearer \" + {access_token})",
|
|
"x-ms-summary": "Authorization"
|
|
},
|
|
{
|
|
"name": "subdomain",
|
|
"in": "header",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Specify your organization's subdomain to motimateapp.com.",
|
|
"x-ms-summary": "Subdomain"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "id"
|
|
},
|
|
"email": {
|
|
"type": "string",
|
|
"description": "email"
|
|
},
|
|
"employee_number": {
|
|
"type": "string",
|
|
"description": "employee_number"
|
|
},
|
|
"first_name": {
|
|
"type": "string",
|
|
"description": "first_name"
|
|
},
|
|
"last_name": {
|
|
"type": "string",
|
|
"description": "last_name"
|
|
},
|
|
"organization_role": {
|
|
"type": "string",
|
|
"description": "organization_role"
|
|
},
|
|
"phone_number": {
|
|
"type": "string",
|
|
"description": "phone_number"
|
|
}
|
|
},
|
|
"description": "data"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-ms-connector-metadata": [
|
|
{
|
|
"propertyName": "Website",
|
|
"propertyValue": "https://motimateapp.com"
|
|
},
|
|
{
|
|
"propertyName": "Privacy policy",
|
|
"propertyValue": "https://about.motimateapp.com/general-security-information"
|
|
},
|
|
{
|
|
"propertyName": "Categories",
|
|
"propertyValue": "Communication;Human Resources"
|
|
}
|
|
],
|
|
"definitions": {},
|
|
"parameters": {},
|
|
"responses": {},
|
|
"securityDefinitions": {},
|
|
"security": [
|
|
{
|
|
"API Key": []
|
|
}
|
|
],
|
|
"tags": []
|
|
} |