Fork me on GitHub

Represents a user registered on Redu.

Attributes

Attribute Description
ID Identifier of user
login User login
email Email registered on Redu
first_name First name
last_name Last name
description Description of user
favorite_quotation Remarkable quotation
localization Where the user lives
mobile Cell phone
birthday Birthday
birth_localization Birthplace
friends_count Number of contacts
created_at Date of creation
updated_at Date of update
social_networks Registered social networks
interested_areas Areas of interest
thumbnails User thumbnails. Available dimenstions: 24×24, 32×32, 48×48, 90×90, 96×96, 110×110 e 160×160

Links

Link Description
self User in question
enrollments Enrollments
statuses Statuses posted on the user timeline
timeline Feed of updates from all accessible timelines
contacts Contacts
chats Conversations with their contacts
connections Connections with their contacts

Representation

{
    "last_name": "Lucena",
    "first_name": "Juliana",
    "birth_localization": "Recife, Pernambuco",
    "description": "Graduanda em Ciência da Computação",
    "favorite_quotation": "Frase marcante"
    "social_networks": [
        {
            "profile": "facebook.com/julianamlucena",
            "name": "facebook"
        },
        {
            "profile": "linkedin.com/in/julianalucena",
            "name": "linkedin"
        },
        {
            "profile": "twitter.com/#!/julianalucenaa",
            "name": "twitter"
        }
    ],
    "links": [
        {
            "href": "http://www.redu.com.br/api/users/julianalucena/enrollments",
            "rel": "enrollments"
        },
        {
            "href": "http://www.redu.com.br/api/users/julianalucena/statuses",
            "rel": "statuses"
        },
        {
            "href": "http://www.redu.com.br/api/users/julianalucena",
            "rel": "self"
        },
        {
            "href": "http://www.redu.com.br/api/users/julianalucena/chats",
            "rel": "chats"
        },
        {
            "href": "http://www.redu.com.br/api/users/julianalucena/statuses/timeline",
            "rel": "timeline"
        },
        {
            "href": "http://www.redu.com.br/api/users/julianalucena/contacts",
            "rel": "contacts"
        },
        {
            "href": "http://www.redu.com.br/api/users/julianalucena/connections",
            "rel": "connections"
        }
    ],
    "created_at": "2010-09-14T19:25:17-03:00",
    "friends_count": 118,
    "birthday": "1989-05-29",
    "localization": "Recife, Pernambuco",
    "login": "julianalucena",
    "thumbnails": [
        {
            "size": "24x24",
            "href": "http://s3.amazonaws.com/redu_uploads/users/avatars/8/thumb_24/juliana2.png?1351618261"
        },
        {
            "size": "110x110",
            "href": "http://s3.amazonaws.com/redu_uploads/users/avatars/8/thumb_110/juliana2.png?1351618261"
        },
        {
            "size": "32x32",
            "href": "http://s3.amazonaws.com/redu_uploads/users/avatars/8/thumb_32/juliana2.png?1351618261"
        },
        {
            "size": "160x160",
            "href": "http://s3.amazonaws.com/redu_uploads/users/avatars/8/thumb_160/juliana2.png?1351618261"
        },
        {
            "size": "90x90",
            "href": "http://s3.amazonaws.com/redu_uploads/users/avatars/8/thumb_90/juliana2.png?1351618261"
        },
        {
            "size": "48x48",
            "href": "http://s3.amazonaws.com/redu_uploads/users/avatars/8/thumb_48/juliana2.png?1351618261"
        },
        {
            "size": "96x96",
            "href": "http://s3.amazonaws.com/redu_uploads/users/avatars/8/thumb_96/juliana2.png?1351618261"
        }
    ],
    "interested_areas": [
        {
            "name": "Web"
        },
        {
            "name": "Educação"
        },
        {
            "name": "informática"
        }
    ],
    "email": "julianalucenaa@gmail.com",
    "updated_at": "2013-03-26T15:57:57-03:00",
    "id": 8,
    "mobile": ""
}

GET /api/users/:id

Returns a single user with the specified ID or login. Both login and ID work as unique identifiers for users, so they can be used as parameter here.

Authorization

You need to be contact of the user in question to access this resource.

Parameters

Parameter Description Restrictions
id ID or login of the user in question N/A

Example

Request:

GET /api/users/test_user

Response:

{
  "login": "guiocavalcanti",
    "first_name": "Guilherme",
    "links": [
    {
      "href": "http://www.redu.com.br/api/users/guiocavalcanti",
      "rel": "self"
    },
    {
      "href": "http://www.redu.com.br/api/users/guiocavalcanti/enrollments",
      "rel": "enrollments"
    },
    {
      "href": "http://www.redu.com.br/api/users/guiocavalcanti/statuses",
      "rel": "statuses"
    },
    {
      "href": "http://www.redu.com.br/api/users/guiocavalcanti/statuses/timeline",
      "rel": "timeline"
    },
    {
      "href": "http://www.redu.com.br/api/users/guiocavalcanti/contacts",
      "rel": "contacts"
    }
  ],
    "email": "contato@redu.com.br",
    "birthday": "1987-11-24",
    "last_name": "Cavalcanti",
    "friends_count": 132,
    "id": 4,
    "mobile": "+55 (81) 3224-2994",
    "thumbnails": [
    {
      "href": "http://s3.amazonaws.com/redu_uploads/users/avatars/4/thumb_32/Guilherme3x4%20copy.jpg?1323711306",
      "size": "32x32"
    },
    {
      "href": "http://s3.amazonaws.com/redu_uploads/users/avatars/4/thumb_110/Guilherme3x4%20copy.jpg?1323711306",
      "size": "110x110"
    }
  ],
    "social_networks": [
    {
      "profile": "www.facebook.com/guiocavalcanti",
      "name": "facebook"
    },
    {
      "profile": "br.linkedin.com/in/guiocavalcanti",
      "name": "linkedin"
    },
    {
      "profile": "www.twitter.com/guiocavalcanti",
      "name": "twitter"
    }
  ],
    "localization": "Recife, Brasil",
    "birth_localization": "Recife, Brasil"
}

GET /api/me

Returns a representation of the resource owner. Resource owner is the user who has authorized the application to use their data.

Example

Request:

GET /api/me

Response:

{
  "login": "guiocavalcanti",
    "first_name": "Guilherme",
    "links": [
    {
      "href": "http://www.redu.com.br/api/users/guiocavalcanti",
      "rel": "self"
    },
    {
      "href": "http://www.redu.com.br/api/users/guiocavalcanti/enrollments",
      "rel": "enrollments"
    },
    {
      "href": "http://www.redu.com.br/api/users/guiocavalcanti/statuses",
      "rel": "statuses"
    },
    {
      "href": "http://www.redu.com.br/api/users/guiocavalcanti/statuses/timeline",
      "rel": "timeline"
    },
    {
      "href": "http://www.redu.com.br/api/users/guiocavalcanti/contacts",
      "rel": "contacts"
    }
  ],
    "email": "contato@redu.com.br",
    "birthday": "1987-11-24",
    "last_name": "Cavalcanti",
    "friends_count": 132,
    "id": 4,
    "mobile": "+55 (81) 3224-2994",
    "thumbnails": [
    {
      "href": "http://s3.amazonaws.com/redu_uploads/users/avatars/4/thumb_32/Guilherme3x4%20copy.jpg?1323711306",
      "size": "32x32"
    },
    {
      "href": "http://s3.amazonaws.com/redu_uploads/users/avatars/4/thumb_110/Guilherme3x4%20copy.jpg?1323711306",
      "size": "110x110"
    }
  ],
    "social_networks": [
    {
      "profile": "www.facebook.com/guiocavalcanti",
      "name": "facebook"
    },
    {
      "profile": "br.linkedin.com/in/guiocavalcanti",
      "name": "linkedin"
    },
    {
      "profile": "www.twitter.com/guiocavalcanti",
      "name": "twitter"
    }
  ],
    "localization": "Recife, Brasil",
    "birth_localization": "Recife, Brasil"
}

GET /api/spaces/:space_id/users

Returns every user whose enrollment is in the approved state for the course to which the space is associated. You can, optionally, filter users by roles.

Authorization

You need to be enrolled in the course.

Parameters

Parameter Description Restrictions
space_id Space ID N/A
role User role in the course It may be one of these roles: member, teacher, environment_admin, tutor
partial It chooses a shorter representation for the user, only showing: id, first_name, and last_name true

Example

Request:

GET /api/space/1/users?role=member

Response:

[
{
  "login": "guiocavalcanti",
    "first_name": "Guilherme",
    "links": [
    {
      "href": "http://www.redu.com.br/api/users/guiocavalcanti",
      "rel": "self"
    },
    {
      "href": "http://www.redu.com.br/api/users/guiocavalcanti/enrollments",
      "rel": "enrollments"
    },
    {
      "href": "http://www.redu.com.br/api/users/guiocavalcanti/statuses",
      "rel": "statuses"
    },
    {
      "href": "http://www.redu.com.br/api/users/guiocavalcanti/statuses/timeline",
      "rel": "timeline"
    },
    {
      "href": "http://www.redu.com.br/api/users/guiocavalcanti/contacts",
      "rel": "contacts"
    }
  ],
    "email": "guilhermec@redu.com.br",
    "birthday": "1987-11-24",
    "last_name": "Cavalcanti",
    "friends_count": 132,
    "id": 4,
    "mobile": "+55 (81) 3224-2994",
    "thumbnails": [
    {
      "href": "http://s3.amazonaws.com/redu_uploads/users/avatars/4/thumb_32/Guilherme3x4%20copy.jpg?1323711306",
      "size": "32x32"
    },
    {
      "href": "http://s3.amazonaws.com/redu_uploads/users/avatars/4/thumb_110/Guilherme3x4%20copy.jpg?1323711306",
      "size": "110x110"
    }
  ],
    "social_networks": [
    {
      "profile": "www.facebook.com/guiocavalcanti",
      "name": "facebook"
    },
    {
      "profile": "br.linkedin.com/in/guiocavalcanti",
      "name": "linkedin"
    },
    {
      "profile": "www.twitter.com/guiocavalcanti",
      "name": "twitter"
    }
  ],
    "localization": "Recife, Brasil",
    "birth_localization": "Recife, Brasil"
},
{
  "login": "julianalucena",
  "first_name": "Juliana",
  "links": [
  {
    "href": "http://www.redu.com.br/api/users/julianalucena",
    "rel": "self"
  },
  {
    "href": "http://www.redu.com.br/api/users/julianalucena/enrollments",
    "rel": "enrollments"
  },
  {
    "href": "http://www.redu.com.br/api/users/julianalucena/statuses",
    "rel": "statuses"
  },
  {
    "href": "http://www.redu.com.br/api/users/julianalucena/statuses/timeline",
    "rel": "timeline"
  },
  {
    "href": "http://www.redu.com.br/api/users/julianalucena/contacts",
    "rel": "contacts"
  }
  ],
    "email": "juliana@redu.com.br",
    "birthday": "1989-05-29",
    "last_name": "Lucena",
    "friends_count": 84,
    "id": 8,
    "mobile": "",
    "thumbnails": [
    {
      "href": "http://s3.amazonaws.com/redu_uploads/users/avatars/8/thumb_32/twitter2_bigger.png?1297096068",
      "size": "32x32"
    },
    {
      "href": "http://s3.amazonaws.com/redu_uploads/users/avatars/8/thumb_110/twitter2_bigger.png?1297096068",
      "size": "110x110"
    }
  ],
    "social_networks": [
    {
      "profile": "facebook.com/julianamlucena",
      "name": "facebook"
    },
    {
      "profile": "linkedin.com/in/julianalucena",
      "name": "linkedin"
    },
    {
      "profile": "twitter.com/#!/julianalucenaa",
      "name": "twitter"
    }
  ],
    "localization": "Recife, Pernambuco",
    "birth_localization": "Recife, Pernambuco"
},
{
  "login": "jessicab",
  "first_name": "Jéssica",
  "links": [
  {
    "href": "http://www.redu.com.br/api/users/jessicab",
    "rel": "self"
  },
  {
    "href": "http://www.redu.com.br/api/users/jessicab/enrollments",
    "rel": "enrollments"
  },
  {
    "href": "http://www.redu.com.br/api/users/jessicab/statuses",
    "rel": "statuses"
  },
  {
    "href": "http://www.redu.com.br/api/users/jessicab/statuses/timeline",
    "rel": "timeline"
  },
  {
    "href": "http://www.redu.com.br/api/users/jessicab/contacts",
    "rel": "contacts"
  }
  ],
    "email": "jessica@redu.com.br",
    "birthday": "1991-01-10",
    "last_name": "Barbalho",
    "friends_count": 18,
    "id": 443,
    "mobile": "",
    "thumbnails": [
    {
      "href": "http://s3.amazonaws.com/redu_uploads/users/avatars/443/thumb_32/J%C3%A9ssica.jpg?1334865750",
      "size": "32x32"
    },
    {
      "href": "http://s3.amazonaws.com/redu_uploads/users/avatars/443/thumb_110/J%C3%A9ssica.jpg?1334865750",
      "size": "110x110"
    }
  ],
    "social_networks": [
    {
      "profile": "http://www.facebook.com/jessicabarbalho1",
      "name": "facebook"
    },
    {
      "profile": "https://twitter.com/#!/jessicabarbalho",
      "name": "twitter"
    }
  ],
    "localization": "Recife, PE",
    "birth_localization": "Recife, PE"
}
]