Skip to content

Latest commit

 

History

History
192 lines (150 loc) · 8.82 KB

GroupsApi.md

File metadata and controls

192 lines (150 loc) · 8.82 KB

Merge.HRISClient.Api.GroupsApi

All URIs are relative to https://api.merge.dev/api/hris/v1

Method HTTP request Description
GroupsList GET /groups
GroupsRetrieve GET /groups/{id}

GroupsList

PaginatedGroupList GroupsList (string xAccountToken, DateTime? createdAfter = null, DateTime? createdBefore = null, string cursor = null, bool? includeDeletedData = null, bool? includeRemoteData = null, DateTime? modifiedAfter = null, DateTime? modifiedBefore = null, int? pageSize = null, string remoteFields = null, string remoteId = null, string showEnumOrigins = null, string types = null)

Returns a list of Group objects.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Merge.HRISClient.Api;
using Merge.HRISClient.Client;
using Merge.HRISClient.Model;

namespace Example
{
    public class GroupsListExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.merge.dev/api/hris/v1";
            // Configure API key authorization: tokenAuth
            config.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new GroupsApi(config);
            var xAccountToken = xAccountToken_example;  // string | Token identifying the end user.
            var createdAfter = 2013-10-20T19:20:30+01:00;  // DateTime? | If provided, will only return objects created after this datetime. (optional) 
            var createdBefore = 2013-10-20T19:20:30+01:00;  // DateTime? | If provided, will only return objects created before this datetime. (optional) 
            var cursor = cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw;  // string | The pagination cursor value. (optional) 
            var includeDeletedData = true;  // bool? | Whether to include data that was marked as deleted by third party webhooks. (optional) 
            var includeRemoteData = true;  // bool? | Whether to include the original data Merge fetched from the third-party to produce these models. (optional) 
            var modifiedAfter = 2013-10-20T19:20:30+01:00;  // DateTime? | If provided, only objects synced by Merge after this date time will be returned. (optional) 
            var modifiedBefore = 2013-10-20T19:20:30+01:00;  // DateTime? | If provided, only objects synced by Merge before this date time will be returned. (optional) 
            var pageSize = 56;  // int? | Number of results to return per page. (optional) 
            var remoteFields = type;  // string | Deprecated. Use show_enum_origins. (optional) 
            var remoteId = remoteId_example;  // string | The API provider's ID for the given object. (optional) 
            var showEnumOrigins = type;  // string | Which fields should be returned in non-normalized form. (optional) 
            var types = types_example;  // string | If provided, will only return groups of these types. Multiple values can be separated by commas. (optional) 

            try
            {
                PaginatedGroupList result = apiInstance.GroupsList(xAccountToken, createdAfter, createdBefore, cursor, includeDeletedData, includeRemoteData, modifiedAfter, modifiedBefore, pageSize, remoteFields, remoteId, showEnumOrigins, types);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling GroupsApi.GroupsList: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
xAccountToken string Token identifying the end user.
createdAfter DateTime? If provided, will only return objects created after this datetime. [optional]
createdBefore DateTime? If provided, will only return objects created before this datetime. [optional]
cursor string The pagination cursor value. [optional]
includeDeletedData bool? Whether to include data that was marked as deleted by third party webhooks. [optional]
includeRemoteData bool? Whether to include the original data Merge fetched from the third-party to produce these models. [optional]
modifiedAfter DateTime? If provided, only objects synced by Merge after this date time will be returned. [optional]
modifiedBefore DateTime? If provided, only objects synced by Merge before this date time will be returned. [optional]
pageSize int? Number of results to return per page. [optional]
remoteFields string Deprecated. Use show_enum_origins. [optional]
remoteId string The API provider's ID for the given object. [optional]
showEnumOrigins string Which fields should be returned in non-normalized form. [optional]
types string If provided, will only return groups of these types. Multiple values can be separated by commas. [optional]

Return type

PaginatedGroupList

Authorization

tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GroupsRetrieve

Group GroupsRetrieve (string xAccountToken, Guid id, bool? includeRemoteData = null, string remoteFields = null, string showEnumOrigins = null)

Returns a Group object with the given id.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Merge.HRISClient.Api;
using Merge.HRISClient.Client;
using Merge.HRISClient.Model;

namespace Example
{
    public class GroupsRetrieveExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.merge.dev/api/hris/v1";
            // Configure API key authorization: tokenAuth
            config.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new GroupsApi(config);
            var xAccountToken = xAccountToken_example;  // string | Token identifying the end user.
            var id = new Guid(); // Guid | 
            var includeRemoteData = true;  // bool? | Whether to include the original data Merge fetched from the third-party to produce these models. (optional) 
            var remoteFields = type;  // string | Deprecated. Use show_enum_origins. (optional) 
            var showEnumOrigins = type;  // string | Which fields should be returned in non-normalized form. (optional) 

            try
            {
                Group result = apiInstance.GroupsRetrieve(xAccountToken, id, includeRemoteData, remoteFields, showEnumOrigins);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling GroupsApi.GroupsRetrieve: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
xAccountToken string Token identifying the end user.
id Guid
includeRemoteData bool? Whether to include the original data Merge fetched from the third-party to produce these models. [optional]
remoteFields string Deprecated. Use show_enum_origins. [optional]
showEnumOrigins string Which fields should be returned in non-normalized form. [optional]

Return type

Group

Authorization

tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 -

[Back to top] [Back to API list] [Back to Model list] [Back to README]