Web Services Reporting Developer Guide

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 25

DownloadWeb Services Reporting Developer Guide
Open PDF In BrowserView PDF
............................................................................................................................ 1
................................................................................................................................ 2
.............................................................................................................................................................. 2
............................................................................................................................................................. 3
.............................................................................................................................................. 4
.............................................................................................................................................................. 21
.................................................................................................................................. 21
................................................................................ 22
................................................................................ 22
.................................................................................................................................................. 23
........................................................................................................................................ 23
.................................................................................................................................................................. 24

25








25

http://en.wikipedia.org/wiki/Symmetric-key_algorithm.




o
o
o

25

static void getDocumentTypeList()
{
ApiClient client = new ApiClient(serverName, publicKey, privateKey);
try
{
var res = client.GetDocumentTypeList();
foreach (var r in res)
{
Console.WriteLine(r);
}
}
catch (Exception ex)
{
Console.WriteLine(ex.StackTrace);
}
}

25

Public Sub getDocumentTypeList()
Dim client As New ApiClient(serverName, publicKey, privateKey)
Try
Dim res = client.GetDocumentTypeList()
For Each r In res
Console.WriteLine(r)
Next

Catch ex As Exception
Console.WriteLine(ex.StackTrace)
End Try
End Sub

public static void getDocumentTypeList() {
ApiClient client = new ApiClient(serverName,publicKey,privateKey);
try {
String[] types = client.getDocumentTypeList();
for(int x=0;x --list [–p Param1=value1]

25

25

static void getParameterList(string documentType, ParameterValue[] parameters)
{
ApiClient client = new ApiClient(serverName, publicKey, privateKey);
try
{
var res = client.GetParameters(documentType, null, parameters);
ConsoleUtils.PrintTable(res.Parameters,
new string[] { "Name", "Prompt", "DataType" },
new int[] { FIELD_LENGTH, FIELD_LENGTH, FIELD_LENGTH });
}
catch (Exception ex)
{
Console.WriteLine(ex.StackTrace);
}
}

Public Sub getParameterList(documentType As String, parameters As ParameterValue())
Dim client As New ApiClient(serverName, publicKey, privateKey)
Try
Dim res = client.GetParameters(documentType, Nothing, parameters)
ConsoleUtils.PrintTable(res.Parameters,
New String() {"Name", "Prompt", "DataType"},
New Integer() {FIELD_LENGTH, FIELD_LENGTH, FIELD_LENGTH})
Catch ex As Exception
Console.WriteLine(ex.StackTrace)
End Try
End Sub

25

public static void getParameterList(String documentType, ParameterValue[] parameters)
{
ApiClient client = new ApiClient(serverName,publicKey,privateKey);
try {
ParameterList lst = client.getParameters(documentType, null, parameters);
ConsoleUtils.printTable(lst.Parameters,
new String[]{"Name","Prompt","DataType"},
new int[]{FIELD_LENGTH,FIELD_LENGTH,FIELD_LENGTH} );
} catch (Exception e) {
e.printStackTrace();
}
}

DocumentApiConsole.exe –t  --list -i

25

static void getParameterList(string documentType, string id,
ParameterValue[] parameters)
{
ApiClient client = new ApiClient(serverName, publicKey, privateKey);
try
{
var res = client.GetParameters(documentType,id, parameters);
ConsoleUtils.PrintTable(res.Parameters,
new string[] { "Name", "Prompt", "DataType" },
new int[] { FIELD_LENGTH, FIELD_LENGTH, FIELD_LENGTH });
}
catch (Exception ex)
{
Console.WriteLine(ex.StackTrace);
}
}

25

Public Sub getParameterList(documentType As String, id As String,
parameters As ParameterValue())
Dim client As New ApiClient(serverName, publicKey, privateKey)
Try
Dim res = client.GetParameters(documentType, id, parameters)
ConsoleUtils.PrintTable(res.Parameters,
New String() {"Name", "Prompt", "DataType"},
New Integer() {FIELD_LENGTH, FIELD_LENGTH, FIELD_LENGTH})
Catch ex As Exception
Console.WriteLine(ex.StackTrace)
End Try
End Sub

public static void getParameterList(String documentType,String id,ParameterValue[]
parameters) {
ApiClient client = new ApiClient(serverName,publicKey,privateKey);
try {
ParameterList lst = client.getParameters(documentType, id, parameters);
ConsoleUtils.printTable(lst.Parameters,
new String[]{"Name","Prompt","DataType"},
new int[]{FIELD_LENGTH,FIELD_LENGTH,FIELD_LENGTH} );
} catch (Exception e) {
e.printStackTrace();
}
}

DocumentApiConsole.exe –t  -r  -i

25

static void createDocument(string documentType, string id, ParameterValue[]
parameters)
{
ApiClient client = new ApiClient(serverName, publicKey, privateKey);
try
{
var res=client.CreateDocument(documentType, id, parameters);
ConsoleUtils.PrintTable(new DocumentItem[]{res},
new string[] { "DocumentName", "Id", "DocumentUrl"
},
new int[] { DOC_NAME_LENGTH, DOC_ID_LENGTH,
DOC_URL_LENGTH });
}
catch (Exception ex)
{
Console.WriteLine(ex.StackTrace);
}
}

25

Public Sub createDocument(documentType As String, id As String, parameters As
ParameterValue())
Dim client As New ApiClient(serverName, publicKey, privateKey)
Try
Dim res = client.CreateDocument(documentType, id, parameters)
ConsoleUtils.PrintTable(New DocumentItem() {res},
New String() {"DocumentName", "Id",
"DocumentUrl"},
New Integer() {DOC_NAME_LENGTH, DOC_ID_LENGTH,
DOC_URL_LENGTH})
Catch ex As Exception
Console.WriteLine(ex.StackTrace)
End Try
End Sub

public static void createDocument(String documentType, String id, ParameterValue[]
parameters) {
ApiClient client = new ApiClient(serverName,publicKey,privateKey);
try {
DocumentItem i = client.createDocument(documentType, id, parameters);
List lst = new ArrayList();
lst.add(i);
ConsoleUtils.printTable(lst,
new String[]{"DocumentName","Id","DocumentUrl"},
new int[]{DOC_NAME_LENGTH,DOC_ID_LENGTH,DOC_URL_LENGTH} );
} catch (Exception e) {
e.printStackTrace();
}
}

DocumentApiConsole.exe –t  -c

25

[–p Param1=value1]

static void getDocument(string documentType, string id, ParameterValue[] parameters,
string localPath)
{
ApiClient client = new ApiClient(serverName, publicKey, privateKey);
try
{
client.GetDocument(documentType, id, localPath, parameters);
}
catch (Exception ex)
{
Console.WriteLine(ex.StackTrace);
}
}

Public Sub getDocument(documentType As String, id As String, parameters As
ParameterValue(), localPath As String)
Dim client As New ApiClient(serverName, publicKey, privateKey)
Try
client.GetDocument(documentType, id, localPath, parameters)
Catch ex As Exception
Console.WriteLine(ex.StackTrace)
End Try
End Sub

25

public static void getDocument(String documentType, String id, ParameterValue[]
parameters, String localPath){
ApiClient client = new ApiClient(serverName,publicKey,privateKey);
try {
client.getDocument(documentType, id, parameters, localPath);
} catch (Exception e) {
e.printStackTrace();
}
}

DocumentApiConsole.exe –t  -r  --local-path 

25

static void deleteDocument(string documentType, string id)
{
ApiClient client = new ApiClient(serverName, publicKey, privateKey);
try
{
client.DeleteDocument(documentType, id);
}
catch (Exception ex)
{
Console.WriteLine(ex.StackTrace);
}
}

Public Sub deleteDocument(documentType As String, id As String )
Dim client As New ApiClient(serverName, publicKey, privateKey)
Try
client.DeleteDocument(documentType, id)

Catch ex As Exception
Console.WriteLine(ex.StackTrace)
End Try
End Sub

25

public static void deleteDocument (String documentType)
{
ApiClient client = new ApiClient(serverName,publicKey,privateKey);
try {
client.deleteDocument(documentType, id);
} catch (Exception e) {
e.printStackTrace();
}
}

DocumentApiConsole.exe –t  -d 

25

25

File

Description

NewtonSoft.Json.dll

Library included for Json handling

Paycor.Client.Connectivity.exe

The Paycor API Connectivity Test tool executable

Paycor.Documents.Client.dll
System.Net.Http.Formatting.dll

25

The System.Net.Http.Formatting contains classes for serializing and
deserializing HTTP message body in a format based on the requested media
type.

The Paycor API Connectivity Test Tool runs three simple tests to make sure that you are able to connect, able to
place a call to the Paycor server and able to authenticate using your public and private key.
First, the test tool will verify that you are able to connect to our server. If you encounter a failure at this point, you
will need to check your local network and firewall rules to assure that traffic to https://secure.paycor.com is not
blocked.
This first test will also provide you with the IP Address that Paycor has for your request. Because Paycor only allows
traffic from a set IP range, you will want to verify that this IP address is the expected value. Paycor will deny access
to any API calls that originate outside of the allowed range.
Next, the test tool will verify that your system is able to place a call to the Web Services Reporting API. The test tool
calls one of the methods that do not require authentication to verify that there are no obstacles between the two
systems.
Finally, using the public and private key provided, the test tool places a call to a secure method. This verifies that
your public and private keys are correct and that Paycor can authenticate traffic using these keys. If a failure results
from this call but the prior test is successful, the root cause is most likely an authentication error.

If you find that you must contact Paycor technical support for assistance with an API problem, please include the
test results from the connectivity tool. This will help Paycor troubleshoot your issue. To generate a text file with
these results, press the ‘Save Results’ button after running a test.
Please note that Paycor will only discuss credential or security issues with persons who have already been previously
cleared to represent the Paycor customer. You may need to contact someone in your business who already has
established the relationship with Paycor.

25

25

25



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.5
Linearized                      : No
Page Count                      : 25
Language                        : en-US
Tagged PDF                      : Yes
Author                          : bcraft
Creator                         : Microsoft® Word 2010
Create Date                     : 2014:05:13 08:23:54-04:00
Modify Date                     : 2014:05:13 08:23:54-04:00
Producer                        : Microsoft® Word 2010
EXIF Metadata provided by EXIF.tools

Navigation menu