Skip to content

Instantly share code, notes, and snippets.

@kgarfinkel
Created November 11, 2014 19:16
Show Gist options
  • Save kgarfinkel/4fdafc33e45d3ec15cf1 to your computer and use it in GitHub Desktop.
Save kgarfinkel/4fdafc33e45d3ec15cf1 to your computer and use it in GitHub Desktop.
Transferring Org Courses to a Personal Accout
// Fetch org course
$course_api me orgs/121444745/courses | jq '.[] | {"id": .id, "programId": .programId}'
{
"id": "qnmizo",
"programId": "121444745"
}
// Create new programId
$ course_api me programs post {}
{
"id": "301760499"
}
// Transfer course to new program
$ course_api me programs/301760499/courses post '{"courseId": "qnmizo"}'
{
"id": "301760499"
}
// Course has new programId, but is still pointed to org
$course_api admin orgs/121444745/courses | jq '.[] | {"id": .id, "programId": .programId}'
{
"id": "qnmizo",
"programId": "301760499"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment