Skip to content

Instantly share code, notes, and snippets.

@zhm
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhm/235970164f60c13ab5d5 to your computer and use it in GitHub Desktop.
Save zhm/235970164f60c13ab5d5 to your computer and use it in GitHub Desktop.

Create a project given its name

curl -XPOST -H "X-ApiToken: token" -H "Content-Type: application/json" -d@- https://api.fulcrumapp.com/api/v2/projects.json <<EOF
{
  "project": {
    "name": "Project Name",
    "description": "Project Description"
  }
}
EOF

Delete a project given its ID

curl -XDELETE -H "X-ApiToken: token" https://api.fulcrumapp.com/api/v2/projects/3751f03b-043d-48bf-a6cc-747ddd36b777.json

Get all members of a project given a project ID

curl -H "X-ApiToken: token" -H "Content-Type: application/json" https://api.fulcrumapp.com/api/v2/memberships.json?project_id=3751f03b-043d-48bf-a6cc-747ddd36b777

Add an organization member to a project given the project ID and the member ID

curl -XPOST -H "X-ApiToken: token" -H "Content-Type: application/json" -d@- https://api.fulcrumapp.com/api/v2/memberships/change_permissions.json <<EOF
{
  "change": {
    "type": "project_members",
    "project_id": "3751f03b-043d-48bf-a6cc-747ddd36b777",
    "add": [ "ba8849a2-3d10-47bf-9287-28c05a16a888" ]
  }
}
EOF

Remove a project member from a project given the project ID and the member ID

curl -XPOST -H "X-ApiToken: token" -H "Content-Type: application/json" -d@- https://api.fulcrumapp.com/api/v2/memberships/change_permissions.json <<EOF
{
  "change": {
    "type": "project_members",
    "project_id": "3751f03b-043d-48bf-a6cc-747ddd36b777",
    "remove": [ "ba8849a2-3d10-47bf-9287-28c05a16a888" ]
  }
}
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment