User

User

User

Parameter Type Comment
$user_id (optional) int If no user_id provided you will reference the current user. If user_id is provided you can access public information (if available) or, as super-user, all information.

GET /user[/$user_id]

Returns user profile details

Public profile details

{
  "user": {
    "id": 2,
    "firstname": "Hans",
    "lastname": "Heid",
    "images": {
      "profile": {
        "href": "[API]/media/user/2",
        "type": "image/jpeg"
      }
    },
    "link": {
      "href": "[API]/user/2",
      "type": "application/json",
      "rel": "user"
    }
  }
}

Private profile details for logged in users or super user

{
  "user": {
    "id": 2,
    "firstname": "Hans",
    "lastname": "Heid",
    "email": "hans.heid@innosabi.com",
    "facebookId": "837664018",
    "images": {
      "profile": {
        "href": "[API]/media/user/2",
        "type": "image/jpeg"
      }
    },
    "link": {
      "href": "[API]/user/2",
      "type": "application/json",
      "rel": "user"
    }
  }
}

GET /user/credits[/$user_id]

Get a list of all credits from each project, a user has contributed to.

{
  "user": { PUBLIC USER DETAILS },
  "credits": [
    {
      "project": { PROJECT DETAILS },
      "values": {
        "suggestion": {
          "quantity": "2",
          "credits": 10
        },
        "suggestionComment": {
          "quantity": "0",
          "credits": 0
        },
        "suggestionLike": {
          "quantity": "3",
          "credits": 9
        },
        "mediaSuggestion": {
          "quantity": "0",
          "credits": 0
        },
        "suggestionVote": {
          "quantity": "0",
          "credits": 0
        },
        "userBacklinks": {
          "quantity": "0",
          "credits": 0
        }
      }
    },…
  }]
}

GET /user/invitations[/$user_id]

Get a list of projects, to which a user was invited.

{
  "user": { PUBLIC USER DETAILS },
  "projects": [
    { PROJECT DETAILS },
    …
  ]
}

GET /user/wall[/$user_id]

Get user wall records from bookmarked projects

Two different types are delivered:

  • notificationProject: project news
  • notificationSuggestion: new suggestions in a project with additional suggestion object
Parameter Type Comment
limit (optional) int (predefined value) 15
offset (optional) int (predefined value) 0
{
  "user": { PUBLIC USER DETAILS },
  "wallItems": [
    {
      "project": {
        "id": "3",
        "name": "Painpoints"
      },
      "content": "Neuer Test",
      "dtype": "notificationSuggestion",
      "rownum": "1",
      "diffTime": "4",
      "suggestion": {
        "id": "50",
        "content": "Neuer Test",
        "user": {
          "id": "2"
        }
      }
    },
    {
      "project": {
        "id": "1",
        "name": "Fahrsicherheit"
      },
      "content": "<p>Neue Beiträge</p>\n",
      "dtype": "notificationProject",
      "rownum": "1",
      "diffTime": "11",
      "suggestion": null
    },…
  ]
}