-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathapiary.apib
6600 lines (4782 loc) · 284 KB
/
apiary.apib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
FORMAT: 1A
# Enable API
Enable API is a service for integrating with Virtual College's Enable platform. It is available at: https://external-api.vc-enable.co.uk/.
The Enable API can be used to retrieve information that is stored within Enable, as well as carrying out several actions. See the documentation below for what is available via this API. In the vast majority of cases, custom development work will be required to be carried out by customers to interact with this API.
The API is designed to be used by other pieces of software, with the aim to support integration with other systems. Whilst the API can be used manually (via an interface such as [Postman](https://www.getpostman.com/)), we expect most users to have custom software written to call the API. The API (or Enable) cannot communicate directly with other systems, but the API has been made available so other systems can make use of it and perform the required actions.
# Usage
Every request to the API must specify the following headers:
- x-api-version: Allows the server to determine what version of the API should be used
- x-api-nonce: Used to protect against replay attacks. Every request must specify a nonce that is globally unique over a given period of time. This has a max-length of 450 characters. We suggest using a GUID to ensure that the nonce is unique.
Requests to API functions which require the client to authenticate must also specify the following headers:
- x-api-access-token: Used to authenticate the client and verify the source of API requests
**Remarks**
- Any request that does not specify x-api-version will return a 400
- Any request that specifies an unexpected x-api-version will return a 404
- Any request that does not specify x-api-nonce will return a 400
- Any request that specifies a nonce that has been used previously will return a 401
- Any request that requires authentication but does not specify x-api-access-token or specifies an invalid token will return a 401
- Tokens use the JSON Web Token format (http://jwt.io)
# Group Security
In order to authenticate with the API a client must first request an authorisation token
which must then be encrypted and signed using the client's secret key. The encrypted
payload must then be posted to the server to create an access token.
Access Tokens are time limited and will expire. When creating an access token the server
will return a timestamp of when the token will expire.
## Authorisation Token [/authorisation-tokens/{domainReference}]
Endpoint to retrieve a single Authorisation Token for use in creating an Access Token
+ Parameters
+ domainReference (required, Guid) ... The reference of the domain the client is trying to authenticate against
### Create an Authorisation Token [GET]
+ Request (application/json)
+ Header
x-api-version: 1.0
x-api-nonce: 2147483647
+ Response 201 (application/json)
{
"authorisationToken": "$2a$04$o9zKYcg8Fb8QdOqzCfAh6Ora4H//BZlYcjPFdUdYpti30rzynJ7Ca"
}
+ Response 401
+ Response 404
## Access Tokens [/access-tokens]
Access tokens used to authenticate a client with the API.
The *signedAuthorisationToken* property is made up from the *authorisationToken* returned from the previous call, then encoded using **JwtEncoder** as follows
```
var data = JsonConvert.DeserializeObject<Dictionary<string,string>>(signedAuthorisationToken);
JwtEncoder encoder = new JwtEncoder(new JWT.Algorithms.HMACSHA512Algorithm(), new JsonNetSerializer(), new JwtBase64UrlEncoder());
authToken = encoder.Encode(data, apiPublicKey);
```
where the *apiPublicKey* is the LMS public key.
### Create an Access Token [POST]
+ Request (application/json)
+ Header
x-api-version: 1.0
x-api-nonce: 2147483647
+ Body
{
"domainReference": "81cd217b-177e-43e2-94fd-eac424780a4f",
"signedAuthorisationToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEyMzQ1Njc4OTAsIm5hbWUiOiJKb2huIERvZSIsImFkbWluIjp0cnVlfQ.eoaDVGTClRdfxUZXiPs3f8FmJDkDE_VCQFXqKxpLsts"
}
+ Response 201 (application/json)
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEyMzQ1Njc4OTAsIm5hbWUiOiJKb2huIERvZSIsImFkbWluIjp0cnVlfQ.eoaDVGTClRdfxUZXiPs3f8FmJDkDE_VCQFXqKxpLsts",
"tokenExpiry": "2014-11-12T14:34:19.312Z"
}
+ Response 401
+ Response 404
# Group Users - Common
Common User related resources of the **Enable API**
**Who can use these endpoints?**
The endpoints in this section can be used by all customers, including those that have Enable configured to authenticate users with:
+ Email Address
+ Username
+ AD FS (SSO)
+ Azure AD (SSO)
For other endpoints relating to users, see <a href="#reference/users-standard-authentication">Users - Standard Authentication</a> for Email Address/Username domains, and <a href="#reference/users-sso-authentication">Users - SSO Authentication</a> for SSO domains.
## Find Users [/users/search]
Gets a list of users.
### Search [POST]
The parameters are -
+ `search` *(optional)* A free-text search that filters the list of users based on the first name, last name, user name and email address of the user (case insensitive).
+ `pageSize` *(optional, defaults to 12)* The number of items to return for a page
+ `pageNumber` *(optional, defaults to 1)* The requested page. This number is 1-based (such as the first page is `pageNumber: 1`)
+ `order` *(optional, defaults to AlphaAscending)* The order of the users. The available options are -
+ AlphaAscending
+ AlphaDescending
+ DateAscending
+ DateDescending
Returned properties are -
+ `totalUsers` The total number of users that match the current request, across all pages. This is an **INT**
+ `users` An array of users
+ `users\reference` The reference of the user within an LMS. This is a **GUID**
+ `users\firstName` This is the first name of the user
+ `users\lastName` This is the last name of the user
+ `users\emailAddress` This is the email address of the user
+ `users\userName` This is the user name of the user
+ `users\createdDate` This is the date and time at which the user was created. This date is **UTC**, according to **ISO 8601**
+ `users\isInactive` A boolean value to denote if the user is inactive or not
+ `users\providerUserKey` This is the security identifier of the AD FS/Azure AD user (only applicable for SSO AD domains)
+ `users\additional` An array of additional properties, including optional fields
+ `users\additional\name` The name of the property, in English
+ `users\additional\value` The value of the property. The type will be dependent on the type of the field itself
No results will return `totalUsers: 0` and an empty array.
+ Request (application/json)
+ Header
x-api-version: 1.0
x-api-nonce: 2147483647
x-api-access-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEyMzQ1Njc4OTAsIm5hbWUiOiJKb2huIERvZSIsImFkbWluIjp0cnVlfQ.eoaDVGTClRdfxUZXiPs3f8FmJDkDE_VCQFXqKxpLsts
x-api-language: en-GB
+ Body
{
"search": "user1",
"pageSize": 24,
"pageNumber": 1,
"order": "DateDescending"
}
+ Response 200 (application/json)
{
"totalUsers": 123,
"users":
[
{
"reference": "e9f2b0a5-01fd-4138-9451-e25ddaa70a7d",
"firstName": "Jamie",
"lastName": "Burns",
"userName": "[email protected]",
"emailAddress": "[email protected]",
"createdDate": "2012-04-23T18:25:43.511Z",
"isInactive": false
"providerUserKey":"",
"additional":
[
{
"name": "jobTitle",
"value": "Software Architect"
},
{
"name": "userStartDate",
"value": "01-Jan-2016"
}
]
},
{
"reference": "d9f2b0a5-01fd-4138-9451-e25ddaa70a7d",
"firstName": "Alex",
"lastName": "Woodhead",
"userName": "[email protected]",
"emailAddress": "[email protected]",
"createdDate": "2013-04-23T18:25:43.511Z",
"isInactive": true
"providerUserKey":"",
"additional": []
}
]
}
+ Response 401
+ Response 404
## Optional Fields [/users/optionalFields]
Gets the list of available optional fields
Returned properties are -
+ `name` The name of the optional field, in English
+ `type` The descriptive type of the optional field
The types available are -
+ `String` A string
+ `Number` A number
+ `Date` A date
+ `PassedDate` A date in the past
+ `PositiveNumber` A positive number
+ `NonLocalisedPassedDate` A date without time, which is in the past
+ `NonLocalisedDate` A date without time
### List [GET]
+ Request (application/json)
+ Header
x-api-version: 1.0
x-api-nonce: 2147483647
x-api-access-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEyMzQ1Njc4OTAsIm5hbWUiOiJKb2huIERvZSIsImFkbWluIjp0cnVlfQ.eoaDVGTClRdfxUZXiPs3f8FmJDkDE_VCQFXqKxpLsts
x-api-language: en-GB
+ Response 200 (application/json)
[
{
"name": "DateOfBirth",
"type": "Unlocalised date in the past",
},
{
"name": "JobTitle",
"type": "Text",
}
]
+ Response 401
+ Response 404
## Count Users - Current Day [/users/recentCount]
A count of the number of users added, and who have logged in, since midnight (UTC). This counts users across all domains for all customers.
Users who exist in multiple LMSs are counted only once.
### Retrieve recent count [GET]
+ Request (application/json)
+ Header
x-api-version: 1.0
x-api-nonce: 2147483647
x-api-access-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEyMzQ1Njc4OTAsIm5hbWUiOiJKb2huIERvZSIsImFkbWluIjp0cnVlfQ.eoaDVGTClRdfxUZXiPs3f8FmJDkDE_VCQFXqKxpLsts
x-api-language: en-GB
+ Response 200 (application/json)
{
123
}
+ Response 401
+ Response 404
## Count Users - Total [/users/count]
A count of the number of users added, and who have logged in, in total. This counts users across all domains for all customers.
Users who exist in multiple LMSs are counted only once.
### Retrieve total count [GET]
+ Request (application/json)
+ Header
x-api-version: 1.0
x-api-nonce: 2147483647
x-api-access-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEyMzQ1Njc4OTAsIm5hbWUiOiJKb2huIERvZSIsImFkbWluIjp0cnVlfQ.eoaDVGTClRdfxUZXiPs3f8FmJDkDE_VCQFXqKxpLsts
x-api-language: en-GB
+ Response 200 (application/json)
{
1234
}
+ Response 401
+ Response 404
# Group Users - Standard Authentication
User related resources of the **Enable API**
**Who can use these endpoints?**
The endpoints in this section can only be used by customers that have Enable configured to authenticate users with either:
+ Email Address
+ Username
Customers using **AD FS/Azure AD (SSO)** authentication, with **automatic synchronisation enabled**, will receive a 403 Forbidden error, and the endpoints in the <a href="#reference/users-sso-authentication">Users - SSO Authentication</a> section should be used instead.
Customers using **Azure AD (SSO)** with **automatic synchronisation disabled** will still be able to use these endpoints, however, please note that the user's email address should be used to identify the user. If multiple users found with the same email address in the domain, then user-specific endpoints will return a 404 Not Found error with a message indicating multiple users have been found.
## Create User [/users/]
Creates a new user
### Add [POST]
The parameters are -
+ `emailAddress` *(required)* The user's email address. Maximum 100 characters, and must be of a valid email address format. Email address must be unique.
+ `userName` *(required for domain using user name to identify the user)* The user's user name. Maximum 100 characters. User name must be unique.
+ `firstName` *(required)* The user's first name. Maximum 255 characters
+ `lastName` *(required)* This user's last name. Maximum 255 characters
+ `additional` *(required for mandatory fields and optional otherwise)* An array of name value pairs for optional fields
+ `additional\name` *(required)* The name of the property, in English
+ `additional\value` *(optional)* The value of the property. Maximum 255 characters. The type will be dependent on the type of the field itself
+ `groupReferences` *(optional)* An array of Groups (GUIDs) to add the user to. Users are only added to groups via this call, not removed.
+ `lineManagerReferences` *(optional)* An array of Users (GUIDs) to associate as Line Managers for the user. Line Managers are only added to Users via this call, not removed.
+ `sendWelcomeEmail` *(optional)* A boolean indicating whether the welcome email should be sent to the user. Defaults to true
Returned properties are -
+ `reference` The reference of the user within an LMS. This is a **GUID**
+ `firstName` This is the first name of the user
+ `lastName` This is the last name of the user
+ `emailAddress` This is the email address of the user
+ `userName` This is the user name of the user
+ `providerUserKey` This is the unique SSO identifier of the user
+ `createdDate` This is the date and time at which the user was created. This date is **UTC**, according to **ISO 8601**
+ `additional\name` *(required)* The name of the property, in English
+ `additional\value` *(optional)* The value of the property. The type will be dependent on the type of the field itself
+ Request (application/json)
+ Header
x-api-version: 1.0
x-api-nonce: 2147483647
x-api-access-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEyMzQ1Njc4OTAsIm5hbWUiOiJKb2huIERvZSIsImFkbWluIjp0cnVlfQ.eoaDVGTClRdfxUZXiPs3f8FmJDkDE_VCQFXqKxpLsts
x-api-language: en-GB
+ Body
{
"firstName": "Jamie",
"lastName": "Burns",
"emailAddress": "[email protected]",
"userName": "jb",
"additional":
[
{
"name": "jobTitle",
"value": "Software Architect"
},
{
"name": "userStartDate",
"value": "01-Jan-2016"
}
],
"groupReferences": ["e9f27sa5-01fd-4138-9451-e25ddaa70a7d","c9f2b0a5-01fd-4138-9451-e25ddaa70a9a"],
"lineManagerReferences": ["b2d3c693-9b0e-4842-bec2-38a82c9f5569","cc93f516-50ff-4376-be37-0682cf9b0671"]
}
+ Response 201 (application/json)
{
"reference": "e9f2b0a5-01fd-4138-9451-e25ddaa70a7d",
"firstName": "Jamie",
"lastName": "Burns",
"emailAddress": "[email protected]",
"userName": "jb",
"createdDate": "2012-04-23T18:25:43.511Z",
"additional":
[
{
"name": "jobTitle",
"value": "Software Architect"
},
{
"name": "userStartDate",
"value": "01-Jan-2016"
}
]
}
+ Response 401
{
"Error description 1",
"Error description 2"
}
+ Response 403
This endpoint cannot be used for domains configured with SSO
+ Response 404
## Manage User Details [/users/{userIdentifier}]
Gets or updates the details of a specific user. It does not change the status of the user.
The parameters are -
+ `userIdentifier` *(required)* The exact email address (for domains using email to identify users) or user name (for domains using user name to identify users) to search by (case insensitive). This value must be encoded for use in URIs - e.g. the @ character should be replaced with %40
Returned properties are -
+ `reference` The reference of the user within an LMS. This is a **GUID**
+ `firstName` This is the first name of the user
+ `lastName` This is the last name of the user
+ `emailAddress` This is the email address of the user
+ `userName` This is the user name of the user
+ `providerUserKey` This is the unique SSO identifier of the user
+ `createdDate` This is the date and time at which the user was created. This date is **UTC**, according to **ISO 8601**
+ `users\isInactive` A boolean value to denote if the user is inactive or not
+ `additional` An array of optional fields
+ `additional\name` The name of the property, in English
+ `additional\value` The value of the property. The type will be dependent on the type of the field itself
When updating, only the following properties can be changed -
+ `firstName` *(required)* This can be freely changed. Maximum 255 characters
+ `lastName` *(required)* This can be freely changed. Maximum 255 characters
+ `emailAddress` *(required)* This can only be changed if the user with the same email address does not exist in other LMSs. Maximum 100 characters. Email address must be unique.
+ `userName` *(required for domains using user name to identify the user)* This can only be changed if the user with the same user name does not exist in current LMSs. Maximum 100 characters. User name must be unique.
+ `additional` *(required for missing mandatory fields and optional otherwise)* An array of optional fields. If a mandatory field does not already exists for the user and not providing it while updating, will throw an error. Other fields not provided in the list will remain unchanged when persisted
+ `additional\name` *(required)* The name of the property, in English
+ `additional\value` *(optional)* The value of the property. The type will be dependent on the type of the field itself
+ `groupReferences` *(optional)* An array of Groups (GUIDs) to add the user to. Users are only added to groups via this call, not removed.
+ `lineManagerReferences` *(optional)* An array of Users (GUIDs) to associate as Line Managers for the user. Line Managers are only added to Users via this call, not removed.
When patching, only the following properties can be changed -
+ `firstName` *(optional)* This can be freely changed. Maximum 255 characters
+ `lastName` *(optional)* This can be freely changed. Maximum 255 characters
+ `emailAddress` *(optional)* This can only be changed if the user with the same email address does not exist in other LMSs. Maximum 100 characters
+ `userName` *(optional)* This can only be changed if the user with the same user name does not exist in current LMSs. Maximum 100 characters
### Find [GET]
+ Request (application/json)
+ Header
x-api-version: 1.0
x-api-nonce: 2147483647
x-api-access-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEyMzQ1Njc4OTAsIm5hbWUiOiJKb2huIERvZSIsImFkbWluIjp0cnVlfQ.eoaDVGTClRdfxUZXiPs3f8FmJDkDE_VCQFXqKxpLsts
x-api-language: en-GB
+ Response 200 (application/json)
{
"reference": "e9f2b0a5-01fd-4138-9451-e25ddaa70a7d",
"firstName": "Jamie",
"lastName": "Burns",
"userName": "[email protected]",
"emailAddress": "[email protected]",
"createdDate": "2012-04-23T18:25:43.511Z",
"isInactive" : false,
"additional":
[
{
"name": "jobTitle",
"value": "Software Architect"
},
{
"name": "userStartDate",
"value": "01-Jan-2016"
}
]
}
+ Response 401
+ Response 403
This endpoint cannot be used for domains configured with SSO
+ Response 404
### Update [PUT]
+ Request (application/json)
+ Header
x-api-version: 1.0
x-api-nonce: 2147483647
x-api-access-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEyMzQ1Njc4OTAsIm5hbWUiOiJKb2huIERvZSIsImFkbWluIjp0cnVlfQ.eoaDVGTClRdfxUZXiPs3f8FmJDkDE_VCQFXqKxpLsts
x-api-language: en-GB
+ Body
{
"firstName": "Jamie",
"lastName": "Burns",
"emailAddress": "[email protected]",
"userName": "[email protected]",
"additional":
[
{
"name": "jobTitle",
"value": "Software Architect"
}
],
"groupReferences": ["e9f27sa5-01fd-4138-9451-e25ddaa70a7d","c9f2b0a5-01fd-4138-9451-e25ddaa70a9a"],
"lineManagerReferences": ["b2d3c693-9b0e-4842-bec2-38a82c9f5569","cc93f516-50ff-4376-be37-0682cf9b0671"]
}
+ Response 200 (application/json)
{
"userInstanceAccountReference": "e9f2b0a5-01fd-4138-9451-e25ddaa70a7d",
"firstName": "Jamie",
"lastName": "Burns",
"emailAddress": "[email protected]",
"userName": "[email protected]",
"createdDate": "2012-04-23T18:25:43.511Z",
"isInactive": true,
"additional":
[
{
"name": "jobTitle",
"value": "Software Architect"
},
{
"name": "userStartDate",
"value": "01-Jan-2016"
}
]
}
+ Response 401
{
"Error description 1",
"Error description 2"
}
+ Response 403
This endpoint cannot be used for domains configured with SSO
+ Response 404
### Patch [PATCH]
+ Request (application/merge-patch+json)
+ Header
x-api-version: 1.0
x-api-nonce: 2147483647
x-api-access-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEyMzQ1Njc4OTAsIm5hbWUiOiJKb2huIERvZSIsImFkbWluIjp0cnVlfQ.eoaDVGTClRdfxUZXiPs3f8FmJDkDE_VCQFXqKxpLsts
x-api-language: en-GB
+ Body
{
"firstName": "Test",
"lastName": "User"
}
+ Response 200 (application/json)
{
"userInstanceAccountReference": "e9f2b0a5-01fd-4138-9451-e25ddaa70a7d",
"firstName": "Test",
"lastName": "User",
"emailAddress": "[email protected]",
"userName": "[email protected]",
"createdDate": "2012-04-23T18:25:43.511Z",
"isInactive": true,
"additional":
[
{
"name": "jobTitle",
"value": "Software Architect"
},
{
"name": "userStartDate",
"value": "01-Jan-2016"
}
]
}
+ Response 401
{
"Error description 1",
"Error description 2"
}
+ Response 403
This endpoint cannot be used for domains configured with SSO
+ Response 404
### Delete [DELETE]
+ Request (application/json)
+ Header
x-api-version: 1.0
x-api-nonce: 2147483647
x-api-access-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEyMzQ1Njc4OTAsIm5hbWUiOiJKb2huIERvZSIsImFkbWluIjp0cnVlfQ.eoaDVGTClRdfxUZXiPs3f8FmJDkDE_VCQFXqKxpLsts
x-api-language: en-GB
+ Response 200 (application/json)
+ Response 401
+ Response 403
This endpoint cannot be used for domains configured with SSO
+ Response 404
## Set Inactive [/users/{userIdentifier}/SetInactive]
Set a user as inactive.
### SetInactive [POST]
The parameters are -
+ `userIdentifier` *(required)* The exact email address (for domains using email to identify users) or user name (for domains using user name to identify users).
+ Request (application/json)
+ Header
x-api-version: 1.0
x-api-nonce: 2147483647
x-api-access-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEyMzQ1Njc4OTAsIm5hbWUiOiJKb2huIERvZSIsImFkbWluIjp0cnVlfQ.eoaDVGTClRdfxUZXiPs3f8FmJDkDE_VCQFXqKxpLsts
x-api-language: en-GB
+ Body
+ Response 201 (application/json)
"User Deactivated"
+ Response 401
+ Response 403
This endpoint cannot be used for domains configured with SSO
+ Response 404
+ Response 409
## Set Active [/users/{userIdentifier}/SetActive]
Set a user as active.
### SetActive [POST]
The parameters are -
+ `userIdentifier` *(required)* The exact email address (for domains using email to identify users) or user name (for domains using user name to identify users).
+ Request (application/json)
+ Header
x-api-version: 1.0
x-api-nonce: 2147483647
x-api-access-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEyMzQ1Njc4OTAsIm5hbWUiOiJKb2huIERvZSIsImFkbWluIjp0cnVlfQ.eoaDVGTClRdfxUZXiPs3f8FmJDkDE_VCQFXqKxpLsts
x-api-language: en-GB
+ Body
+ Response 201 (application/json)
"User Activated"
+ Response 401
+ Response 403
This endpoint cannot be used for domains configured with SSO
+ Response 404
+ Response 409
## Remove User From Groups [/users/{userIdentifier}/RemoveFromGroups]
Removes a user from a list of groups.
### Remove User From Groups [POST]
The parameters are -
+ `userIdentifier` *(required)* The exact email address (for domains using email to identify users) or user name (for domains using user name to identify users).
+ `references` *(required)* An array of references for each group the user is intended to be removed from
Removes the specified user from the groups. Accepts a list of references to identify the groups and an identifier for the target user.
If the user is not found an error will be returned.
If a group is not found for a specific reference, then that reference will be returned in an error.
+ Request (application/json)
+ Header
x-api-version: 1.0
x-api-nonce: 2147483647
x-api-access-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEyMzQ1Njc4OTAsIm5hbWUiOiJKb2huIERvZSIsImFkbWluIjp0cnVlfQ.eoaDVGTClRdfxUZXiPs3f8FmJDkDE_VCQFXqKxpLsts
x-api-language: en-GB
+ Body
{
"references":
[
"e9f2b0a5-01fd-4138-9451-e25ddaa70a7d",
"d9f2b0a5-01fd-4138-9451-e25ddaa70a7d"
]
}
+ Response 200
+ Response 400
[
"Cannot find group: e9f2b0a5-01fd-4138-9451-e25ddaa70a7d"
]
OR
[
"Cannot find user with username1"
]
+ Response 401
+ Response 403
This endpoint cannot be used for domains configured with SSO
+ Response 404
## Line Managers [/users/{userIdentifier}/LineManagers?includeInactive={false}&includeIndirect={true}]
Get line managers for a given user.
### Line Managers [GET]
The parameters are -
+ `userIdentifier` *(required)* The exact email address (for domains using email to identify users) or user name (for domains using user name to identify users).
+ `includeInactive` *(optional)* Whether inactive staff are included. Defaults to false.
+ `includeIndirect` *(optional)* Whether indirect staff are included. Defaults to true.
Returns a list filtered with the options provided.
Returned properties are -
+ `reference` The reference of the manager. This is a **GUID**
+ `level` The level of the manager, starting from **1** for a direct manager. This is an **INT**
+ `createdDate` This is the date the manager was assigned to the user. This date is **UTC**, according to **ISO 8601**.
If there are no line managers an empty list will be returned.
+ Request (application/json)
+ Header
x-api-version: 1.0
x-api-nonce: 2147483647
x-api-access-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEyMzQ1Njc4OTAsIm5hbWUiOiJKb2huIERvZSIsImFkbWluIjp0cnVlfQ.eoaDVGTClRdfxUZXiPs3f8FmJDkDE_VCQFXqKxpLsts
x-api-language: en-GB
+ Response 200
[
{
"reference" : "e3a637bd-6903-40a5-a89f-3a7fab6580d6",
"level": 1,
"createdDate": "2021-11-02T08:35:34.4"
},
{
"reference" : "4802c09f-2140-447b-83f1-42126bd3a030",
"level": 2,
"createdDate": "2022-11-02T08:35:34.4"
}
]
+ Response 400
[
"User for identifier '[email protected]' could not be found."
]
+ Response 401
+ Response 403
This endpoint cannot be used for domains configured with SSO
+ Response 404
### Line Managers (deprecated) [POST]
The parameters are -
+ `userIdentifier` *(required)* The exact email address (for domains using email to identify users) or user name (for domains using user name to identify users).
+ `userLineManagerRequestModel` *(required)* An object with obtions to filter line managers
Returns a list filtered with the options sent in the object model.
By Default IncludeInactive is set to false and IncludeIndirect is set to true.
If there are no line managers a empty list will be returned.
+ Request (application/json)
+ Header
x-api-version: 1.0
x-api-nonce: 2147483647
x-api-access-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEyMzQ1Njc4OTAsIm5hbWUiOiJKb2huIERvZSIsImFkbWluIjp0cnVlfQ.eoaDVGTClRdfxUZXiPs3f8FmJDkDE_VCQFXqKxpLsts
x-api-language: en-GB
+ Body
{
"IncludeInactive": false,
"IncludeIndirect": true
}
+ Response 200
[
{
"userId" : 1234,
"reference" : "e3a637bd-6903-40a5-a89f-3a7fab6580d6",
"level": 1,
"createdDate": "2021-11-02T08:35:34.4"
},
{
"userId" : 4321,
"reference" : "4802c09f-2140-447b-83f1-42126bd3a030",
"level": 2,
"createdDate": "2022-11-02T08:35:34.4"
}
]
+ Response 400
[
"Cannot find user with username1"
]
+ Response 401
+ Response 403
This endpoint cannot be used for domains configured with SSO
+ Response 404
## Staff [/users/{userIdentifier}/Staff?includeInactive={false}&includeIndirect={true}&includeAssignedByGroup={true}&includeAssignedByIndividual={true}]
Get staff for a given user.
### Staff [GET]
The parameters are -
+ `userIdentifier` *(required)* The exact email address (for domains using email to identify users) or user name (for domains using user name to identify users).
+ `includeInactive` *(optional)* Whether inactive staff are included. Defaults to false.
+ `includeIndirect` *(optional)* Whether indirect staff are included. Defaults to true.
+ `includeAssignedByGroup` *(optional)* Whether staff assigned via groups are included. Defaults to true.
+ `includeAssignedByIndividual` *(optional)* Whether staff assigned individually are included. Defaults to true.
Returns a list filtered with the options provided.
Returned properties are -
+ `reference` The reference of the staff member. This is a **GUID**
+ `level` The level of the staff, starting from **1** for a direct staff member. This is an **INT**
+ `createdDate` This is the date the staff member was assigned to the user. This date is **UTC**, according to **ISO 8601**.
If there is no staff an empty list will be returned.
+ Request (application/json)
+ Header
x-api-version: 1.0
x-api-nonce: 2147483647
x-api-access-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEyMzQ1Njc4OTAsIm5hbWUiOiJKb2huIERvZSIsImFkbWluIjp0cnVlfQ.eoaDVGTClRdfxUZXiPs3f8FmJDkDE_VCQFXqKxpLsts
x-api-language: en-GB
+ Response 200
[
{
"reference" : "e3a637bd-6903-40a5-a89f-3a7fab6580d6",
"level": 1,
"createdDate": "2021-11-02T08:35:34.4"
},
{
"reference" : "4802c09f-2140-447b-83f1-42126bd3a030",
"level": 2,
"createdDate": "2022-11-02T08:35:34.4"
}
]
+ Response 400
[
"User for identifier '[email protected]' could not be found."
]
+ Response 401
+ Response 403
This endpoint cannot be used for domains configured with SSO
+ Response 404
### Staff (deprecated) [POST]
The parameters are -
+ `userIdentifier` *(required)* The exact email address (for domains using email to identify users) or user name (for domains using user name to identify users).
+ `userStaffRequestModel` *(required)* An object with obtions to filter staff members
Returns a list filtered with the options sent in the object model.
By Default IncludeInactive is set to false and IncludeIndirect is set to true and IncludeAssignedByGroup is set to true and IncludeAssignedByIndividual is set to true.
If there are no line managers a empty list will be returned.
+ Request (application/json)
+ Header
x-api-version: 1.0
x-api-nonce: 2147483647
x-api-access-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEyMzQ1Njc4OTAsIm5hbWUiOiJKb2huIERvZSIsImFkbWluIjp0cnVlfQ.eoaDVGTClRdfxUZXiPs3f8FmJDkDE_VCQFXqKxpLsts
x-api-language: en-GB
+ Body
{
"userStaffRequestModel":
{
"IncludeInactive": false,
"IncludeIndirect": true,
"IncludeAssignedByGroup": true,
"IncludeAssignedByIndividual": true,
}
}
+ Response 200
[
{
"userId" : 1234,
"reference" : "e3a637bd-6903-40a5-a89f-3a7fab6580d6",
"level": 1,
"createdDate": "2021-11-02T08:35:34.4"
},
{
"userId" : 4321,
"reference" : "4802c09f-2140-447b-83f1-42126bd3a030",
"level": 2,
"createdDate": "2022-11-02T08:35:34.4"
}
]
+ Response 400
[
"Cannot find user with username1"
]
+ Response 401
+ Response 403
This endpoint cannot be used for domains configured with SSO
+ Response 404
## Groups [/users/{userIdentifier}/groups]
Manages multiple groups for a user.
**Who can use this endpoint?**
This endpoint can only be used by customers that have Enable configured to authenticate users with:
+ User Name and Email Address