aboutsummaryrefslogtreecommitdiff
path: root/docs/API-Endpoints.md
blob: 503bfc429f144ee3149e941db4f4ad577b63405c (plain) (blame)
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
### Contents:
- [/api/User](#apiuser)
  - [/Login](#login)
  - [/Register](#register)
  - [/GetUser](#getuser)
  - [/ProfilePicture](#profilepicture)
  - [Get User By Id](#get-user-by-id)
  - [Update User By Id](#update-user-by-id)
  - [Delete User By Id](#delete-user-by-id)
- [/api/Role](#apirole)
  - [Create Role](#create-role)
  - [Get Role By Id](#get-role-by-id)
  - [Update Role By Id](#update-role-by-id)
  - [Delete Role By Id](#delete-role-by-id)
- [/api/Feed](#apifeed)
  - [/GetPosts](#getposts)
  - [/GetUserPosts](#getuserposts)
- [/api/Post](#apipost)
  - [Create Post](#create-post)
  - [Get Post By Id](#get-post-by-id)
  - [Update Post By Id](#update-post-by-id)
  - [Delete Post By Id](#delete-post-by-id)
- [/api/Comment](#apicomment)
  - [Create Comment](#create-comment)
  - [Get Comment By Id](#get-comment-by-id)
  - [Update Comment By Id](#update-comment-by-id)
  - [Delete Comment By Id](#delete-comment-by-id)
- [/api/Language](#apilanguage)
  - [/GetLanguages](#getlanguages)
  - [Create Language](#create-language)
  - [Get Language By Id](#get-language-by-id)
  - [Update Language By Id](#update-language-by-id)
  - [Delete Language By Id](#delete-language-by-id)
- [/api/Technology](#apitechnology)
  - [/GetTechnologies](#gettechnologies)
  - [Create Technology](#create-technology)
  - [Get Technology By Id](#get-technology-by-id)
  - [Update Technology By Id](#update-technology-by-id)
  - [Delete Technology By Id](#delete-technology-by-id)

***

# /api/User

## /Login

|||
|---|---|
|Description|Get a JWT for an existing user|
|Type|POST|
|URL structure|`http://localhost:5000/api/User/login`|
|Authentication|None|
|Body|JSON|
|Returns|JSON; The JWT|
|||

Sample body:
```json
{
  "userName": "string",
  "password": "string"
}
```
Sample response:
```json
{
  "token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJJRCI6IjFiMTU2ZTY3LTVhZmItNGZmMi1hYzRmLTY4NjVmZWI5NzFiYiIsIlVzZXJuYW1lIjoieW9yZ3VzIiwicm9sZSI6IlVzZXIiLCJuYmYiOjE2MTIzMzg5NzIsImV4cCI6MTYxMjkwODAwMCwiaWF0IjoxNjEyMzM4OTcyfQ.dneQidggMu9FD7UXBzn5td3phX3OIgp7y4BygHTqq5Un5D67xH1jZTRQpi9Zqcq76mODvUToAo7j4PFdJtIdtg"
}
```

## /Register

|||
|---|---|
|Description|Add an account to the database and get a JWT|
|Type|POST|
|URL structure|`http://localhost:5000/api/User/register`|
|Authentication|None|
|Body|JSON|
|Returns|JSON; The JWT|

Sample body:
```json
{
  "userName": "string",
  "email": "user@example.com",
  "firstName": "string",
  "lastName": "string",
  "password": "string"
}
```
Sample response:
```json
{
  "token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJJRCI6IjFiMTU2ZTY3LTVhZmItNGZmMi1hYzRmLTY4NjVmZWI5NzFiYiIsIlVzZXJuYW1lIjoieW9yZ3VzIiwicm9sZSI6IlVzZXIiLCJuYmYiOjE2MTIzMzg5NzIsImV4cCI6MTYxMjkwODAwMCwiaWF0IjoxNjEyMzM4OTcyfQ.dneQidggMu9FD7UXBzn5td3phX3OIgp7y4BygHTqq5Un5D67xH1jZTRQpi9Zqcq76mODvUToAo7j4PFdJtIdtg"
}
```

## /GetUser

|||
|---|---|
|Description|Get a user via his UserName|
|Type|GET|
|URL structure|`http://localhost:5000/api/User/GetUser?UserName=test`|
|Authentication|None|
|Body|None|
|Returns|JSON; The object of the user|
|||

Sample response:
```json
{
  "profilePictureURL": "https://avatars.githubusercontent.com/u/75525529?s=60&v=4",
  "roles": [
    {
      "name": "User"
    }
  ],
  "friends": [
  ],
  "languages": [
    {
      "id": "cf40034d-75d7-4792-821d-c16220a5b928"
    }
  ],
  "technologies": [
    {
      "id": "907421d9-1b60-411b-b780-85e65a004b56"
    }
  ],
  "posts": [
    {
      "id": "850d0655-72cb-4477-b69b-35e8645db266"
    }
  ],
  "userName": "test",
  "email": "test@bg.com",
  "firstName": "Test",
  "lastName": "Test"
}
```

## /ProfilePicture

|||
|---|---|
|Description|Update the profile picture of the given User|
|Type|PUT|
|URL structure|`http://localhost:5000/api/User/ProfilePicture?UserId=27e203bd-5312-4831-9334-cd3c20e5d672`|
|Authentication|Bearer Token (JWT), [Authorization Type 2](https://github.com/Team-Kaleidoscope/DevHive/wiki/Authentication#token-validation)|
|Body|Multipart Form|
|Returns|JSON; The link to the uploaded profile picture|
|||

Sample body:
|Name|Value|
|---|---|
|Picture|`new-profile-picture.png` (this is the actual file)|

Sample response:
```json
{
  "profilePictureURL": "https://avatars.githubusercontent.com/u/75525529?s=60&v=4"
}
```

## Get User By Id

|||
|---|---|
|Description|Get a user via his Id|
|Type|GET|
|URL structure|`http://localhost:5000/api/User?Id=27e203bd-5312-4831-9334-cd3c20e5d672`|
|Authentication|Bearer Token (JWT), [Authorization Type 2](https://github.com/Team-Kaleidoscope/DevHive/wiki/Authentication#token-validation)|
|Body|None|
|Returns|JSON; The object of the user|
|||

Sample response:
```json
{
  "profilePictureURL": "https://avatars.githubusercontent.com/u/75525529?s=60&v=4",
  "roles": [
    {
      "name": "User"
    }
  ],
  "friends": [
  ],
  "languages": [
    {
      "id": "cf40034d-75d7-4792-821d-c16220a5b928"
    }
  ],
  "technologies": [
    {
      "id": "907421d9-1b60-411b-b780-85e65a004b56"
    }
  ],
  "posts": [
    {
      "id": "850d0655-72cb-4477-b69b-35e8645db266"
    }
  ],
  "userName": "test",
  "email": "test@bg.com",
  "firstName": "Test",
  "lastName": "Test"
}
```

## Update User By Id

|||
|---|---|
|Description|Modify the values in an existing user (account)|
|Type|PUT|
|URL structure|`http://localhost:5000/api/User?Id=27e203bd-5312-4831-9334-cd3c20e5d672`|
|Authentication|Bearer Token (JWT), [Authorization Type 2](https://github.com/Team-Kaleidoscope/DevHive/wiki/Authentication#token-validation)|
|Body|JSON|
|Returns|JSON; The updated user object|
|||

Sample body:
```json
{
  "userName": "string",
  "email": "user@example.com",
  "firstName": "string",
  "lastName": "string",
  "password": "string",
  "friends": [
    {
      "userName": "string"
    }
  ],
  "roles": [
    {
      "name": "string"
    }
  ],
  "languages": [
    {
      "name": "string"
    }
  ],
  "technologies": [
    {
      "name": "string"
    }
  ]
}
```
Sample response:
```json
{
  "profilePictureURL": "https://avatars.githubusercontent.com/u/75525529?s=60&v=4",
  "roles": [
    {
      "name": "User"
    }
  ],
  "friends": [],
  "languages": [
    {
      "id": "33397a3b-46eb-424f-8e19-d88dbf3e953b"
    },
    {
      "id": "cea85a74-4820-42ff-b64f-61d7e9bfc696"
    }
  ],
  "technologies": [
    {
      "id": "907421d9-1b60-411b-b780-85e65a004b56"
    }
  ],
  "posts": [],
  "userName": "test",
  "email": "test1@bg.com",
  "firstName": "Tester",
  "lastName": "Tester"
}
```

## Delete User By Id

|||
|---|---|
|Description|Delete an existing user from the database `WARNING: THIS IS IRREVERSIBLE`|
|Type|DELETE|
|URL structure|`http://localhost:5000/api/User?Id=27e203bd-5312-4831-9334-cd3c20e5d672`|
|Authentication|Bearer Token (JWT), [Authorization Type 2](https://github.com/Team-Kaleidoscope/DevHive/wiki/Authentication#token-validation)|
|Body|None|
|Returns|Nothing|
|||

***

# /api/Role

## Create Role

|||
|---|---|
|Description|Add a new Role to the DataBase|
|Type|POST|
|URL structure|`http://localhost:5000/api/Role`|
|Authentication|Bearer Token (JWT), [Authorization Type 3](https://github.com/Team-Kaleidoscope/DevHive/wiki/Authentication#token-validation)|
|Body|JSON|
|Returns|JSON; The result role object, only with the role Id|
|||

Sample body:
```json
{
  "name": "string"
}
```
Sample response:
```json
{
  "id": "1cc9773f-8d9a-4bfd-83ca-2099dc787a39"
}
```

## Get Role By Id

|||
|---|---|
|Description|Get an existing Role via it's Id|
|Type|GET|
|URL structure|`http://localhost:5000/api/Role?Id=1cc9773f-8d9a-4bfd-83ca-2099dc787a39`|
|Authentication|Bearer Token (JWT), [Authorization Type 1](https://github.com/Team-Kaleidoscope/DevHive/wiki/Authentication#token-validation)|
|Body|None|
|Returns|JSON; The role object, only with it's name|
|||

Sample response:
```json
{
  "name": "Test"
}
```

## Update Role By Id

|||
|---|---|
|Description|Modify the values (name) of an existing role|
|Type|PUT|
|URL structure|`http://localhost:5000/api/Role?Id=1cc9773f-8d9a-4bfd-83ca-2099dc787a39`|
|Authentication|Bearer Token (JWT), [Authorization Type 3](https://github.com/Team-Kaleidoscope/DevHive/wiki/Authentication#token-validation)|
|Body|JSON|
|Returns|Nothing|
|||

Sample body:
```json
{
  "name": "string"
}
```

## Delete Role By Id

|||
|---|---|
|Description|Remove an existing Role from the DataBase|
|Type|POST|
|URL structure|`http://localhost:5000/api/Role?Id=1cc9773f-8d9a-4bfd-83ca-2099dc787a39`|
|Authentication|Bearer Token (JWT), [Authorization Type 3](https://github.com/Team-Kaleidoscope/DevHive/wiki/Authentication#token-validation)|
|Body|None|
|Returns|Nothing|
|||

***

# /api/Feed

## /GetPosts

|||
|---|---|
|Description|Get a certain amount of the latest posts of a User's friends|
|Type|POST|
|URL structure|`http://localhost:5000/api/Feed/GetPosts?UserId=27e203bd-5312-4831-9334-cd3c20e5d672`|
|Authentication|Bearer Token (JWT), [Authorization Type 1](https://github.com/Team-Kaleidoscope/DevHive/wiki/Authentication#token-validation)|
|Body|JSON|
|Returns|JSON; An array with the selected posts|
|||

Sample body:
```json
{
  "pageNumber": 1,
  "firstPageTimeIssued": "2022-01-30T18:43:01.082Z",
  "pageSize": 5
}
```
Sample response:
```json
{
  "posts": [
    {
      "postId": "850d0655-72cb-4477-b69b-35e8645db266",
      "creatorFirstName": "test",
      "creatorLastName": "Test",
      "creatorUsername": "Test",
      "message": "A sample post",
      "timeCreated": "2021-02-03T10:52:38.271647",
      "comments": [],
      "fileUrls": []
    }
  ]
}
```

## /GetUserPosts

|||
|---|---|
|Description|Get a certain amount of the latest posts from a User|
|Type|POST|
|URL structure|`http://localhost:5000/api/GetUserPosts?UserName=test`|
|Authentication|None|
|Body|JSON|
|Returns|JSON; An array with the selected posts|
|||

Sample body:
```json
{
  "pageNumber": 1,
  "firstPageTimeIssued": "2022-01-30T18:43:01.082Z",
  "pageSize": 5
}
```
Sample response:
```json
{
  "posts": [
    {
      "postId": "850d0655-72cb-4477-b69b-35e8645db266",
      "creatorFirstName": "test",
      "creatorLastName": "Test",
      "creatorUsername": "Test",
      "message": "A sample post",
      "timeCreated": "2021-02-03T10:52:38.271647",
      "comments": [],
      "fileUrls": []
    }
  ]
}
```

***

# /api/Post

## Create Post

|||
|---|---|
|Description|Add a new Post to the DataBase|
|Type|POST|
|URL structure|`http://localhost:5000/api/Post?UserId=27e203bd-5312-4831-9334-cd3c20e5d672`|
|Authentication|Bearer Token (JWT), [Authorization Type 1](https://github.com/Team-Kaleidoscope/DevHive/wiki/Authentication#token-validation)|
|Body|Multipart Form|
|Returns|JSON; The result Post object, only with the Post Id|
|||

Sample body:
|Name|Value|
|---|---|
|Message|The message of my post|
|Files|`attachment.txt` (that is the actual file)|
|Files|`attachment2.txt` (that is the actual file)|
|...||

Sample response:
```json
{
  "id": "1cc9773f-8d9a-4bfd-83ca-2099dc787a39"
}
```

## Get Post By Id

|||
|---|---|
|Description|Get an existing Post from the DataBase|
|Type|GET|
|URL structure|`http://localhost:5000/api/Post?Id=1cc9773f-8d9a-4bfd-83ca-2099dc787a39`|
|Authentication|None|
|Body|None|
|Returns|JSON; The result Post object|
|||

Sample response:
```json
{
  "postId": "1cc9773f-8d9a-4bfd-83ca-2099dc787a39",
  "creatorFirstName": "Test",
  "creatorLastName": "Test",
  "creatorUsername": "test",
  "message": "A sample post",
  "timeCreated": "2021-02-02T18:29:31.942772",
  "comments": [],
  "fileUrls": []
}
```

## Update Post By Id

|||
|---|---|
|Description|Update the values of an existing post|
|Type|PUT|
|URL structure|`http://localhost:5000/api/Post?UserId=27e203bd-5312-4831-9334-cd3c20e5d672`|
|Authentication|Bearer Token (JWT), [Authorization Type 2](https://github.com/Team-Kaleidoscope/DevHive/wiki/Authentication#token-validation)|
|Body|Multipart Form|
|Returns|JSON; The result Post object, only with the Post Id|
|||

**Note:** When editing a post's files, they all get replaced, you cannot just add new files. After post is edited, it's "timeCreated" get's updated.

Sample body:
|Name|Value|
|---|---|
|PostId|1cc9773f-8d9a-4bfd-83ca-2099dc787a39|
|NewMessage|The new message of the post|
|Files|`attachment3.txt` (that is the actual file)|
|Files|`attachment4.txt` (that is the actual file)|
|...|

Sample response:
```json
{
  "id": "1cc9773f-8d9a-4bfd-83ca-2099dc787a39"
}
```

## Delete Post By Id

|||
|---|---|
|Description|Remove an existing Post from the DataBase|
|Type|DELETE|
|URL structure|`http://localhost:5000/api/Post?Id=1cc9773f-8d9a-4bfd-83ca-2099dc787a39`|
|Authentication|Bearer Token (JWT), [Authorization Type 2](https://github.com/Team-Kaleidoscope/DevHive/wiki/Authentication#token-validation)|
|Body|None|
|Returns|None|
|||

***

# /api/Comment

## Add comment

|||
|---|---|
|Description|Add a new Comment to an existing Post|
|Type|POST|
|URL structure|`http://localhost:5000/api/Comment?UserId=27e203bd-5312-4831-9334-cd3c20e5d672`|
|Authentication|Bearer Token (JWT), [Authorization Type 1](https://github.com/Team-Kaleidoscope/DevHive/wiki/Authentication#token-validation)|
|Body|JSON|
|Returns|JSON; The result Comment object, only with the Comment Id|
|||

Sample body:
```json
{
  "postId": "1cc9773f-8d9a-4bfd-83ca-2099dc787a39",
  "message": "First comment"
}
```
Sample response:
```json
{
  "id": "1cc9773f-8d9a-4bfd-83ca-2099dc787a39"
}
```

## Get Comment By Id

|||
|---|---|
|Description|Get an existing Comment from the DataBase|
|Type|GET|
|URL structure|`http://localhost:5000/api/Comment?Id=1cc9773f-8d9a-4bfd-83ca-2099dc787a39`|
|Authentication|None|
|Body|None|
|Returns|JSON; The result Comment object|
|||

Sample response:
```json
{
  "commentId": "086d1a23-c977-4cdc-9bdf-dc81992b3a12",
  "postId": "1cc9773f-8d9a-4bfd-83ca-2099dc787a39",
  "issuerFirstName": "Test",
  "issuerLastName": "Test",
  "issuerUsername": "test",
  "message": "First coment",
  "timeCreated": "2021-02-01T13:18:57.434512"
}
```

## Update Comment By Id

|||
|---|---|
|Description|Update the values of an existing comment|
|Type|PUT|
|URL structure|`http://localhost:5000/api/Comment?UserId=27e203bd-5312-4831-9334-cd3c20e5d672`|
|Authentication|Bearer Token (JWT), [Authorization Type 2](https://github.com/Team-Kaleidoscope/DevHive/wiki/Authentication#token-validation)|
|Body|JSON|
|Returns|JSON; The result Comment object, only with the Comment Id|
|||

Sample body:
```json
{
  "commentId": "086d1a23-c977-4cdc-9bdf-dc81992b3a12",
  "postId": "1cc9773f-8d9a-4bfd-83ca-2099dc787a39",
  "newMessage": "string"
}
```
Sample response:
```json
{
  "id": "1cc9773f-8d9a-4bfd-83ca-2099dc787a39"
}
```

## Delete Comment By Id

|||
|---|---|
|Description|Remove an existing Comment from the DataBase|
|Type|DELETE|
|URL structure|`http://localhost:5000/api/Comment?Id=086d1a23-c977-4cdc-9bdf-dc81992b3a12`|
|Authentication|Bearer Token (JWT), [Authorization Type 2](https://github.com/Team-Kaleidoscope/DevHive/wiki/Authentication#token-validation)|
|Body|None|
|Returns|None|
|||

***

# /api/Language

## /GetLanguages

|||
|---|---|
|Description|Get all available Languages from the DataBase|
|Type|GET|
|URL structure|`http://localhost:5000/api/Language/GetLanguages`|
|Authentication|Bearer Token (JWT), [Authorization Type 1](https://github.com/Team-Kaleidoscope/DevHive/wiki/Authentication#token-validation)|
|Body|None|
|Returns|JSON; The result Language array object|
|||

Sample response:
```json
[
  {
    "id": "5286821a-1407-4daf-ac3e-49153c2d3f66",
    "name": "CSharp"
  },
  {
    "id": "cea85a74-4820-42ff-b64f-61d7e9bfc696",
    "name": "Perl"
  },
  {
    "id": "6dc1cb1a-1c4f-41af-8b44-86441cb60136",
    "name": "Java"
  }
]
```

## Create Language

|||
|---|---|
|Description|Add a new Language in the DataBase|
|Type|POST|
|URL structure|`http://localhost:5000/api/Comment`|
|Authentication|Bearer Token (JWT), [Authorization Type 3](https://github.com/Team-Kaleidoscope/DevHive/wiki/Authentication#token-validation)|
|Body|JSON|
|Returns|JSON; The result Comment object, only with the Comment Id|
|||

Sample body:
```json
{
  "name": "Perl"
}
```
Sample response:
```json
{
  "id": "1cc9773f-8d9a-4bfd-83ca-2099dc787a39"
}
```

## Get Language By Id

|||
|---|---|
|Description|Get an existing Language from the DataBase|
|Type|GET|
|URL structure|`http://localhost:5000/api/Language?Id=1cc9773f-8d9a-4bfd-83ca-2099dc787a39`|
|Authentication|None|
|Body|None|
|Returns|JSON; The result Language object|
|||

Sample response:
```json
{
  "id": "1cc9773f-8d9a-4bfd-83ca-2099dc787a39",
  "name": "Perl"
}
```

## Update Language By Id

|||
|---|---|
|Description|Update the values of an existing Language|
|Type|PUT|
|URL structure|`http://localhost:5000/api/Language?Id=27e203bd-5312-4831-9334-cd3c20e5d672`|
|Authentication|Bearer Token (JWT), [Authorization Type 3](https://github.com/Team-Kaleidoscope/DevHive/wiki/Authentication#token-validation)|
|Body|JSON|
|Returns|None|
|||

Sample body:
```json
{
  "name": "string"
}
```

## Delete Language By Id

|||
|---|---|
|Description|Remove an existing Language from the DataBase|
|Type|DELETE|
|URL structure|`http://localhost:5000/api/Language?Id=086d1a23-c977-4cdc-9bdf-dc81992b3a12`|
|Authentication|Bearer Token (JWT), [Authorization Type 3](https://github.com/Team-Kaleidoscope/DevHive/wiki/Authentication#token-validation)|
|Body|None|
|Returns|None|
|||

***

# /api/Technology

## /GetTechnologies

|||
|---|---|
|Description|Get all available Technologies from the DataBase|
|Type|GET|
|URL structure|`http://localhost:5000/api/Language/GetTechnologies`|
|Authentication|Bearer Token (JWT), [Authorization Type 1](https://github.com/Team-Kaleidoscope/DevHive/wiki/Authentication#token-validation)|
|Body|None|
|Returns|JSON; The result Technology array object|
|||

Sample response:
```json
[
  {
    "id": "5286821a-1407-4daf-ac3e-49153c2d3f66",
    "name": "ASP.NET"
  },
  {
    "id": "cea85a74-4820-42ff-b64f-61d7e9bfc696",
    "name": "Angular"
  }
]
```

## Create Technology

|||
|---|---|
|Description|Add a new Technology in the DataBase|
|Type|POST|
|URL structure|`http://localhost:5000/api/Technology`|
|Authentication|Bearer Token (JWT), [Authorization Type 3](https://github.com/Team-Kaleidoscope/DevHive/wiki/Authentication#token-validation)|
|Body|JSON|
|Returns|JSON; The result Technology object, only with the Technology Id|
|||

Sample body:
```json
{
  "name": "Angular"
}
```
Sample response:
```json
{
  "id": "1cc9773f-8d9a-4bfd-83ca-2099dc787a39"
}
```

## Get Technology By Id

|||
|---|---|
|Description|Get an existing Technology from the DataBase|
|Type|GET|
|URL structure|`http://localhost:5000/api/Technology?Id=1cc9773f-8d9a-4bfd-83ca-2099dc787a39`|
|Authentication|None|
|Body|None|
|Returns|JSON; The result Technology object|
|||

Sample response:
```json
{
  "id": "1cc9773f-8d9a-4bfd-83ca-2099dc787a39",
  "name": "Angular"
}
```

## Update Technology By Id

|||
|---|---|
|Description|Update the values of an existing Technology|
|Type|PUT|
|URL structure|`http://localhost:5000/api/Technology?Id=27e203bd-5312-4831-9334-cd3c20e5d672`|
|Authentication|Bearer Token (JWT), [Authorization Type 3](https://github.com/Team-Kaleidoscope/DevHive/wiki/Authentication#token-validation)|
|Body|JSON|
|Returns|None|
|||

Sample body:
```json
{
  "name": "string"
}
```

## Delete Technology By Id

|||
|---|---|
|Description|Remove an existing Technology from the DataBase|
|Type|DELETE|
|URL structure|`http://localhost:5000/api/Technology?Id=086d1a23-c977-4cdc-9bdf-dc81992b3a12`|
|Authentication|Bearer Token (JWT), [Authorization Type 3](https://github.com/Team-Kaleidoscope/DevHive/wiki/Authentication#token-validation)|
|Body|None|
|Returns|None|
|||