Skip to content

Latest commit

 

History

History
56 lines (48 loc) · 1.67 KB

V1_get_users.md

File metadata and controls

56 lines (48 loc) · 1.67 KB
copyright link is
Copyright IBM Corp. 2017
get-a-list-of-users
published

Get a list of users

Now that you can get information for one person, here is the GraphQL query to get information about a list of people. In this example, we are specifying an array of user IDs to get information for these specific users.

query getProfiles {
  people(id: ["user-id1", "user-id2"]) {
    items {
      id
      displayName
      email
    }
  }
}

Next, let's just grab the first ten users' information:

query getProfiles {
  people(first: 10) {
    items {
      id
      displayName
      email
    }
  }
}

Let's say you just want to get a list of users named 'Kevin'. This example GraphQL query shows how to return the first five users in a space named Kevin.

query getProfiles {
  people(name: "Kevin", first: 5) {
    items {
      id
      displayName
      email
    }
  }
}