OSF Actions API
Actions represent state transitions or comments performed on reviewable or request-related resources within the OSF platform, such as Preprints, Nodes, Preprint Requests, Node Requests, and Collection Submissions. These endpoints document and facilitate moderation and administrative workflows, ensuring transparency and accountability in managing user interactions, moderation processes, and lifecycle management for various resources. Actions are categorized based on their targets: - **Review Actions**: Pertaining to moderation and review processes on Preprints. - **Node Request Actions**: Related to Node Requests (e.g., access or withdrawal requests). - **Preprint Request Actions**: Related to Preprint Requests, such as withdrawal requests. Actions require specific permissions depending on their triggers: - `submit`: Typically open, no special permissions required. - `accept`/`reject`: Require moderation or admin permissions. - `edit_comment`: Requires administrative permissions. Each successful action response returns a JSON:API formatted object containing: - **id** : The identifier of the action. - **type** : Type of action performed (e.g., `review-actions`, `node-request-actions`). - **attributes** : Information including `trigger`, `comment`, `from_state`, `to_state`, timestamps (`date_created`, `date_modified`), visibility (`visible`), and automation flag (`auto`). - **relationships** : - `creator`: User who initiated the action. - `target` : The resource the action applies to (e.g., Preprint, Node Request). - `provider` : Provider associated with the target, if applicable. Actions may fail due to various reasons, resulting in standard error responses: - `400 Bad Request`: Invalid or malformed payload. - `403 Forbidden`: Insufficient permissions to perform the action. - `404 Not Found`: The target resource does not exist or is inaccessible. - `409 Conflict`: Invalid action due to the current state of the target resource.