### Pass API Key via GET Parameter This example demonstrates how to pass the API key as a 'key' GET parameter in a URL. This method is suitable for simple requests but is less secure than using HTTP headers. ```plaintext https://{project_host}.platrum.ru?key=123456 ``` -------------------------------- ### GET /store/api/item/list Retrieves a list of items from the store. The API request example shows a POST method, but the documentation indicates GET. ```APIDOC ## GET /store/api/item/list ### Description Method can be used to get a list of items. ### Method GET ### Endpoint /store/api/item/list ### Parameters #### Query Parameters No query parameters are available for this endpoint. ### Request Example ```json { "example": "curl 'https://{HOST}.platrum.ru/store/api/item/list' \ --request POST \ --header 'Content-type: application/json' \ --header 'Api-key: {KEY}'" } ``` ### Response #### Success Response (200) - **data** (array[object]) - List of items. - **id** (int) - Item ID. - **name** (string) - Item name. - **inventory_number** (string) - Inventory number. - **category_id** (int) - Item category ID. - **average_buying_price** (int) - Average buying price. - **residual_price** (int) - Residual price. - **operation_life** (int) - Item operation life. - **residual_operation_life** (int) - Residual operation life. - **quantity** (int) - Quantity. - **arrival_date** (int) - Arrival date. - **usage_history** (array[object]) - History of responsible persons. - **previous_user_id** (string) - Previous user ID. - **id** (int) - History entry ID. - **user_id** (string) - User ID. - **assigner_id** (string) - Assigner ID. - **assign_date** (string) - Assign date. - **user_id** (string) - Responsible person for the item. - **status** (string) - Item problem status. - **item_status_history** (array[object]) - History of item status changes. - **id** (int) - History entry ID. - **author_id** (string) - Author ID. - **previous_status** (string) - Previous status. - **current_status** (string) - Current status. - **change_date** (string) - Change date. #### Response Example ```json { "status": "success", "data": [ { "id": 123, "name": "some_string", "inventory_number": "some_string", "category_id": 123, "average_buying_price": 123, "residual_price": 123, "operation_life": 123, "residual_operation_life": 123, "quantity": 123, "arrival_date": 123, "usage_history": [ { "previous_user_id": "some_string", "id": 123, "user_id": "some_string", "assigner_id": "some_string", "assign_date": "2019-01-01 21:00:15" } ], "user_id": "some_string", "status": "some_string", "item_status_history": [ { "id": 123, "author_id": "some_string", "previous_status": "some_string", "current_status": "some_string", "change_date": "2019-01-01 21:00:15" } ] } ] } ``` ``` -------------------------------- ### Get Settings List API Call (curl) This example shows how to retrieve a list of settings using the Platrum API. It involves sending a POST request to the `/finplan/api/settings/list` endpoint without any specific parameters in the request body. The response returns the current settings configuration. ```curl curl 'https://{HOST}.platrum.ru/finplan/api/settings/list' \ --request POST \ --header 'Content-type: application/json' \ --header 'Api-key: {KEY}' ``` -------------------------------- ### GET /finance/api/currency/list Source: https://context7.com/context7/api_platrum_ru/llms.txt Retrieves all available project currencies with formatting settings. ```APIDOC ## GET /finance/api/currency/list ### Description Retrieves all available project currencies with formatting settings. ### Method GET ### Endpoint /finance/api/currency/list ### Parameters None ### Request Example None ### Response #### Success Response (200) - **status** (string) - The status of the operation (e.g., "success"). - **data** (array of objects) - An array of currency objects. - **id** (integer) - The currency ID. - **name** (string) - The name of the currency. - **code** (string) - The currency code (e.g., "RUB"). - **sign** (string) - The currency symbol (e.g., "₽"). - **decimal** (string) - The decimal separator. - **thousand_separator** (string) - The thousand separator. - **is_prefix_sign** (boolean) - Indicates if the currency sign is a prefix. #### Response Example ```json { "status": "success", "data": [ { "id": 1, "name": "Российский рубль", "code": "RUB", "sign": "₽", "decimal": ",", "thousand_separator": " ", "is_prefix_sign": false }, { "id": 2, "name": "Доллар США", "code": "USD", "sign": "$", "decimal": ".", "thousand_separator": ",", "is_prefix_sign": true } ] } ``` ``` -------------------------------- ### GET /finance/api/currency/list Retrieves a list of all available currencies in the project. ```APIDOC ## GET /finance/api/currency/list ### Description This method allows you to get a list of all currencies available in the project. ### Method GET ### Endpoint /finance/api/currency/list ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```json { "example": "curl 'https://{HOST}.platrum.ru/finance/api/currency/list' \ --request POST \ --header 'Content-type: application/json' \ --header 'Api-key: {KEY}'" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. - **data** (array) - An array of currency objects. - **id** (int) - The unique identifier for the currency. - **name** (string) - The name of the currency. - **code** (string) - The currency code (e.g., USD, EUR). - **sign** (string) - The currency symbol. - **decimal** (string) - The decimal separator. - **thousand_separator** (string) - The thousand separator. - **is_prefix_sign** (bool) - Boolean indicating if the currency symbol is a prefix. #### Response Example ```json { "status": "success", "data": [ { "id": 123, "name": "some_string", "code": "some_string", "sign": "some_string", "decimal": "some_string", "thousand_separator": "some_string", "is_prefix_sign": true } ] } ``` ``` -------------------------------- ### GET /wiki/api/course/list Retrieves a list of courses. This endpoint is used to fetch all available courses within the system. ```APIDOC ## GET /wiki/api/course/list ### Description Method allows to get a list of courses. ### Method GET ### Endpoint /wiki/api/course/list ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```bash curl 'https://{HOST}.platrum.ru/wiki/api/course/list' \ --request POST \ --header 'Content-type: application/json' \ --header 'Api-key: {KEY}' ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. - **data** (array[object]) - An array of course objects. - **id** (int) - ID of the course. - **title** (string) - Title of the course. - **description** (string) - Description of the course. - **cover_file_id** (string) - ID of the cover file. - **steps** (array[object]) - Steps of the course. - **id** (string) - **type** (string) - **article_id** (int) - **order** (int) - **is_deleted** (bool) - Indicates if the course is deleted. - **access_blocks** (array[object]) - Positions to which the course is assigned. - **id** (int) - **type** (string) - **block_id** (int) - **nested** (bool) - **parents** (bool) - **blocks_assign_date** (map) - Date of course assignment for each position. - **creation_date** (date) - Creation date. - **modification_date** (date) - Modification date. - **instructors** (array[string]) - Instructor IDs. - **author_id** (string) - Author ID. - **is_periodic** (bool) - Indicates if it is an automatic knowledge control course. - **categories** (array[object]) - Course categories. - **id** (int) - **category_key** (string) - **course_order** (int) - **access_rules** (array[object]) - Access rules for the course. - **id** (int) - **action** (string) - **user_id** (string) - **block_id** (int) - **allow_nested** (bool) - **allow_everyone** (bool) - **allow_managers** (bool) - **inherit_from_parents** (bool) #### Response Example ```json { "status": "success", "data": [ { "id": 123, "title": "some_string", "description": "some_string", "cover_file_id": "some_string", "steps": [ { "id": "some_string", "type": "some_string", "article_id": 123, "order": 123 } ], "is_deleted": true, "access_blocks": [ { "id": 123, "type": "some_string", "block_id": 123, "nested": true, "parents": true } ], "blocks_assign_date": "map", "creation_date": "2019-01-01 21:00:15", "modification_date": "2019-01-01 21:00:15", "instructors": [ "some_string", "some_string" ], "author_id": "some_string", "is_periodic": true, "categories": [ { "id": 123, "category_key": "some_string", "course_order": 123 } ], "access_rules": [ { "id": 123, "action": "some_string", "user_id": "some_string", "block_id": 123, "allow_nested": true, "allow_everyone": true, "allow_managers": true, "inherit_from_parents": true } ] } ] } ``` ``` -------------------------------- ### GET /tasks/api/task/list Retrieves a list of tasks based on specified filters. Date filters expect an array with start and end dates. Note: The provided example uses a POST request with curl, but the endpoint is documented as GET. This snippet reflects the documented GET method. ```APIDOC ## GET /tasks/api/task/list ### Description Allows retrieval of a task list based on specified filters. Date values are passed in the filter as an array of two values: the start and end of the desired period. ### Method GET ### Endpoint /tasks/api/task/list ### Parameters #### Query Parameters - **search** (string) - Optional - Search string for tasks. - **planned_end_date** (array of strings) - Optional - Filter by planned end date range (e.g., ["YYYY-MM-DD HH:MM:SS", "YYYY-MM-DD HH:MM:SS"]) - **id** (array of integers) - Optional - Filter by task IDs. - **name** (array of strings) - Optional - Filter by task names. - **description** (array of strings) - Optional - Filter by task descriptions. - **owner_user_id** (array of strings) - Optional - Filter by owner user IDs. - **responsible_user_ids** (array of strings) - Optional - Filter by responsible user IDs. - **auditors** (array of strings) - Optional - Filter by auditor user IDs. - **watchers** (array of strings) - Optional - Filter by watcher user IDs. - **block_id** (array of integers) - Optional - Filter by block IDs. - **category_key** (array of strings) - Optional - Filter by category keys. - **product** (array of strings) - Optional - Filter by product names. - **time_plan** (array of integers) - Optional - Filter by planned time. - **time_fact** (array of integers) - Optional - Filter by actual time spent. - **status_key** (array of strings) - Optional - Filter by status keys. - **is_planned** (boolean) - Optional - Filter by planned status. - **board_panel_id** (array of integers) - Optional - Filter by board panel IDs. - **order** (map[string]int) - Optional - Sorting order. - **start_date** (array of strings) - Optional - Filter by start date range (e.g., ["YYYY-MM-DD HH:MM:SS", "YYYY-MM-DD HH:MM:SS"]) - **finish_date** (array of strings) - Optional - Filter by finish date range (e.g., ["YYYY-MM-DD HH:MM:SS", "YYYY-MM-DD HH:MM:SS"]) - **creation_date** (array of strings) - Optional - Filter by creation date range (e.g., ["YYYY-MM-DD HH:MM:SS", "YYYY-MM-DD HH:MM:SS"]) - **integration_data** (string) - Optional - Filter by integration data. - **parent_id** (array of integers) - Optional - Filter by parent task IDs. - **path** (string) - Optional - Filter by materialized path. - **file_ids** (array of strings) - Optional - Filter by file IDs. - **is_important** (boolean) - Optional - Filter by importance. - **favorite_user_ids** (array of strings) - Optional - Filter by favorite user IDs. - **tag_keys** (array of strings) - Optional - Filter by tag keys. - **recurrence_data** (string) - Optional - Filter by recurrence data. - **relations** (array of objects) - Optional - Filter by relations. Each object may contain `id`, `type`, `target_task_id`, `creation_date`, `author_id`. - **close_date** (array of strings) - Optional - Filter by close date range (e.g., ["YYYY-MM-DD HH:MM:SS", "YYYY-MM-DD HH:MM:SS"]) ### Request Example *(Note: The provided example uses curl with POST, but the endpoint is documented as GET. A GET request example would typically not have a request body. Query parameters would be appended to the URL.)* ### Response #### Success Response (200) - **status** (string) - Indicates the status of the response (e.g., "success"). - **data** (array of objects) - An array of task objects, each containing detailed information about a task. #### Response Example ```json { "status": "success", "data": [ { "can_edit": true, "can_change_status": true, "can_change_deadline": true, "is_finished": true, "is_favorite": true, "is_subordinate": true, "is_recurrent": true, "is_daily": true, "checklist_data": [ { "done_count": 123, "total_count": 123 } ], "comment_count": 123, "parent_data": [ { "id": 123, "name": "some_string", "status_key": "some_string" } ], "last_plan_end_date": "2019-01-01 21:00:15", "id": 123, "name": "some_string", "description": "some_string", "owner_user_id": "some_string", "responsible_user_ids": [ "some_string", "some_string" ], "auditors": [ "some_string", "some_string" ], "watchers": [ "some_string", "some_string" ], "block_id": 123, "category_key": "some_string", "product": "some_string", "time_plan": 123, "time_fact": 123, "status_key": "some_string", "is_planned": true, "board_panel_id": 123, "order": {}, "start_date": "2019-01-01 21:00:15", "finish_date": "2019-01-01 21:00:15", "creation_date": "2019-01-01 21:00:15", "integration_data": "map", "parent_id": 123, "path": "materialized_path", "file_ids": [ "some_string", "some_string" ], "is_important": true, "favorite_user_ids": [ "some_string", "some_string" ], "tag_keys": [ "some_string", "some_string" ], "recurrence_data": "map", "relations": [ { "id": 123, "type": "some_string", "target_task_id": 123, "creation_date": "2019-01-01 21:00:15", "author_id": "some_string" } ], "close_date": "2019-01-01 21:00:15" } ] } ``` ``` -------------------------------- ### POST /wiki/api/course/save - Create Course This method allows you to create a new course. You can specify details such as title, description, cover image, steps, categories, and access rules. ```APIDOC ## POST /wiki/api/course/save ### Description Method allows creating a course. ### Method POST ### Endpoint /wiki/api/course/save ### Parameters #### Request Body - **id** (int) - Required - ID of the course. - **title** (string) - Required - Title of the course. - **description** (string) - Optional - Description of the course. - **cover_file_id** (string) - Optional - ID of the cover file. - **steps** (array[object]) - Optional - Steps of the course. Each step should have `id` (string), `type` (string), `article_id` (int), and `order` (int). - **categories** (array[object]) - Optional - Categories of the course. Each category should have `id` (int), `category_key` (string), and `course_order` (int). - **access_rules** (array[object]) - Optional - Access rules for the course. Each rule should have `id` (int), `action` (string), `user_id` (string), `block_id` (int), `allow_nested` (bool), `allow_everyone` (bool), `allow_managers` (bool), and `inherit_from_parents` (bool). ### Request Example ```json { "id": 123, "title": "some_string", "description": "some_string", "cover_file_id": "some_string", "steps": [ { "id": "some_string", "type": "some_string", "article_id": 123, "order": 123 } ], "categories": [ { "id": 123, "category_key": "some_string", "course_order": 123 } ], "access_rules": [ { "id": 123, "action": "some_string", "user_id": "some_string", "block_id": 123, "allow_nested": true, "allow_everyone": true, "allow_managers": true, "inherit_from_parents": true } ] } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the status of the operation ('success' or 'error'). - **data** (object) - Contains the details of the created course. - **id** (int) - ID of the course. - **title** (string) - Title of the course. - **description** (string) - Description of the course. - **cover_file_id** (string) - ID of the cover file. - **steps** (array[object]) - Steps of the course. - **is_deleted** (bool) - Whether the course is deleted. - **access_blocks** (array[object]) - Positions to which the course is assigned. - **blocks_assign_date** (map) - Date of course assignment to each position. - **creation_date** (date) - Creation date. - **modification_date** (date) - Modification date. - **instructors** (array[string]) - IDs of instructors. - **author_id** (string) - ID of the author. - **is_periodic** (bool) - Whether it is an automatic course of knowledge control. - **categories** (array[object]) - Categories of the course. - **access_rules** (array[object]) - Access rules for the course. #### Response Example ```json { "status": "success", "data": { "id": 123, "title": "some_string", "description": "some_string", "cover_file_id": "some_string", "steps": [ { "id": "some_string", "type": "some_string", "article_id": 123, "order": 123 } ], "is_deleted": true, "access_blocks": [ { "id": 123, "type": "some_string", "block_id": 123, "nested": true, "parents": true } ], "blocks_assign_date": "map", "creation_date": "2019-01-01 21:00:15", "modification_date": "2019-01-01 21:00:15", "instructors": [ "some_string", "some_string" ], "author_id": "some_string", "is_periodic": true, "categories": [ { "id": 123, "category_key": "some_string", "course_order": 123 } ], "access_rules": [ { "id": 123, "action": "some_string", "user_id": "some_string", "block_id": 123, "allow_nested": true, "allow_everyone": true, "allow_managers": true, "inherit_from_parents": true } ] } } ``` ``` -------------------------------- ### Create Course API Request (cURL) This snippet demonstrates how to create a course using the Platrum API via cURL. It specifies the POST request to the /wiki/api/course/save endpoint, including required headers like Content-type and Api-key, and a JSON payload containing course details such as title, description, steps, and access rules. The response indicates success or failure. ```bash curl 'https://{HOST}.platrum.ru/wiki/api/course/save' \ --request POST \ --header 'Content-type: application/json' \ --header 'Api-key: {KEY}' \ --data '{"id":123,"title":"some_string","description":"some_string","cover_file_id":"some_string","steps":[{"id":"some_string","type":"some_string","article_id":123,"order":123}],"categories":[{"id":123,"category_key":"some_string","course_order":123}],"access_rules":[{"id":123,"action":"some_string","user_id":"some_string","block_id":123,"allow_nested":true,"allow_everyone":true,"allow_managers":true,"inherit_from_parents":true}]}' ``` -------------------------------- ### GET /password/api/password/list Retrieves a list of passwords. Although the endpoint suggests a GET request, the provided example uses a POST method. ```APIDOC ## GET /password/api/password/list ### Description Method can be used to retrieve a list of passwords. ### Method POST ### Endpoint /password/api/password/list ### Parameters #### Query Parameters No query parameters are defined. #### Request Body No request body is defined. ### Request Example ```json { "example": "curl 'https://{HOST}.platrum.ru/password/api/password/list' \ --request POST \ --header 'Content-type: application/json' \ --header 'Api-key: {KEY}'" } ``` ### Response #### Success Response (200) - **current_user_access** (user_access) - Доступ текущего пользователя - **admin_user_ids** (array[string]) - Id пользователей с правами администратора - **matched_auth_data_password_ids** (array[int]) - Id паролей с идентичными данными - **id** (int) - ID - **name** (string) - Название - **url** (string) - Ссылка на страницу - **login** (string) - Логин - **password** (string) - Пароль - **description** (string) - Описание - **author_id** (string) - Id автора - **last_editor_id** (string) - Id последнего редактора - **category_id** (int) - Id категории - **access** (map[password.access]) - Доступы - **password_update_date** (date) - Дата обновления пароля - **creation_date** (date) - Дата создания - **modification_date** (date) - Дата обновления - **is_archived** (bool) - Статус архивации - **is_offline** (bool) - Является ли паролем оффлайн системы #### Response Example ```json { "status": "success", "data": [ { "current_user_access": [ { "can_edit": true, "can_edit_access": true, "can_add_edit_access": true, "available_user_ids": [ "some_string", "some_string" ] } ], "admin_user_ids": [ "some_string", "some_string" ], "matched_auth_data_password_ids": [ 123, 123 ], "id": 123, "name": "some_string", "url": "some_string", "login": "some_string", "password": "some_string", "description": "some_string", "author_id": "some_string", "last_editor_id": "some_string", "category_id": 123, "access": "map[password.access]", "password_update_date": "2019-01-01 21:00:15", "creation_date": "2019-01-01 21:00:15", "modification_date": "2019-01-01 21:00:15", "is_archived": true, "is_offline": true } ] } ``` ``` -------------------------------- ### Create Knowledge Base Article (Bash) Source: https://context7.com/context7/api_platrum_ru/llms.txt Creates a new article in the knowledge base. You can specify the content blocks (text, code, etc.) and access permissions. The API returns the details of the newly created article, including its ID. Requires an API key for authentication. ```bash curl 'https://mycompany.platrum.ru/wiki/api/article/save' \ --request POST \ --header 'Content-type: application/json' \ --header 'Api-key: YOUR_KEY' \ --data '{ "space_ids": [10], "title": "API Integration Guide", "slug": "api-integration-guide", "content_blocks": [ { "type": "text", "content": "
Руководство по интеграции API...
", "sequence_index": 1 }, { "type": "code", "content": "curl https://api.example.com/endpoint", "sequence_index": 2 } ], "access": [{"type": "block", "block_id": 5}] }' ``` -------------------------------- ### Authenticate API Requests with API Key Source: https://context7.com/context7/api_platrum_ru/llms.txt Demonstrates how to authenticate API requests using an API key, either via an HTTP header or a GET parameter. It also shows the structure of successful and error responses. ```bash curl 'https://mycompany.platrum.ru/user/api/profile/list' \ --request POST \ --header 'Content-type: application/json' \ --header 'Api-key: a1b2c3d4e5f6g7h8i9j0' curl 'https://mycompany.pltarum.ru/user/api/profile/list?key=a1b2c3d4e5f6g7h8i9j0' \ --request POST \ --header 'Content-type: application/json' # Successful response { "status": "success", "data": [...] } # Error response { "status": "error", "error": "permission_denied", "error_message": "Invalid API key" } ``` -------------------------------- ### GET /user/api/profile/list Retrieves a list of user profiles. This endpoint is intended for GET requests but the example shows a POST request. ```APIDOC ## GET /user/api/profile/list ### Description Method allows to get a list of profiles. ### Method GET ### Endpoint /user/api/profile/list ### Parameters #### Query Parameters - **HOST** (string) - Required - The host of the API. - **KEY** (string) - Required - Your API key for authentication. ### Request Example ```json { "HOST": "your_host", "KEY": "your_api_key" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation ('success' or 'error'). - **data** (array) - An array of user profile objects. - **id** (int) - User's unique identifier. - **avatar** (string) - URL or identifier for the user's avatar. - **birth_date** (date) - The user's date of birth. - **comment** (string) - A comment associated with the user profile. - **deletion_date** (date) - The date the profile was marked for deletion. - **firing_date** (date) - The date the user was fired. - **hired_by** (string) - Identifier of the employee who hired this user. - **hiring_date** (date) - The date the user was hired. - **is_deleted** (bool) - Flag indicating if the profile is deleted. - **is_disabled** (bool) - Flag indicating if the profile is disabled. - **name** (string) - The user's name. - **phone** (string) - The user's phone number. - **responsible_hr** (string) - Identifier of the HR responsible for this user. - **skype** (string) - The user's Skype username. - **slack** (string) - The user's Slack username. - **telegram** (string) - The user's Telegram username. - **user_email** (string) - The user's email address. - **user_id** (string) - The user's ID. - **user_name** (string) - The user's username. #### Response Example ```json { "status": "success", "data": [ { "id": 123, "avatar": "some_string", "birth_date": "2019-01-01 21:00:15", "comment": "some_string", "deletion_date": "2019-01-01 21:00:15", "firing_date": "2019-01-01 21:00:15", "hired_by": "some_string", "hiring_date": "2019-01-01 21:00:15", "is_deleted": true, "is_disabled": true, "name": "some_string", "phone": "some_string", "responsible_hr": "some_string", "skype": "some_string", "slack": "some_string", "telegram": "some_string", "user_email": "some_string", "user_id": "some_string", "user_name": "some_string" } ] } ``` ``` -------------------------------- ### Create Financial Planning Request Source: https://context7.com/context7/api_platrum_ru/llms.txt Creates a new financial planning request with problem and solution descriptions. ```APIDOC ## POST /finplan/api/request/save ### Description Creates a new financial planning request with problem and solution descriptions. ### Method POST ### Endpoint /finplan/api/request/save ### Parameters #### Request Body - **finplan** (string) - Required - The financial plan period (YYYY-MM). - **name** (string) - Required - The name of the request. - **sum** (number) - Required - The requested amount. - **type** (integer) - Required - The type of request. - **author_block_id** (integer) - Required - The ID of the author's block. - **problem** (string) - Required - Description of the problem. - **solution** (string) - Required - Description of the solution. - **economic_justification** (string) - Optional - Economic justification for the request. ### Request Example ```json { "finplan": "2025-11", "name": "Закупка лицензий на ПО", "sum": 120000, "type": 12, "author_block_id": 5, "problem": "Истекают лицензии на IDE для команды разработки", "solution": "Продление годовых лицензий на IntelliJ IDEA Ultimate", "economic_justification": "Повышение продуктивности разработчиков на 15%" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the status of the operation (e.g., "success"). - **data** (object) - Contains the created request details. - **id** (integer) - The ID of the created request. - **finplan** (string) - The financial plan period. - **name** (string) - The name of the request. - **sum** (number) - The requested amount. - **status** (string) - The current status of the request (e.g., "progress"). - **author_id** (string) - The ID of the author. - **can_edit** (boolean) - Whether the request can be edited. - **creation_date** (string) - The date and time of creation. #### Response Example ```json { "status": "success", "data": { "id": 302, "finplan": "2025-11", "name": "Закупка лицензий на ПО", "sum": 120000, "status": "progress", "author_id": "usr_001", "can_edit": true, "creation_date": "2025-10-14 16:30:00" } } ``` ``` -------------------------------- ### Get Task List API Request (cURL) Demonstrates how to make a POST request to the /tasks/api/task/list endpoint to retrieve tasks. It includes example headers and a JSON payload for filtering tasks by various criteria. ```curl curl 'https://{HOST}.platrum.ru/tasks/api/task/list' \ --request POST \ --header 'Content-type: application/json' \ --header 'Api-key: {KEY}' \ --data '{\"search\":\"some_string\",\"planned_end_date\":[\"2019-01-01 21:00:15\",\"2019-01-01 21:00:15\"],\"id\":[123,123],\"name\":[\"some_string\",\"some_string\"],\"description\":[\"some_string\",\"some_string\"],\"owner_user_id\":[\"some_string\",\"some_string\"],\"responsible_user_ids\":[\"some_string\",\"some_string\"],\"auditors\":[\"some_string\",\"some_string\"],\"watchers\":[\"some_string\",\"some_string\"],\"block_id\":[123,123],\"category_key\":[\"some_string\",\"some_string\"],\"product\":[\"some_string\",\"some_string\"],\"time_plan\":[123,123],\"time_fact\":[123,123],\"status_key\":[\"some_string\",\"some_string\"],\"is_planned\":true,\"board_panel_id\":[123,123],\"order\":\"map[string]int\",\"start_date\":[\"2019-01-01 21:00:15\",\"2019-01-01 21:00:15\"],\"finish_date\":[\"2019-01-01 21:00:15\",\"2019-01-01 21:00:15\"],\"creation_date\":[\"2019-01-01 21:00:15\",\"2019-01-01 21:00:15\"],\"integration_data\":\"map\",\"parent_id\":[123,123],\"path\":\"materialized_path\",\"file_ids\":[\"some_string\",\"some_string\"],\"is_important\":true,\"favorite_user_ids\":[\"some_string\",\"some_string\"],\"tag_keys\":[\"some_string\",\"some_string\"],\"recurrence_data\":\"map\",\"relations\":[{\"id\":123,\"type\":\"some_string\",\"target_task_id\":123,\"creation_date\":\"2019-01-01 21:00:15\",\"author_id\":\"some_string\"}],\"close_date\":[\"2019-01-01 21:00:15\",\"2019-01-01 21:00:15\"]}' ``` -------------------------------- ### Create Course API Response (JSON) This snippet shows a successful response from the Platrum API after creating a course. It returns a JSON object with a 'status' field indicating 'success' and a 'data' field containing the details of the created course, including its ID, title, description, steps, categories, and access rules. This structure helps in verifying the creation process and retrieving course information. ```json { "status": "success", "data": { "id": 123, "title": "some_string", "description": "some_string", "cover_file_id": "some_string", "steps": [ { "id": "some_string", "type": "some_string", "article_id": 123, "order": 123 } ], "is_deleted": true, "access_blocks": [ { "id": 123, "type": "some_string", "block_id": 123, "nested": true, "parents": true } ], "blocks_assign_date": "map", "creation_date": "2019-01-01 21:00:15", "modification_date": "2019-01-01 21:00:15", "instructors": [ "some_string", "some_string" ], "author_id": "some_string", "is_periodic": true, "categories": [ { "id": 123, "category_key": "some_string", "course_order": 123 } ], "access_rules": [ { "id": 123, "action": "some_string", "user_id": "some_string", "block_id": 123, "allow_nested": true, "allow_everyone": true, "allow_managers": true, "inherit_from_parents": true } ] } } ``` -------------------------------- ### Создание и обновление вопроса статьи (cURL) Пример использования cURL для отправки POST-запроса для создания или обновления вопроса статьи. Запрос включает идентификатор статьи, заголовок, тип вопроса, баллы и варианты ответов. Указываются необходимые заголовки, такие как Content-type и Api-key. ```bash curl 'https://{HOST}.platrum.ru/wiki/api/article/save-question' \ --request POST \ --header 'Content-type: application/json' \ --header 'Api-key: {KEY}' \ --data '{"id":123,"article_id":123,"title":"some_string","type":"some_string","points":123,"variants":[{"id":123,"name":"some_string","value":"some_string","is_valid":true}]}' ```