rekkajay Posted May 6, 2021 Posted May 6, 2021 Here's the scenario I'm trying to automate for our forums. We regularly have courses that run overlapped but are separated into different client groups based on the course start dates. Each course start date needs a product and a group and I want to write an API Rest script that would take care of everything for us. An HTML form creates a DB record of a dated course that needs to be set up in the forums. A script triggered by cron 1xday iterates through tasks to be completed for each course recorded: Quote Create member group for a new course if it doesn't exist yet. REST action: "Create New Group" (endpoint: ??) Create a product for that course, if it doesn't exist yet. REST action: "Copy" an existing product and modify information (endpoint: ??) REST action: Modify information for copied product (endpoint: ??) REST action: set "Add customer into secondary groups" (endpoint: ??) REST action: edit "Purchase Notifications" associated with the product (endpoint: ??) Check if the course begins within the next 24 hrs and, if so, create a Forum for it and provide access to the course's member group. REST action: create a forum and assign permissions to group (endpoint: [post] /forums/forums) If there is scheduled content to be posted to the forums, create new topics with the provided content. REST action: create new posts under a set forum (endpoint: [post] /forums/posts) If a course has completed + 2wks, delete its forum, its group, and its DB record. REST action: delete forums and member groups (endpoint: [delete] /forums/forums/{id}) It's the (endpoints: ??) that I'm stuck on. I don't see listings in the API documentation for products at all, or a way to POST /core/groups Is there an endpoint for products (something like /nexus/products) and if so, a way to POST and create a new product? Is is possible to POST to /core/groups and create a new group?
Recommended Posts