{"openapi":"3.0.0","info":{"title":"Afineo Webservices API — processes","description":"Module `processes` of the Afineo API v3 (9 endpoints).\n\nExecute and monitor background processes (ETL, exports, transformations). Launch a process, track its state via polling, retrieve execution logs and download generated files when complete.\n\nFull specification: https://api.afineo.io/openapi.json","version":"3.0.0","contact":{"name":"Afineo Solutions","url":"https://www.afineo.com"},"x-logo":{"url":"./logo.png","altText":"Afineo - Powerful Data, Powerful People"}},"servers":[{"url":"https://{instance}.afineo.io","description":"Afineo instance","variables":{"instance":{"description":"Your Afineo instance name","default":"client"}}}],"tags":[{"name":"processes","description":"Execute and monitor background processes (ETL, exports, transformations). Launch a process, track its state via polling, retrieve execution logs and download generated files when complete."}],"paths":{"/api/v3/processes/connections/":{"post":{"tags":["processes"],"summary":"List external connections","description":"## Purpose\n\nReturns configured external connections (integrations) available for use in process actions.\n\n## What is a Connection?\n\nA connection is a configured link to an external system (FTP server, SFTP, HTTP API, database, ERP, etc.). Connections are created by administrators and referenced by process actions that need to interact with external systems (e.g., export files to FTP, import data from an API, sync with an ERP).\n\n## When to Use\n\n- Use to discover available external connections and their configuration\n- Connection IDs are referenced in process action parameters (visible via POST /api/v3/processes/get)\n- No parameters required - returns all configured connections across all libraries\n\n## Connection Types\n\nCommon types: `ftp`, `sftp`, `http`, `database`, `erp`. The `configuration` object structure varies by type (host, port, credentials, path, etc.).\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Connection list information response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"Success Response","properties":{"status_code":{"type":"integer","example":1,"description":"Status code (1 = success)"},"status_message":{"type":"string","example":"","description":"Status message"},"result":{"type":"object","properties":{"results_total":{"type":"integer","example":2,"description":"Total number of connections found"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":1,"description":"Connection ID"},"label":{"type":"string","example":"My FTP Connection","description":"Connection label"},"type":{"type":"string","example":"ftp","description":"Connection type (ftp, sftp, http, etc.)"},"configuration":{"type":"object","additionalProperties":true,"example":{"host":"ftp.example.com","port":"21","username":"user","password":"******","path":"/uploads"},"description":"Connection configuration (structure depends on connection type)"}},"required":["id","label","type","configuration"]},"description":"Array of connections"}},"required":["results_total","items"],"description":"Connection list with total count"}},"required":["status_code","status_message","result"]},{"type":"object","title":"Error Response","properties":{"status_code":{"type":"integer","example":3,"description":"Status code (3 = error)"},"status_message":{"type":"string","example":"Access denied","description":"Error message"},"result":{"type":"array","items":{"type":"object"},"example":[],"description":"Empty array on error"}},"required":["status_code","status_message","result"]}]}}}}}}},"/api/v3/processes/execute/":{"post":{"tags":["processes"],"summary":"Execute automated process","description":"## Purpose\n\nLaunches an automation and returns identification key for progress tracking.\n\n## Use Cases\n\n- Execute exports, imports, workflows\n- Trigger scheduled tasks\n- Run bulk operations\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Process execution response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"Success Response","properties":{"status_code":{"type":"integer","example":1,"description":"Status code (1 = success)"},"status_message":{"type":"string","example":"","description":"Status message"},"result":{"type":"object","properties":{"identification_key":{"type":"string","example":"89141ccc93665f1463c845ccc7d57559","description":"Unique identification key for tracking the process execution"}},"required":["identification_key"],"description":"Process execution details"}},"required":["status_code","status_message","result"]},{"type":"object","title":"Error Response","properties":{"status_code":{"type":"integer","example":3,"description":"Status code (3 = error, 0 = process not found)"},"status_message":{"type":"string","example":"Process not found or execution failed","description":"Error message"},"result":{"type":"array","items":{"type":"object"},"example":[],"description":"Empty array on error"}},"required":["status_code","status_message","result"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"Process ID. Use POST /api/v3/processes/list with class_id to get available processes.","example":125},"class_id":{"type":"integer","description":"Library ID. Use POST /api/v3/administration/classes/list to get available libraries.","example":54},"current_node":{"type":"integer","description":"Specify the current node to be used by actions that are configured with a \"current node\" option. Use POST /api/v3/get-asset/by-search/node to find project nodes, or POST /api/v3/publishing/list to find publication project nodes. Affected actions include: \"Change the status\", \"Export\", \"Exporting deleted records\", \"Import\", \"Multiple actions and rules\", and \"Publish to EasyCatalog\".","example":11450},"variables":{"type":"object","description":"Process variables as key-value pairs. Variable names are defined in the process configuration. Use POST /api/v3/processes/get with process id to see available variables.","example":{"OUTPUT_FORMAT":"csv","EXPORT_PATH":"/exports/daily"}}},"required":["id","class_id"]}}}}}},"/api/v3/processes/full/":{"post":{"tags":["processes"],"summary":"List processes (full details)","description":"## Purpose\n\nReturns all processes for a class with complete configuration (actions, permissions, triggers, schedulers, callers).\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Process list information response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"Success Response","properties":{"status_code":{"type":"integer","example":1,"description":"Status code (1 = success)"},"status_message":{"type":"string","example":"","description":"Status message"},"result":{"type":"object","properties":{"results_total":{"type":"integer","example":2,"description":"Total number of processes found"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":686,"description":"Process ID"},"code":{"type":"string","example":"my_process_code","description":"Process code"},"tags":{"type":"array","items":{"type":"string"},"example":["tag1","tag2"],"description":"Array of tags (can be empty)"},"class_id":{"type":"integer","example":4,"description":"Class ID"},"label":{"type":"string","example":"My process","description":"Process label"},"active":{"type":"boolean","example":true,"description":"Whether the process is active"},"description":{"type":"string","example":"Description of the process","description":"Process description"},"user_description":{"type":"string","example":"User description of the process","description":"Process user description"},"order":{"type":"integer","example":1,"description":"Display order"},"parent_group_id":{"type":"integer","example":26,"description":"Process parent group ID"},"parent_group_label":{"type":"string","example":"Label of parent group 26","description":"Process parent group label"},"applicable_to_users":{"oneOf":[{"type":"array","items":{"type":"string"},"example":["all"]},{"type":"object","additionalProperties":{"type":"string"},"example":{"1555":"Admin test","1645":"Product Manager"}}],"description":"Permissions to apply the process to users. Can be 'all', 'admin', or a map of user IDs to labels"},"applicable_to_asset_types":{"oneOf":[{"type":"array","items":{"type":"string"},"example":["all"]},{"type":"object","additionalProperties":{"type":"string"},"example":{"195":"Article"}}],"description":"Permissions to apply the process to asset types. Can be 'all' or a map of type IDs to labels"},"applicable_to_asset_status":{"oneOf":[{"type":"array","items":{"type":"string"},"example":["all"]},{"type":"object","additionalProperties":{"type":"string"},"example":{"1111":"Proposed"}}],"description":"Permissions to apply the process to asset status. Can be 'all' or a map of status IDs to labels"},"variables":{"type":"object","additionalProperties":{"type":"string"},"example":{"MY_VARIABLE":"test"},"description":"Process variables"},"trigger_type":{"type":"string","enum":["manual","workflow"],"example":"manual","description":"How the process can be triggered: \"manual\" (by user action) or \"workflow\" (automatically on workflow step change)"},"availability":{"type":"object","properties":{"in_actions_panel":{"type":"boolean","example":true,"description":"Available in the global \"Actions\" interface listing all manual processes"},"on_asset":{"type":"boolean","example":false,"description":"Available from an asset detail view (executable directly on a fiche)"}},"description":"Where the process is available in the UI (only relevant for manual processes)"},"is_scheduled":{"type":"boolean","example":false,"description":"Whether this process is scheduled (added to a scheduler for automated execution at specific times)"},"image":{"type":"string","example":"/design/default/processus/processus.png","description":"Image path"},"image_http":{"type":"string","example":"https://my-afineo.com/design/default/processus/processus.png","description":"Image URL"},"actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":54,"description":"Process action ID"},"process_linked_id":{"type":"integer","example":687,"description":"Process linked ID"},"label":{"type":"string","example":"Export","description":"Action label"},"label_custom":{"type":"string","example":"Export custom","description":"Action label custom"},"form":{"type":"string","example":"export_configuration","description":"Action form"},"type":{"type":"string","example":"action","description":"Action type functional : action or process"},"type_action":{"type":"string","example":"action","description":"Action type technical : Export a configuration, Import, etc."},"order":{"type":"integer","example":1,"description":"Display order"},"parameters":{"oneOf":[{"type":"array","items":{"type":"object"}},{"type":"object"}],"example":{"label_action":"","description_action":"","mapping_id":"1173"},"description":"Action parameters"},"mapping_id":{"oneOf":[{"type":"string","example":"1234"},{"type":"integer","example":1234}],"description":"Mapping ID : empty string if no value"},"image":{"type":"string","nullable":true,"example":"/UPLOADS/processus/actions/image.png","description":"Image path"},"image_http":{"type":"string","nullable":true,"example":"https://my-afineo.com/gallery/global/UPLOADS/processus/actions/image.png","description":"Image URL"}},"required":["id","process_linked_id","label","label_custom","form","type","type_action","order","parameters","mapping_id"]},"description":"List of actions for the process"},"schedulers":{"type":"object","additionalProperties":{"type":"string"},"example":{"15":"Scheduler label"},"description":"Map of scheduler IDs to labels"},"used_by":{"type":"array","items":{"type":"object","properties":{"process_id":{"type":"integer","example":45,"description":"ID of the calling process"},"label":{"type":"string","example":"Import Global","description":"Label of the calling process"},"class_id":{"type":"integer","example":4,"description":"Class ID of the calling process"},"call_type":{"type":"string","enum":["sub_process","others_processus_action"],"example":"sub_process","description":"How this process is called: \"sub_process\" (direct sub-process via regle_lie) or \"others_processus_action\" (cross-library call)"}},"required":["process_id","label","class_id","call_type"]},"description":"List of processes that call this process (reverse lookup). Empty array if no callers found."}},"required":["id","code","tags","class_id","label","active","description","user_description","order","parent_group_id","parent_group_label","applicable_to_users","applicable_to_asset_types","applicable_to_asset_status","variables","trigger_type","availability","is_scheduled","image","image_http","actions","schedulers","used_by"]},"description":"Array of processes"}},"required":["results_total","items"],"description":"Process list with total count"}},"required":["status_code","status_message","result"]},{"type":"object","title":"Error Response","properties":{"status_code":{"type":"integer","example":3,"description":"Status code (3 = error, 0 = class not found)"},"status_message":{"type":"string","example":"Class not found","description":"Error message"},"result":{"type":"array","items":{"type":"object"},"example":[],"description":"Empty array on error"}},"required":["status_code","status_message","result"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"class_id":{"type":"integer","description":"Library ID. Use POST /api/v3/administration/classes/list to get available libraries.","example":4}},"required":["class_id"]}}}}}},"/api/v3/processes/get-file/":{"post":{"tags":["processes"],"summary":"Download process-generated file","description":"## Purpose\n\nDownloads file generated by a completed process using identification_key and file_key.\n\n## Workflow\n\n1. Call `execute` to get identification_key\n2. Call `get-instance-state` to get available_files list\n3. Call this endpoint to download each file\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Process file content response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"Success Response","properties":{"status_code":{"type":"integer","example":1,"description":"Status code (1 = success)"},"status_message":{"type":"string","example":"","description":"Status message"},"result":{"type":"object","properties":{"raw_data":{"type":"boolean","example":false,"description":"Raw data flag"},"items":{"type":"string","example":"...","description":"File content"}},"required":["raw_data","items"],"description":"Generated file content"}},"required":["status_code","status_message","result"]},{"type":"object","title":"Error Response","properties":{"status_code":{"type":"integer","example":3,"description":"Status code (3 = error, 0 = file not found)"},"status_message":{"type":"string","example":"No files to return","description":"Error message"},"result":{"type":"array","items":{"type":"object"},"example":[],"description":"Empty array on error"}},"required":["status_code","status_message","result"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"identification_key":{"type":"string","description":"Identification key (returned by endpoint \"execute\")","example":"89141ccc93665f1463c845ccc7d57559"},"file_key":{"type":"string","description":"File key returned in the 'available_files' array of POST /api/v3/processes/get-instance-state response. Each file generated by the process has a unique key.","example":"Global_SOLO_EXPORT"}},"required":["identification_key","file_key"]}}}}}},"/api/v3/processes/get-instance-state/":{"post":{"tags":["processes"],"summary":"Check process execution status","description":"## Purpose\n\nReturns real-time execution state and available files using identification_key from execute endpoint.\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Process instance state response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"Success Response","properties":{"status_code":{"type":"integer","example":1,"description":"Status code (1 = success)"},"status_message":{"type":"string","example":"No files to return","description":"Status message"},"result":{"type":"object","properties":{"start_date":{"type":"string","example":"2025-08-29T09:55:52+02:00","description":"Process execution start date (ISO 8601 format)"},"end_date":{"type":"string","example":"2025-08-29T09:55:55+02:00","description":"Process execution end date (ISO 8601 format)"},"state":{"type":"string","nullable":true,"example":"Finished","description":"Process execution state"},"notification":{"type":"string","nullable":true,"example":"","description":"Notification message if error"},"completed":{"type":"boolean","example":true,"description":"Whether the process execution is completed"},"available_files":{"type":"array","items":{"type":"string"},"example":["myfile.csv"],"description":"List of available files"},"unavailable_files":{"type":"array","items":{"type":"string"},"example":["myfile2.csv"],"description":"List of unavailable files"}},"required":["start_date","end_date","completed","available_files","unavailable_files"],"description":"Process instance state information"}},"required":["status_code","status_message","result"]},{"type":"object","title":"Error Response","properties":{"status_code":{"type":"integer","example":3,"description":"Status code (3 = error, 0 = process not found)"},"status_message":{"type":"string","example":"Access denied","description":"Error message"},"result":{"type":"array","items":{"type":"object"},"example":[],"description":"Empty array on error"}},"required":["status_code","status_message","result"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"identification_key":{"type":"string","description":"Identification key (returned by endpoint \"execute\")","example":"89141ccc93665f1463c845ccc7d57559"}},"required":["identification_key"]}}}}}},"/api/v3/processes/get-logs/":{"post":{"tags":["processes"],"summary":"Get process execution logs","description":"## Purpose\n\nReturns execution history with status details for troubleshooting and auditing.\n\n## Date Filtering\n\nUse either `one_day` OR `start_date` + `end_date` together.\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Process logs response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"Success Response","properties":{"status_code":{"type":"integer","example":1,"description":"Status code (1 = success)"},"status_message":{"type":"string","example":"","description":"Status message"},"result":{"type":"object","properties":{"raw_data":{"type":"boolean","example":false,"description":"Raw data flag"},"items":{"type":"array","items":{"type":"object","properties":{"process_id":{"type":"integer","example":686,"description":"Process ID"},"process_label":{"type":"string","example":"My process","description":"Process label"},"user_id":{"type":"integer","example":1687,"description":"User ID execution process"},"process_start_date":{"type":"string","example":"2025-08-29T09:55:52+02:00","description":"Process start date (ISO 8601 format)"},"process_end_date":{"type":"string","example":"2025-08-29T09:55:55+02:00","description":"Process end date (ISO 8601 format)"},"state":{"type":"string","nullable":true,"example":"Completed","description":"Process state"},"actions":{"type":"array","items":{"type":"object","properties":{"action_id":{"type":"string","example":"---","description":"Action ID"},"action_label":{"type":"string","example":"Export a configuration","description":"Action label"},"action_start_date":{"type":"string","example":"2025-08-29T09:55:52+02:00","description":"Action start date (ISO 8601 format)"},"action_end_date":{"type":"string","example":"2025-08-29T09:55:55+02:00","description":"Action end date (ISO 8601 format)"},"action_details":{"type":"string","example":"Executing rule: XML export","description":"Action details"}},"required":["action_id","action_label","action_start_date","action_end_date","action_details"],"description":"Action information"}}},"required":["process_id","process_label","user_id","process_start_date","process_end_date","state","actions"],"description":"Process logs item"}}},"required":["raw_data","items"],"description":"Process logs data"}},"required":["status_code","status_message","result"]},{"type":"object","title":"Error Response","properties":{"status_code":{"type":"integer","example":3,"description":"Status code (3 = error, 2 = parameters configuration error, 0 = process not found)"},"status_message":{"type":"string","example":"The parameter \"start_date\" must be anterior to the parameter \"end_date\"","description":"Error message"},"result":{"type":"array","items":{"type":"object"},"example":[],"description":"Empty array on error"}},"required":["status_code","status_message","result"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"Process ID. Use POST /api/v3/processes/list with class_id to get available processes.","example":125},"start_date":{"type":"string","description":"Start date (ISO 8601 format). The \"start_date\" and \"end_date\" parameters are to be used together.","example":"2025-10-25T08:10:00Z"},"end_date":{"type":"string","description":"End date (ISO 8601 format). The \"start_date\" and \"end_date\" parameters are to be used together.","example":"2025-10-26T10:52:00Z"},"one_day":{"type":"string","description":"Date of a given day (Format YYYY-MM-DD). You must either use the \"one_day\" parameter or use the \"start_date\" and \"end_date\" parameters.","example":"2025-07-10"},"response_type":{"type":"string","description":"Response format : \"html\", \"plainText\", \"xml\", \"json\"","enum":["html","plainText","xml","json"],"example":"json"}},"required":["id"]}}}}}},"/api/v3/processes/get/":{"post":{"tags":["processes"],"summary":"Get process configuration","description":"## Purpose\n\nReturns complete process definition including actions, parameters, triggers, availability settings, and which processes call this one.\n\n## When to Use\n\n- Use after POST /api/v3/processes/list to get full details of a specific process before executing it\n- Check `variables` to know which runtime parameters the process accepts (pass them to `execute`)\n- Check `actions` to understand what the process will do (export, import, status change, etc.)\n- Check `applicable_to_*` fields to verify if the process can be applied to specific users/types/statuses\n- Check `trigger_type` to know if the process is manual or workflow-triggered\n- Check `used_by` to find which other processes call this one (reverse dependency)\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Process information response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"Success Response","properties":{"status_code":{"type":"integer","example":1,"description":"Status code (1 = success)"},"status_message":{"type":"string","example":"","description":"Status message"},"result":{"type":"object","properties":{"id":{"type":"integer","example":686,"description":"Process ID"},"code":{"type":"string","example":"export_products_xml","description":"Process code"},"tags":{"type":"array","items":{"type":"string"},"example":["export","products"],"description":"Array of tags (can be empty)"},"class_id":{"type":"integer","example":4,"description":"Class ID"},"label":{"type":"string","example":"My process","description":"Process label"},"active":{"type":"boolean","nullable":true,"example":true,"description":"Whether the process is active"},"description":{"type":"string","example":"Description of the process","description":"Process description"},"user_description":{"type":"string","example":"User description of the process","description":"Process user description"},"order":{"type":"integer","nullable":true,"example":1,"description":"Display order"},"parent_group_id":{"type":"integer","example":26,"description":"Process parent group ID"},"parent_group_label":{"type":"string","example":"Label of parent group 26","description":"Process parent group label"},"applicable_to_users":{"oneOf":[{"type":"array","items":{"type":"string"},"example":["all"]},{"type":"object","additionalProperties":{"type":"string"},"example":{"1555":"Admin test","1645":"Product Manager"}}],"nullable":true,"description":"Permissions to apply the process to users. Can be 'all', 'admin', or a map of user IDs to labels"},"applicable_to_asset_types":{"oneOf":[{"type":"array","items":{"type":"string"},"example":["all"]},{"type":"object","additionalProperties":{"type":"string"},"example":{"195":"Article"}}],"nullable":true,"description":"Permissions to apply the process to asset types. Can be 'all' or a map of type IDs to labels"},"applicable_to_asset_status":{"oneOf":[{"type":"array","items":{"type":"string"},"example":["all"]},{"type":"object","additionalProperties":{"type":"string"},"example":{"1111":"Proposed"}}],"nullable":true,"description":"Permissions to apply the process to asset status. Can be 'all' or a map of status IDs to labels"},"variables":{"type":"object","nullable":true,"additionalProperties":{"type":"string"},"example":{"MY_VARIABLE":"test"},"description":"Process variables"},"trigger_type":{"type":"string","enum":["manual","workflow"],"example":"manual","description":"How the process can be triggered: \"manual\" (by user action) or \"workflow\" (automatically on workflow step change)"},"availability":{"type":"object","properties":{"in_actions_panel":{"type":"boolean","example":true,"description":"Available in the global \"Actions\" interface listing all manual processes"},"on_asset":{"type":"boolean","example":false,"description":"Available from an asset detail view (executable directly on a fiche)"}},"description":"Where the process is available in the UI (only relevant for manual processes)"},"is_scheduled":{"type":"boolean","example":false,"description":"Whether this process is scheduled (added to a scheduler for automated execution at specific times)"},"image":{"type":"string","nullable":true,"example":"/design/default/processus/processus.png","description":"Image path"},"image_http":{"type":"string","nullable":true,"example":"https://my-afineo.com/design/default/processus/processus.png","description":"Image URL"},"actions":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"integer","example":54,"description":"Process action ID"},"process_linked_id":{"type":"integer","example":687,"description":"Process linked ID"},"label":{"type":"string","example":"Export","description":"Action label"},"label_custom":{"type":"string","example":"Export custom","description":"Action label custom"},"form":{"type":"string","example":"export_configuration","description":"Action form"},"type":{"type":"string","example":"action","description":"Action type functional : action or process"},"type_action":{"type":"string","example":"action","description":"Action type technical : Export a configuration, Import, etc."},"order":{"type":"integer","example":1,"description":"Display order"},"parameters":{"oneOf":[{"type":"array","items":{"type":"object"}},{"type":"object"}],"example":{"label_action":"","description_action":"","mapping_id":"1173"},"description":"Action parameters"},"mapping_id":{"oneOf":[{"type":"string","example":"1234"},{"type":"integer","example":1234}],"description":"Mapping ID : empty string if no value"},"image":{"type":"string","nullable":true,"example":"/UPLOADS/processus/actions/image.png","description":"Image path"},"image_http":{"type":"string","nullable":true,"example":"https://my-afineo.com/gallery/global/UPLOADS/processus/actions/image.png","description":"Image URL"}},"required":["id","process_linked_id","label","label_custom","form","type","type_action","order","parameters","mapping_id"]},"description":"List of actions for the process"},"schedulers":{"type":"object","nullable":true,"additionalProperties":{"type":"string"},"example":{"15":"Scheduler label"},"description":"Map of scheduler IDs to labels"},"used_by":{"type":"array","items":{"type":"object","properties":{"process_id":{"type":"integer","example":45,"description":"ID of the calling process"},"label":{"type":"string","example":"Import Global","description":"Label of the calling process"},"class_id":{"type":"integer","example":4,"description":"Class ID of the calling process"},"call_type":{"type":"string","enum":["sub_process","others_processus_action"],"example":"sub_process","description":"How this process is called: \"sub_process\" (direct sub-process via regle_lie) or \"others_processus_action\" (cross-library call)"}},"required":["process_id","label","class_id","call_type"]},"description":"List of processes that call this process (reverse lookup). Empty array if no callers found."}},"required":["id","code","tags","class_id","label","description","user_description","parent_group_id","parent_group_label"],"description":"Process information"}},"required":["status_code","status_message","result"]},{"type":"object","title":"Error Response","properties":{"status_code":{"type":"integer","example":3,"description":"Status code (3 = error, 0 = process not found)"},"status_message":{"type":"string","example":"Process not found or access denied","description":"Error message"},"result":{"type":"array","items":{"type":"object"},"example":[],"description":"Empty array on error"}},"required":["status_code","status_message","result"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"Process ID. Use POST /api/v3/processes/list with class_id to get available processes.","example":125}},"required":["id"]}}}}}},"/api/v3/processes/list/":{"post":{"tags":["processes"],"summary":"List processes (simplified)","description":"## Purpose\n\nReturns simplified process list for a library (id, code, label, tags, trigger type, availability, scheduling status).\n\n## What is a Process?\n\nA process is an automated workflow that executes one or more actions sequentially (exports, imports, status changes, bulk operations, etc.). Processes are configured per library and can be triggered manually by a user or automatically via workflow step changes.\n\n## When to Use\n\n- Use `list` to discover available processes and their IDs for a library\n- Use POST /api/v3/processes/get with a process ID to get complete configuration (actions, variables, permissions)\n- Use POST /api/v3/processes/execute with a process ID and class_id to run a process\n\n## Key Fields\n\n- `trigger_type`: \"manual\" (user-triggered from UI) or \"workflow\" (auto-triggered on workflow step change)\n- `is_scheduled`: true if the process is attached to a scheduler for timed execution\n- `availability`: where the process appears in the UI (actions panel and/or asset detail view)\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Process list information response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"Success Response","properties":{"status_code":{"type":"integer","example":1,"description":"Status code (1 = success)"},"status_message":{"type":"string","example":"","description":"Status message"},"result":{"type":"object","properties":{"results_total":{"type":"integer","example":2,"description":"Total number of processes found"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":686,"description":"Process ID"},"code":{"type":"string","example":"my_process_code","description":"Process code"},"tags":{"type":"array","items":{"type":"string"},"example":["tag1","tag2"],"description":"Array of tags (can be empty)"},"class_id":{"type":"integer","example":4,"description":"Class ID"},"label":{"type":"string","example":"My process","description":"Process label"},"active":{"type":"boolean","nullable":true,"example":true,"description":"Whether the process is active"},"description":{"type":"string","example":"Description of the process","description":"Process description"},"user_description":{"type":"string","example":"User description of the process","description":"Process user description"},"parent_group_id":{"type":"integer","example":26,"description":"Process parent group ID"},"parent_group_label":{"type":"string","example":"Label of parent group 26","description":"Process parent group label"},"trigger_type":{"type":"string","enum":["manual","workflow"],"example":"workflow","description":"How the process can be triggered: \"manual\" (by user action) or \"workflow\" (automatically on workflow step change)"},"availability":{"type":"object","properties":{"in_actions_panel":{"type":"boolean","example":false,"description":"Available in the global \"Actions\" interface listing all manual processes"},"on_asset":{"type":"boolean","example":false,"description":"Available from an asset detail view (executable directly on a fiche)"}},"description":"Where the process is available in the UI (only relevant for manual processes)"},"is_scheduled":{"type":"boolean","example":true,"description":"Whether this process is scheduled (added to a scheduler for automated execution at specific times)"}},"required":["id","code","tags","class_id","label","description","user_description","parent_group_id","parent_group_label","trigger_type","availability","is_scheduled"]},"description":"Array of processes"}},"required":["results_total","items"],"description":"Process list with total count"}},"required":["status_code","status_message","result"]},{"type":"object","title":"Error Response","properties":{"status_code":{"type":"integer","example":3,"description":"Status code (3 = error, 0 = class not found)"},"status_message":{"type":"string","example":"Class not found","description":"Error message"},"result":{"type":"array","items":{"type":"object"},"example":[],"description":"Empty array on error"}},"required":["status_code","status_message","result"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"class_id":{"type":"integer","description":"Library ID. Use POST /api/v3/administration/classes/list to get available libraries.","example":4}},"required":["class_id"]}}}}}},"/api/v3/processes/schedulers/":{"post":{"tags":["processes"],"summary":"List scheduled processes","description":"## Purpose\n\nReturns schedulers with next execution dates and recurrence configuration for a library.\n\n## What is a Scheduler?\n\nA scheduler is a timed automation that executes one or more processes at configured intervals. Schedulers can run at fixed times (e.g., daily at 10:00) or at intervals within a time range (e.g., every hour from 06:00 to 20:00). They can also monitor watch folders for file changes.\n\n## When to Use\n\n- Use to discover scheduled automations for a library\n- Use to check next execution dates, recurrence patterns, and active/disabled status\n- Each scheduler contains a `processes` array listing which processes it will execute\n- Use POST /api/v3/processes/execute with a process ID from the scheduler to manually trigger it\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Scheduler list information response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"Success Response","properties":{"status_code":{"type":"integer","example":1,"description":"Status code (1 = success)"},"status_message":{"type":"string","example":"","description":"Status message"},"result":{"type":"object","properties":{"results_total":{"type":"integer","example":1,"description":"Total number of schedulers found"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":15,"description":"Scheduler ID"},"label":{"type":"string","example":"My Scheduler","description":"Scheduler label"},"class_id":{"type":"integer","example":4,"description":"Class ID"},"active":{"type":"boolean","example":true,"description":"Whether the scheduler is active"},"description":{"type":"string","nullable":true,"example":"Description of the scheduler","description":"Scheduler description"},"next_date":{"type":"string","nullable":true,"example":"2025-11-06T13:00:00+01:00","description":"Next execution date (ISO 8601 format)"},"parameters":{"type":"object","properties":{"schedule":{"type":"object","properties":{"type":{"type":"string","enum":["specific_date","recurrence"],"example":"recurrence","description":"Schedule type : specific_date for one-time execution, recurrence for recurring execution"},"date":{"type":"string","nullable":true,"example":"2025-11-01","description":"Specific date (only for type=specific_date), format YYYY-MM-DD"},"time":{"type":"string","nullable":true,"example":"10:00","description":"Specific time (only for type=specific_date), format HH:MM"},"days_summary":{"type":"string","example":"Weekdays (Monday to Friday)","description":"Human-readable summary of active days (only for type=recurrence)"},"active_days":{"type":"array","items":{"type":"string","enum":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},"example":["Monday","Tuesday","Wednesday","Thursday","Friday"],"description":"List of active days (only for type=recurrence)"},"frequency":{"type":"object","properties":{"mode":{"type":"string","enum":["fixed_time","interval_between_time_range"],"example":"interval_between_time_range","description":"Frequency mode: fixed_time for execution at specific time, interval_between_time_range for recurring execution within a time range"},"time":{"type":"string","nullable":true,"example":"10:00","description":"Fixed execution time (only for mode=fixed_time), format HH:MM"},"interval":{"type":"integer","nullable":true,"example":1,"description":"Interval value (only for mode=interval_between_time_range)"},"unit":{"type":"string","nullable":true,"enum":["hours","minutes"],"example":"hours","description":"Interval unit (only for mode=interval_between_time_range)"},"from_time":{"type":"string","nullable":true,"example":"06:00","description":"Start time of the time range (only for mode=interval_between_time_range), format HH:MM"},"to_time":{"type":"string","nullable":true,"example":"20:00","description":"End time of the time range (only for mode=interval_between_time_range), format HH:MM"}},"description":"Frequency configuration (only for type=recurrence)"},"cron_expression":{"type":"string","example":"0 6-20/1 * * 1,2,3,4,5","description":"Standard cron expression (minute hour day month weekday)"},"description":{"type":"string","example":"Weekdays (Monday to Friday), every 1 hour between 06:00 and 20:00","description":"Human-readable description of the complete schedule"}},"required":["type","cron_expression"],"description":"Schedule configuration"},"run_as_user":{"type":"object","nullable":true,"properties":{"id":{"type":"integer","example":1687,"description":"User ID that will run the scheduler"},"label":{"type":"string","example":"John Doe","description":"User label"}},"description":"User that will execute the scheduler (null if default user)"},"alert_users":{"type":"array","nullable":true,"items":{"type":"string"},"example":["user@company.com","user2@company.com"],"description":"List of email addresses to alert (null if no alerts configured)"},"watch_folder":{"type":"object","nullable":true,"properties":{"path":{"type":"string","example":"/ftp/Datas/afineo/produits/*.csv","description":"Path to monitor for file changes"}},"description":"Folder monitoring configuration (null if not enabled)"}},"required":["schedule","run_as_user","alert_users","watch_folder"],"description":"Scheduler parameters with schedule configuration"},"disabled_by_error":{"type":"boolean","example":false,"description":"Whether the scheduler is disabled by error"},"processes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":686,"description":"Process ID"},"code":{"type":"string","example":"my_process_code","description":"Process code"},"label":{"type":"string","example":"My process","description":"Process label"},"node_id":{"type":"integer","example":123,"description":"Node ID"},"parameters":{"type":"object","example":{"variable1":"value1"},"description":"Process parameters (overload label and description)"},"image":{"type":"string","example":"/design/default/processus/processus.png","description":"Image path"}},"required":["id","code","label","node_id","parameters","image"]},"description":"List of processes associated with this scheduler"}},"required":["id","label","class_id","active","description","next_date","parameters","disabled_by_error","processes"]},"description":"Array of schedulers"}},"required":["results_total","items"],"description":"Scheduler list with total count"}},"required":["status_code","status_message","result"]},{"type":"object","title":"Error Response","properties":{"status_code":{"type":"integer","example":3,"description":"Status code (3 = error, 0 = class not found)"},"status_message":{"type":"string","example":"Class not found","description":"Error message"},"result":{"type":"array","items":{"type":"object"},"example":[],"description":"Empty array on error"}},"required":["status_code","status_message","result"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"class_id":{"type":"integer","description":"Library ID. Use POST /api/v3/administration/classes/list to get available libraries.","example":4}},"required":["class_id"]}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token generated with /api/v3/token/get/"}}}}