Quick Summary: This tutorial covers the GraphQL operations for creating, updating, and viewing people in your SkillsDB company, including migration paths from the legacy API.
Get List of People
- On the legacy API access the below API were used to retrieve list of employee/people details.
GET - {{baseURI}}/Personnel/Get/{{companyID}}?part={{part}}
- On the new GraphQL API the below query will be used to retrieve/list all people. Please refer to Filtering and Sorting documentations for more details about filtering and sorting.
Get Person/Employee by Email
- The legacy API uses the below API to retrive
GET - {{baseURI}}/Personnel/Get/Email/{{companyID}}?email={{email}}&part={{part}}
- On the new GraphQL API we’ll use the above query:
getAllPeoplewith the filter as follow:
Filter People created by specific user
- On the new GraphQL API we’ll use the above query:
getAllPeoplewith the filter as following:
To get the person Id of the current session user, use the below query with the JWT auth header:
Add or Update People/Employees
- On the legacy API the below API have been used to add or update a person profile:
POST - {{baseURI}}/Personnel/Insert/{{companyID}}
- On the new GraphQL API we’ll use the below Mutations to insert and update an employee/person.
Job Titlesand/or People Types to get our system Ids if those are being updated:
- To get Job Titles use the below query:
- To get all of the People Types in your company use the below query
- Finally update person using the below mutation:
- Provide the
AvoidUnassignmentForEmptyValues = trueso that the Manager, Job Title and People Type attributes do not get assigned null. If this field is not provided or is false, then these 3 attributes will be assigned null.- Always provide this value as true in every
editPersonrequest unless you want to unassign/set null. Notice on theeditPersonpayload there is no org schema definition (i.e. department, country, business regions. To assign and/or unassign org schemas please the below query and mutation to get org schemas and assign/unassign from person
- Always provide this value as true in every
- Get list of org schemas:
- Assign/attach org schemas to person:
- Unassign/detach org schema from person:
You can get org schemas attached to a person from
getAllPeople. i.e.PeopleCountries,PeopleDepartments,PeopleBusinessRegions.
- Provide the
Need Help?
If you run into any issues or have questions, reach out to your organization’s SkillsDB administrator or contact SkillsDB Support.