### Get Users - Node.js Request Example Source: https://developer.peakon.com/reference/users This Node.js example shows how to fetch users from the Peakon API using the 'axios' library. It configures the request with the correct URL, method, and headers, demonstrating a common way to interact with the API in a JavaScript environment. ```javascript const axios = require('axios'); const options = { method: 'GET', url: 'https://api.peakon.com/api/scim/v2/Users', params: { startIndex: '1', count: '50' }, headers: { 'accept': 'application/json' } }; axios.request(options).then(function (response) { console.log(response.data); }).catch(function (error) { console.log(error); }); ``` -------------------------------- ### Get Users - PHP Request Example Source: https://developer.peakon.com/reference/users This PHP example demonstrates fetching users from the Peakon API using cURL. It configures the request with the target URL, pagination parameters, and the necessary 'Accept' header, providing a standard method for API interaction in PHP. ```php ``` -------------------------------- ### Get Users - Python Request Example Source: https://developer.peakon.com/reference/users This Python snippet shows how to get users from the Peakon API using the 'requests' library. It constructs the GET request with the base URL, query parameters for pagination, and the 'Accept' header, a common approach for making HTTP requests in Python. ```python import requests url = "https://api.peakon.com/api/scim/v2/Users" params = { "startIndex": "1", "count": "50" } headers = { "accept": "application/json" } response = requests.get(url, params=params, headers=headers) print(response.text) ``` -------------------------------- ### Get Users - Ruby Request Example Source: https://developer.peakon.com/reference/users This Ruby code snippet illustrates how to retrieve users from the Peakon API using the 'httparty' gem. It sets up the GET request with the appropriate URL, query parameters for pagination, and the 'Accept' header. ```ruby require 'httparty' response = HTTParty.get('https://api.peakon.com/api/scim/v2/Users?startIndex=1&count=50', headers: { 'accept' => 'application/json' }) puts response.body ``` -------------------------------- ### Get Users - cURL Request Example Source: https://developer.peakon.com/reference/users This snippet demonstrates how to make a GET request to the Peakon API to retrieve a list of users using cURL. It includes the base URL, query parameters for pagination (startIndex and count), and the expected Accept header. ```shell curl --request GET \ --url 'https://api.peakon.com/api/scim/v2/Users?startIndex=1&count=50' \ --header 'accept: application/json' ``` -------------------------------- ### Peakon API Contextual Route Example Source: https://developer.peakon.com/reference/get_scores-contexts-contextid-questions-group-group Demonstrates how to retrieve engagement overview data for a specific segment of the company. The `contextId` parameter specifies the segment, for example, `segment_149`. ```http GET /api/v1/engagement/contexts/segment_149/overview ``` -------------------------------- ### Get Schema Request (Ruby) Source: https://developer.peakon.com/reference/schemas Example Ruby code snippet to retrieve schema information using the Net::HTTP library. It demonstrates making a GET request to the specified API endpoint. ```ruby require 'net/http' require 'uri' uri = URI.parse('https://api.peakon.com/api/scim/v2/Schemas/id') request = Net::HTTP::Get.new(uri) request['accept'] = 'application/json' response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http| http.request(request) end puts response.body ``` -------------------------------- ### GET /api/scim/v2/Users Source: https://developer.peakon.com/reference/users Retrieves all provisioned users in the system. Supports pagination, filtering by userName, emails, externalId, and id. ```APIDOC ## GET /api/scim/v2/Users ### Description Returns all already provisioned users in the system. This operation supports pagination as described in the SCIM specification. It also supports filtering by `userName`, `emails`, `externalId`, `id` (internal Peakon ID). ### Method GET ### Endpoint https://{subdomain}.peakon.com/api/scim/v2/Users ### Parameters #### Query Parameters - **filter** (string) - Optional - Supports filtering by `userName`, `emails`, `externalId` and `id` (internal Peakon ID). - **startIndex** (int32) - Optional - Defaults to 1. Start index (1-based). - **count** (int32) - Optional - Defaults to 50. Page size. ### Request Example ```json { "example": "curl --request GET \ --url 'https://api.peakon.com/api/scim/v2/Users?startIndex=1&count=50' \ --header 'accept: application/json'" } ``` ### Response #### Success Response (200) - **Resources** (array of objects) - user list - **active** (boolean) - Defaults to false. user status - **addresses** (array of objects) - addresses - **emails** (array of objects) - required - **externalId** (string) - external unique resource id defined by provisioning client - **id** (string) - unique resource id - **name** (object) - required name object - **phoneNumbers** (array of objects) - phoneNumbers - **photos** (array of objects) - photos - **schemas** (array of strings) - required - **userName** (string) - required. MUST be same as work type email address - **meta** (object) - resource metadata - **itemsPerPage** (int64) - **schemas** (array of strings) - **startIndex** (int64) - **totalResults** (int64) #### Response Example ```json { "example": "{\"Resources\":[{\"active\":false,\"emails\":[{\"type\":\"work\",\"value\":\"user@example.com\"}],\"externalId\":\"ext123\",\"id\":\"peakon_id_1\",\"name\":{\"givenName\":\"John\",\"familyName\":\"Doe\"},\"schemas\":[\"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User\"],\"userName\":\"user@example.com\"}],\"itemsPerPage\":50,\"startIndex\":1,\"totalResults\":1}" } ``` #### Error Responses - **400 Bad Request**: `detail` (string), `schemas` (array of strings), `scimType` (string), `status` (string) - **401 Unauthorized**: `detail` (string), `schemas` (array of strings), `scimType` (string), `status` (string) - **403 Forbidden**: `detail` (string), `schemas` (array of strings), `scimType` (string), `status` (string) - **429 Too Many Requests**: `detail` (string), `schemas` (array of strings), `scimType` (string), `status` (string) - **500 Internal Server Error**: `detail` (string), `schemas` (array of strings), `scimType` (string), `status` (string) ``` -------------------------------- ### Get Users Source: https://developer.peakon.com/reference/searchviaget-1 Retrieves all provisioned users in the system. Supports pagination, filtering by userName, emails, externalId, and id. ```APIDOC ## GET /websites/developer_peakon/users ### Description Returns all already provisioned users in the system. This operation supports pagination as described in [the SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.4.2.4). It also supports filtering by `userName`, `emails`, `externalId`, `id` (internal Peakon ID). ### Method GET ### Endpoint /websites/developer_peakon/users ### Parameters #### Query Parameters - **startIndex** (integer) - Optional - The starting index of the user list. Defaults to 1. - **count** (integer) - Optional - The number of users to return. Defaults to 50. - **filter** (string) - Optional - Filters users based on specified criteria (e.g., `userName eq "John Doe"`, `emails co "@example.com"`). - **sortBy** (string) - Optional - The attribute to sort users by (e.g., `userName`, `id`). - **sortOrder** (string) - Optional - The order of sorting (`ascending` or `descending`). Defaults to `ascending`. ### Request Example ``` GET /websites/developer_peakon/users?startIndex=1&count=10&filter=userName eq "Jane Doe" ``` ### Response #### Success Response (200) - **totalResults** (integer) - The total number of users available. - **startIndex** (integer) - The starting index of the returned user list. - **itemsPerPage** (integer) - The number of users returned in this response. - **Resources** (array) - An array of user objects. - **id** (string) - The internal Peakon ID of the user. - **userName** (string) - The username of the user. - **emails** (array) - An array of email objects for the user. - **value** (string) - The email address. - **type** (string) - The type of email (e.g., 'work'). - **externalId** (string) - The external identifier for the user. - **name** (object) - The name object for the user. - **givenName** (string) - The first name. - **familyName** (string) - The last name. #### Response Example ```json { "totalResults": 100, "startIndex": 1, "itemsPerPage": 10, "Resources": [ { "id": "user123", "userName": "john.doe", "emails": [ { "value": "john.doe@example.com", "type": "work" } ], "externalId": "ext456", "name": { "givenName": "John", "familyName": "Doe" } } ] } ``` ``` -------------------------------- ### GET /websites/developer_peakon Source: https://developer.peakon.com/reference/get_actions-contexts-contextid Retrieves a list of actions related to developer feedback, with options for filtering by driver and segment. ```APIDOC ## GET /websites/developer_peakon ### Description Retrieves a list of actions related to developer feedback. This endpoint allows filtering by specific drivers and segments to refine the results. ### Method GET ### Endpoint /websites/developer_peakon ### Parameters #### Query Parameters - **filter[driver]** (string) - Optional - Filters results by driver. Allowed values: "accomplishment", "autonomy", "engagement", "environment", "free_opinions", "goal_setting", "growth", "management_support", "meaningful_work", "organisational_fit", "peer_relationship", "recognition", "reward", "strategy", "workload". - **filter[segment.segmentId]** (integer) - Optional - Filters results by segment ID. - **filter[subdriver]** (string) - Optional - Filters results by subdriver. Allowed values include: "accomplishment", "alignment", "belief", "burnout", "career_development", "career_path", "challenging", "collaboration", "communication", "distributive_fairness", "efficacy", "equality", "equipment", "expectancy_theory", "focus", "friendly", "health", "how", "impact", "informal", "interactional_fairness", "job_fit", "job_significance", "known_expectations", "learning", "loyalty", "manager", "meaningful_work", "mentoring", "mission", "openness", "opportunity", "performance", "procedural_fairness", "recognition", "response", "satisfaction", "strategy", "support", "team", "values", "when", "where". ### Request Example ```json { "example": "No request body for GET requests" } ``` ### Response #### Success Response (200) - **data** (array) - An array of action objects, each conforming to the JSONAPI resource object specification. - **type** (string) - The type of the resource. - **id** (string) - The unique identifier for the action. - **attributes** (object) - Contains the attributes of the action. - **driver** (string) - The main driver associated with the action. Enum values: "accomplishment", "autonomy", "engagement", "environment", "free_opinions", "goal_setting", "growth", "management_support", "meaningful_work", "organisational_fit", "peer_relationship", "recognition", "reward", "strategy", "workload". - **subdriver** (string) - The specific subdriver associated with the action. Enum values include: "accomplishment", "advocacy", "alignment", "belief", "burnout", "career_development", "career_path", "challenging", "collaboration", "communication", "distributive_fairness", "efficacy", "equality", "equipment", "expectancy_theory", "focus", "friendly", "health", "how", "impact", "informal", "interactional_fairness", "job_fit", "job_significance", "known_expectations", "learning", "loyalty", "manager", "meaningful_work", "mentoring", "mission", "openness", "opportunity", "performance", "procedural_fairness", "recognition", "response", "satisfaction", "strategy", "support", "team", "values", "when", "where". #### Response Example ```json { "data": [ { "type": "actions", "id": "action-123", "attributes": { "driver": "engagement", "subdriver": "collaboration" } } ] } ``` ``` -------------------------------- ### GET /Users Source: https://developer.peakon.com/reference/searchviaget-1 Retrieves a list of provisioned users. Supports pagination, filtering by userName, emails, externalId, and id. ```APIDOC ## GET /Users ### Description Returns all already provisioned users in the system. This operation supports pagination as described in [the SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.4.2.4). It also supports filtering by `userName`, `emails`, `externalId`, `id` (internal Peakon ID). ### Method GET ### Endpoint https://{subdomain}.peakon.com/api/scim/v2/Users ### Parameters #### Query Parameters - **filter** (string) - Optional - Supports filtering by `userName`, `emails`, `externalId` and `id` (internal Peakon ID) - **startIndex** (integer) - Optional - start index (1-based), defaults to 1 - **count** (integer) - Optional - page size, defaults to 50 ### Response #### Success Response (200) - **Resources** (array) - user list - **active** (boolean) - user status, defaults to false - **addresses** (array) - list of addresses - **country** (string) - **locality** (string) - **postalCode** (string) - **region** (string) - **streetAddress** (string) - **type** (string) - enum: ["work"] - **emails** (array) - list of emails - **type** (string) - enum: ["work"] - **value** (string) #### Response Example ```json { "Resources": [ { "active": true, "emails": [ { "type": "work", "value": "user@example.com" } ], "name": { "givenName": "John", "familyName": "Doe" }, "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User" ], "userName": "john.doe" } ] } ``` ``` -------------------------------- ### GET /users Source: https://developer.peakon.com/reference/searchviaget-1 Retrieves a list of users. Supports pagination and filtering. ```APIDOC ## GET /users ### Description Retrieves a list of users. Supports pagination and filtering. ### Method GET ### Endpoint /users ### Query Parameters - **startIndex** (integer) - Optional - The index of the first result to return. - **itemsPerPage** (integer) - Optional - The number of results per page. ### Response #### Success Response (200) - **totalResults** (integer) - The total number of results. - **startIndex** (integer) - The starting index of the returned results. - **itemsPerPage** (integer) - The number of items per page. - **schemas** (array of strings) - The list of schemas used. - **Resources** (array of objects) - A list of user resources. - **active** (boolean) - Optional - User status, defaults to false. - **addresses** (array of objects) - Optional - User addresses. - **country** (string) - Optional - Country. - **locality** (string) - Optional - Locality. - **postalCode** (string) - Optional - Postal code. - **region** (string) - Optional - Region. - **streetAddress** (string) - Optional - Street address. - **type** (string) - Required - Type of address (e.g., "work"). - **emails** (array of objects) - Required - User emails. - **type** (string) - Required - Type of email (e.g., "work"). #### Response Example ```json { "totalResults": 1, "startIndex": 0, "itemsPerPage": 10, "schemas": [ "urn:ietf:params:scim:api:messages:2.0:ListResponse" ], "Resources": [ { "active": true, "addresses": [ { "country": "USA", "locality": "San Francisco", "postalCode": "94107", "region": "CA", "streetAddress": "100 Main St", "type": "work" } ], "emails": [ { "type": "work", "value": "test@example.com" } ], "name": { "familyName": "Smith", "givenName": "John" }, "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User" ], "userName": "john.smith", "meta": { "created": "2023-01-01T12:00:00Z", "lastModified": "2023-01-01T12:00:00Z", "location": "/Users/123", "resourceType": "User" } } ] } ``` ``` -------------------------------- ### GET /websites/developer_peakon/users Source: https://developer.peakon.com/reference/searchviaget-1 Retrieves a list of users. Supports pagination and filtering. ```APIDOC ## GET /websites/developer_peakon/users ### Description Retrieves a list of users. Supports pagination and filtering. ### Method GET ### Endpoint /websites/developer_peakon/users ### Parameters #### Query Parameters - **startIndex** (integer) - Optional - The starting index of the user list. - **count** (integer) - Optional - The number of users to return per page. - **filter** (string) - Optional - Filters the user list based on specified criteria. ### Response #### Success Response (200) - **schemas** (array) - Contains the schema URI for the list response. - **totalResults** (integer) - The total number of users available. - **startIndex** (integer) - The starting index of the returned user list. - **itemsPerPage** (integer) - The number of users returned per page. - **Resources** (array) - An array of user objects, each containing user details and metadata. #### Response Example ```json { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:ListResponse" ], "totalResults": 1, "startIndex": 0, "itemsPerPage": 1, "Resources": [ { "id": "2800b802-30e7-4045-8477-57053130637f", "userName": "testUser", "name": { "givenName": "Test", "familyName": "User" }, "active": true, "emails": [ { "value": "test@example.com", "type": "work", "primary": true } ], "meta": { "created": "2023-01-01T10:00:00Z", "lastModified": "2023-01-01T10:00:00Z", "location": "/Users/2800b802-30e7-4045-8477-57053130637f", "resourceType": "User" } } ] } ``` #### Error Response (400) - **schemas** (array) - Contains the schema URI for the error response. - **status** (string) - The HTTP status code. - **scimType** (string) - The specific SCIM error type. - **detail** (string) - A detailed error message. #### Response Example ```json { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:Error" ], "status": "400", "scimType": "invalidFilter", "detail": "Invalid filter syntax provided." } ``` ``` -------------------------------- ### GET /ServiceProviderConfig Source: https://developer.peakon.com/reference/getserviceproviderconfig-1 Retrieves the service provider's configuration, including supported features and parameters for SCIM operations. ```APIDOC ## GET /ServiceProviderConfig ### Description Retrieves the service provider's configuration, including supported features and parameters for SCIM operations. ### Method GET ### Endpoint https://{subdomain}.peakon.com/api/scim/v2/ServiceProviderConfig ### Parameters #### Query Parameters None ### Request Example ```json { "example": "No request body needed for GET request." } ``` ### Response #### Success Response (200) - **schemas** (array of strings) - The SCIM schema URIs supported by the service provider. - **authenticationSchemes** (object) - Details about the authentication schemes supported. - **bulk** (object) - Configuration for bulk operations. - **changePassword** (object) - Configuration for password change operations. - **etag** (object) - Configuration for ETag support. - **filter** (object) - Configuration for filtering capabilities. - **patch** (object) - Configuration for patch operations. - **sort** (object) - Configuration for sorting capabilities. #### Response Example ```json { "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig" ], "authenticationSchemes": { "authenticationSchemes": [ { "description": "OAuth 2.0 Bearer Token", "documentationUrl": "https://docs.peakon.com/docs/api/oauth2", "name": "oauth2", "specUrl": "https://tools.ietf.org/html/rfc6750" } ] }, "bulk": { "supported": false }, "changePassword": { "supported": false }, "etag": { "supported": false }, "filter": { "supported": false }, "patch": { "supported": false }, "sort": { "supported": false } } ``` ``` -------------------------------- ### GET /websites/developer_peakon Source: https://developer.peakon.com/reference/post_auth-application Retrieves information about the Developer Peakon integration, including bearer tokens and included resources. ```APIDOC ## GET /websites/developer_peakon ### Description Retrieves information about the Developer Peakon integration. This includes JWT bearer tokens for authentication and an array of included JSONAPI resources. ### Method GET ### Endpoint /websites/developer_peakon ### Parameters #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **data** (object) - Contains bearer token information. - **type** (string) - The type of the data object. - **id** (string) - The JWT token to use in the Authorization header of subsequent requests. - **included** (array) - An array of included JSONAPI resources. - **type** (string) - The type of the included resource. - **id** (string) - The ID of the included resource. #### Response Example ```json { "data": { "type": "bearerTokens", "id": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }, "included": [ { "type": "user", "id": "123e4567-e89b-12d3-a456-426614174000" } ] } ``` #### Error Response (404) - **description** (string) - The application integration with token string cannot be found. #### Error Response Example (404) ```json { "error": "The application integration with token string cannot be found" } ``` ``` -------------------------------- ### User Creation Response (201 Created) Source: https://developer.peakon.com/reference/createuser-1 Example of a successful response (HTTP 201 Created) when a user is created. It includes the full user object as defined by the schema, confirming the creation and providing the user's details. ```json { "description": "successfully created user", "content": { "application/json": { "schema": { "allOf": [ { "required": [ "emails", "name", "schemas", "userName" ], "type": "object", "properties": { "active": { "type": "boolean", "description": "user status", "default": false }, "addresses": { "type": "array", "items": { "required": [ "type" ], "type": "object", "properties": { "country": { "type": "string" }, "locality": { "type": "string" }, "postalCode": { "type": "string" }, "region": { "type": "string" }, "streetAddress": { "type": "string" }, "type": { "type": "string", "enum": [ "work" ] } }, "x-readme-ref-name": "Address" } }, "emails": { "type": "array", "items": { "required": [ "type", "value" ], "type": "object", "properties": { "type": { "type": "string", "enum": [ "work" ] }, "value": { "type": "string" } } } }, "schemas": { "type": "array", "items": { "type": "string", "enum": [ "urn:ietf:params:scim:schemas:core:2.0:User" ] } }, "userName": { "type": "string" } } } ] } } }, "required": false } ``` -------------------------------- ### Get Schema Request (PHP) Source: https://developer.peakon.com/reference/schemas Example PHP code snippet using cURL to fetch schema details from the Peakon API. This code configures and executes a GET request to the API. ```php ``` -------------------------------- ### Peakon API Authentication Example (Conceptual) Source: https://developer.peakon.com/reference/get_scores-contexts-contextid-questions-group-group Illustrates the process of obtaining an authorization token using an access token via the `/api/v1/auth/application` endpoint. The obtained authorization token is then used in the `Authorization` header for subsequent API requests. ```shell POST /api/v1/auth/application # Request Body (example): # { # "access_token": "YOUR_ACCESS_TOKEN" # } # Response Body (example): # { # "authorization_token": "YOUR_AUTHORIZATION_TOKEN" # } # Subsequent Request Header: # Authorization: Bearer YOUR_AUTHORIZATION_TOKEN ``` -------------------------------- ### Get Schema Request (Node.js) Source: https://developer.peakon.com/reference/schemas Example Node.js code snippet to fetch schema details from the Peakon API. This code uses the 'node-fetch' library to make an asynchronous GET request. ```javascript const fetch = require('node-fetch'); const options = { method: 'GET', headers: { 'accept': 'application/json' } }; fetch('https://api.peakon.com/api/scim/v2/Schemas/id', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); ``` -------------------------------- ### Get Schema Request (Python) Source: https://developer.peakon.com/reference/schemas Example Python code snippet using the 'requests' library to retrieve schema information from the Peakon API. It sends a GET request and prints the JSON response. ```python import requests url = "https://api.peakon.com/api/scim/v2/Schemas/id" headers = { "accept": "application/json" } response = requests.get(url, headers=headers) print(response.json()) ``` -------------------------------- ### POST /Users - Create User Source: https://developer.peakon.com/reference/createuser-1 Creates a new user in the Peakon system. Requires user details such as emails, name, and userName. ```APIDOC ## POST /Users ### Description Creates a new user in the Peakon system. Requires user details such as emails, name, and userName. ### Method POST ### Endpoint https://{subdomain}.peakon.com/api/scim/v2/Users ### Parameters #### Query Parameters None #### Request Body - **emails** (array) - Required - List of user email addresses. Each email object must contain 'type' (enum: 'work') and 'value' (string). - **name** (object) - Required - User's name object. Must contain 'familyName' (string) and 'givenName' (string). - **schemas** (array) - Required - Specifies the SCIM schema version, typically `["urn:ietf:params:scim:schemas:core:2.0:User"]`. - **userName** (string) - Required - The unique username for the user. - **active** (boolean) - Optional - User's active status. Defaults to false. - **addresses** (array) - Optional - List of user addresses. Each address object must contain 'type' (enum: 'work') and can include 'country', 'locality', 'postalCode', 'region', and 'streetAddress'. - **externalId** (string) - Optional - An external unique resource ID defined by the provisioning client. - **phoneNumbers** (array) - Optional - List of user phone numbers. Each phone number object must contain 'type' (enum: 'work', 'mobile', 'other') and 'value' (string). - **photos** (array) - Optional - List of user photos. Each photo object must contain 'type' and 'value'. ### Request Example ```json { "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"], "userName": "testuser@example.com", "name": { "familyName": "Doe", "givenName": "John" }, "emails": [ { "type": "work", "value": "john.doe@example.com" } ], "active": true } ``` ### Response #### Success Response (201 Created) - **id** (string) - The unique identifier for the created user. - **schemas** (array) - The SCIM schema version. - **userName** (string) - The username of the created user. - **name** (object) - The name object of the created user. - **emails** (array) - The emails array of the created user. - **active** (boolean) - The active status of the created user. - **meta** (object) - Metadata about the resource, including 'created' and 'lastModified' timestamps, and 'location'. #### Response Example ```json { "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"], "id": "a1b2c3d4e5f6", "userName": "testuser@example.com", "name": { "familyName": "Doe", "givenName": "John" }, "emails": [ { "type": "work", "value": "john.doe@example.com" } ], "active": true, "meta": { "created": "2023-10-27T10:00:00Z", "lastModified": "2023-10-27T10:00:00Z", "location": "https://api.peakon.com/api/scim/v2/Users/a1b2c3d4e5f6" } } ``` ``` -------------------------------- ### SCIM API User Discovery Response Example Source: https://developer.peakon.com/docs/building-a-scim-20-api-connector This JSON structure represents a successful response from the SCIM API when querying for an existing user. It includes details like the total number of results, items per page, and the user's resource object, which contains their unique ID and employee number. ```json { "schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"], "totalResults": 1, "itemsPerPage": 50, "startIndex": 1, "Resources": [{ "id": "employee_12345", "userName": "john@mycompany.com", "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": { "employeeNumber": "{Employee Number}" } }] } ``` -------------------------------- ### Get Schema Request (Shell/cURL) Source: https://developer.peakon.com/reference/schemas Example cURL request to retrieve schema information from the Peakon API. It specifies the HTTP method, URL, and the expected content type. ```shell curl --request GET \ --url https://api.peakon.com/api/scim/v2/Schemas/id \ --header 'accept: application/json' ``` -------------------------------- ### Get Engagement Overview Source: https://developer.peakon.com/reference/engagement-1 Retrieves the engagement overview for the entire company. This endpoint allows you to get a high-level summary of engagement metrics. ```APIDOC ## GET /api/v1/engagement/overview ### Description Retrieves the engagement overview for the entire company. ### Method GET ### Endpoint https://{subdomain}.peakon.com/api/v1/engagement/overview ### Parameters #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **engagement_score** (float) - The overall engagement score. - **participation_rate** (float) - The rate of participation in surveys. - **key_drivers** (array) - A list of key drivers affecting engagement. #### Response Example ```json { "engagement_score": 75.5, "participation_rate": 88.2, "key_drivers": [ { "name": "Manager Relationship", "score": 80.1 }, { "name": "Teamwork", "score": 78.9 } ] } ``` ``` -------------------------------- ### POST /websites/developer_peakon/users Source: https://developer.peakon.com/reference/createuser-1 Creates a new user within the Developer Peakon system. This endpoint allows for the creation of user profiles with detailed information such as emails, names, and addresses. ```APIDOC ## POST /websites/developer_peakon/users ### Description Creates a new user within the Developer Peakon system. This endpoint allows for the creation of user profiles with detailed information such as emails, names, and addresses. ### Method POST ### Endpoint /websites/developer_peakon/users ### Parameters #### Request Body - **emails** (array) - Required - An array of email objects for the user. - **type** (string) - Required - The type of email (e.g., "work"). - **value** (string) - Required - The email address. - **name** (object) - Required - The name object for the user. - **givenName** (string) - Optional - The user's first name. - **familyName** (string) - Optional - The user's last name. - **schemas** (array) - Required - An array of schema URNs. - **userName** (string) - Required - The username, which must be the same as the work email address. - **active** (boolean) - Optional - The status of the user (default: false). - **addresses** (array) - Optional - An array of address objects for the user. - **country** (string) - Optional - The country. - **locality** (string) - Optional - The city or locality. - **postalCode** (string) - Optional - The postal code. - **region** (string) - Optional - The state or region. - **streetAddress** (string) - Optional - The street address. - **type** (string) - Required - The type of address (e.g., "work"). - **photos** (array) - Optional - An array of photo objects for the user. - **type** (string) - Required - The type of photo (e.g., "photo"). - **value** (string) - Required - The URL or identifier for the photo. - **urn:ietf:params:scim:schemas:extension:enterprise:2.0:User** (object) - Optional - Enterprise-specific user information. - **department** (string) - Optional - The user's department. ### Request Example ```json { "emails": [ { "type": "work", "value": "john.doe@example.com" } ], "name": { "givenName": "John", "familyName": "Doe" }, "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User" ], "userName": "john.doe@example.com", "active": true, "addresses": [ { "type": "work", "country": "USA", "locality": "Anytown", "postalCode": "12345", "region": "CA", "streetAddress": "123 Main St" } ], "photos": [ { "type": "photo", "value": "http://example.com/photo.jpg" } ], "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": { "department": "Engineering" } } ``` ### Response #### Success Response (201) - **active** (boolean) - User status. - **addresses** (array) - An array of address objects for the user. - **emails** (array) - An array of email objects for the user. - **name** (object) - The name object for the user. - **schemas** (array) - An array of schema URNs. - **userName** (string) - The username. - **urn:ietf:params:scim:schemas:extension:enterprise:2.0:User** (object) - Enterprise-specific user information. #### Response Example ```json { "active": true, "addresses": [ { "country": "USA", "locality": "Anytown", "postalCode": "12345", "region": "CA", "streetAddress": "123 Main St", "type": "work" } ], "emails": [ { "type": "work", "value": "john.doe@example.com" } ], "name": { "familyName": "Doe", "givenName": "John" }, "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User" ], "userName": "john.doe@example.com", "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": { "department": "Engineering" } } ``` ``` -------------------------------- ### GET /api/scim/v2/Schemas/{id} Source: https://developer.peakon.com/reference/schemas Retrieves the schema details for a specific schema ID. This endpoint is part of the SCIM v2 API. ```APIDOC ## GET /api/scim/v2/Schemas/{id} ### Description Retrieves the schema details for a specific schema ID. This endpoint is part of the SCIM v2 API. ### Method GET ### Endpoint https://{subdomain}.peakon.com/api/scim/v2/Schemas/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier for the schema. #### Query Parameters None #### Request Body None ### Request Example ```bash curl --request GET \ --url https://api.peakon.com/api/scim/v2/Schemas/id \ --header 'accept: application/json' ``` ### Response #### Success Response (200) - **id** (string) - The schema ID. - **description** (string) - A description of the schema. - **schemas** (array of strings) - A list of schema URIs. - **attributes** (object) - An object detailing the attributes of the schema. (View Additional Properties) #### Response Example ```json { "id": "string", "description": "string", "schemas": [ "string" ], "attributes": {} } ``` ``` -------------------------------- ### OpenAPI Definition for Get Schema Endpoint Source: https://developer.peakon.com/reference/getschemas This JSON object defines the OpenAPI 3.0.1 specification for the SCIM 2.0 API. It details the 'Get schema' operation, including request parameters, response structures for successful operations, and supported content types (application/json and application/scim+json). ```json { "openapi": "3.0.1", "info": { "title": "SCIM 2.0 API", "description": "The Peakon SCIM 2.0 API", "version": "1.0.0" }, "servers": [ { "url": "https://{subdomain}.peakon.com/api/scim/v2", "variables": { "subdomain": { "description": "Unique subdomain assigned to your Peakon instance.", "default": "api" } } } ], "tags": [ { "name": "Schemas" } ], "paths": { "/Schemas/{id}": { "get": { "tags": [ "Schemas" ], "summary": "Get schema", "operationId": "getSchemas", "parameters": [ { "name": "id", "in": "path", "description": "schema id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "description": { "type": "string" }, "schemas": { "type": "array", "items": { "type": "string", "enum": [ "urn:ietf:params:scim:schemas:core:2.0:Schema" ] } }, "attributes": { "type": "array", "items": { "type": "object" } } }, "x-readme-ref-name": "Schema" } }, "application/scim+json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "description": { "type": "string" }, "schemas": { "type": "array", "items": { "type": "string", "enum": [ "urn:ietf:params:scim:schemas:core:2.0:Schema" ] } }, "attributes": { "type": "array", "items": { "type": "object" } } }, "x-readme-ref-name": "Schema" } } } } } } } } } ```