{"openapi":"3.0.0","info":{"title":"Afineo Webservices API — queues","description":"Module `queues` of the Afineo API v3 (3 endpoints).\n\nMonitor the message queue system: list queues, get queue details, and view queue types. Queues handle asynchronous job processing (imports, exports, transformations) across the platform.\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":"queues","description":"Monitor the message queue system: list queues, get queue details, and view queue types. Queues handle asynchronous job processing (imports, exports, transformations) across the platform."}],"paths":{"/api/v3/queues/get/":{"post":{"tags":["queues"],"summary":"Get queue details","description":"## Purpose\n\nReturns detailed queue information by ID including file download URL for finished jobs.\n\n## Permissions\n\n- Admin users: Access any queue\n- Regular users: Own queues only\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Queue details 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":12345,"description":"Queue ID"},"user_id":{"type":"integer","example":1,"description":"User who initiated the queue"},"type_id":{"type":"string","example":"export","description":"Queue type"},"type_label":{"type":"string","example":"Export","description":"Queue type label"},"status_id":{"type":"integer","example":3,"description":"Queue status (1=pending, 2=in progress, 3=finished, etc.)"},"status_label":{"type":"string","example":"Finished","description":"Human-readable status label"},"creation_date":{"type":"string","example":"2024-12-07T14:29:45+00:00","description":"Creation date (ISO 8601)"},"start_date":{"type":"string","example":"2024-12-07T14:30:45+00:00","description":"Start date (ISO 8601)"},"end_date":{"type":"string","nullable":true,"example":"2024-12-07T15:30:45+00:00","description":"End date (ISO 8601)"},"file_info":{"type":"object","nullable":true,"properties":{"file":{"type":"string","example":"export_20250901_120000.csv","description":"Filename"},"extension":{"type":"string","example":"csv","description":"File extension"},"size":{"type":"integer","example":10000,"description":"File size in bytes"},"file_url":{"type":"string","example":"https://my-afineo.com/gallery/global/dl/files/export_20250901_120000.csv","description":"Direct download URL"}},"description":"File information (only for finished queues with generated files)"}},"description":"Queue details"}},"required":["status_code","status_message","result"]},{"type":"object","title":"Error Response","properties":{"status_code":{"type":"integer","example":3,"description":"Status code (3 = not found, 2 = validation error)"},"status_message":{"type":"string","example":"Queue 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":"Queue ID. Use POST /api/v3/queues/list to get available queues.","example":12345}},"required":["id"]}}}}}},"/api/v3/queues/list/":{"post":{"tags":["queues"],"summary":"List queue items","description":"## Purpose\n\nReturns background job queue with execution status and optional filtering by status, type, and date range.\n\n## Use Cases\n\n- Monitor exports, imports, processes, and bulk operations\n- Track job progress and completion\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Queue items list 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":15,"description":"Number of items"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":12345,"description":"Queue ID"},"user_id":{"type":"integer","example":1,"description":"User who initiated the queue"},"type":{"type":"string","example":"export","description":"Queue type (export, importattrs, etc.)"},"type_description":{"type":"string","example":"Export","description":"Queue type label (Import, Export, Importing Attributes, etc.)"},"status":{"type":"string","example":"in_progress","enum":["pending","in_progress","finished","being_killed","killed","canceled","queue_connection_error","fatal_error_out_of_process","machine_error","fatal_error_in_process","temporary_duplicate_prevention"],"description":"Queue status"},"class_id":{"type":"integer","nullable":true,"description":"Class ID (if queue executed by a process)","example":4},"process_id":{"type":"integer","nullable":true,"example":12345,"description":"Process ID (if queue executed by a process)"},"project_node_id":{"type":"integer","nullable":true,"description":"Project Node ID","example":556},"creation_date":{"type":"string","example":"2024-12-07T14:29:45+00:00","description":"Creation date and time (ISO 8601 format)"},"start_date":{"type":"string","example":"2024-12-07T14:30:45+00:00","description":"Start date and time (ISO 8601 format)"},"end_date":{"type":"string","nullable":true,"example":"2024-12-07T15:30:45+00:00","description":"End date and time (ISO 8601 format) : null if not finished"},"attempts_count":{"type":"integer","example":1,"description":"Number of attempts"},"result":{"type":"object","nullable":true,"properties":{"totalResults":{"type":"integer","example":50,"description":"Total results"},"nb":{"type":"integer","example":49,"description":"Number of items processed"}},"description":"Results information"},"notification_sent":{"type":"integer","nullable":true,"example":1,"description":"Notification sent"},"file_info":{"type":"object","nullable":true,"properties":{"file":{"type":"string","example":"export_20250901_120000.csv","description":"Generated filename"},"extension":{"type":"string","example":"csv","description":"File extension"},"size":{"type":"integer","example":10000,"description":"File size in bytes"},"file_url":{"type":"string","example":"https://my-afineo.com/gallery/global/dl/files/export_20250901_120000.csv","description":"Direct download URL for the file"}},"description":"File information (only present for finished queues that generated a file)"}},"required":["id","user_id","type","type_description","status","creation_date","start_date","end_date","attempts_count"],"description":"Queue information"}}},"required":["results_total","items"],"description":"Queue list"}},"required":["status_code","status_message","result"]},{"type":"object","title":"Error Response","properties":{"status_code":{"type":"integer","example":3,"description":"Status code (3 = error, 0 = validation failed)"},"status_message":{"type":"string","example":"Invalid parameters 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":{"status":{"type":"array","description":"Filter by queue statuses: \"pending\" (waiting), \"in_progress\" (running), \"finished\" (completed), \"killed\" (stopped), \"canceled\" (cancelled by user), or error states.","example":["pending","in_progress"],"items":{"type":"string","enum":["pending","in_progress","finished","being_killed","killed","canceled","queue_connection_error","fatal_error_out_of_process","machine_error","fatal_error_in_process","temporary_duplicate_prevention"]}},"type":{"type":"string","description":"Filter by queue type. Use POST /api/v3/queues/types to get all available types. Common values: \"Import\", \"Export\", \"DeleteFiche\", \"DeleteNode\", \"Process\", \"PublishEasyCatalog\".","example":"Process"},"start_date":{"type":"object","description":"Start date of the element. Can be bounded using \"min\" and \"max\"","example":{"min":"2025-09-20T14:00:00Z","max":"2025-09-21T18:00:00Z"},"properties":{"min":{"type":"string","description":"Minimum start date (ISO 8601 format)","example":"2025-09-20T14:00:00Z"},"max":{"type":"string","description":"Maximum start date (ISO 8601 format)","example":"2025-09-21T18:00:00Z"}}},"end_date":{"type":"object","description":"End date of the element. Can be bounded using \"min\" and \"max\"","example":{"min":"2025-11-14T08:30:00Z"},"properties":{"min":{"type":"string","description":"Minimum end date (ISO 8601 format)","example":"2025-11-20T14:00:00Z"},"max":{"type":"string","description":"Maximum end date (ISO 8601 format)","example":"2025-11-21T18:00:00Z"}}}}}}}}}},"/api/v3/queues/types/":{"post":{"tags":["queues"],"summary":"List queue types","description":"## Purpose\n\nReturns available background job categories (Import, Export, Process, Delete) for filtering queue lists.\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Queue types list 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":15,"description":"Number of items"},"items":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","example":"importattr","description":"Queue type"},"description":{"type":"string","example":"Importing attributes","description":"Detailed description of the queue type"}},"required":["type","description"],"description":"Queue type information"}}},"required":["results_total","items"],"description":"List of available queue types","example":{"results_total":51,"items":[{"type":"Import","description":"Data import"},{"type":"Export","description":"Data export"},{"type":"Process","description":"Process execution"}]}}},"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 or system error","description":"Error message"},"result":{"type":"array","items":{"type":"object"},"example":[],"description":"Empty array on error"}},"required":["status_code","status_message","result"]}]}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token generated with /api/v3/token/get/"}}}}