Skip to content

Commit f0a7d0a

Browse files
Merge pull request #4116 from divyaamunugama/asgardeo-curls
Add cURLs to Asgardeo APIs
2 parents d603403 + 49ba3c6 commit f0a7d0a

26 files changed

+2927
-125
lines changed

en/asgardeo/docs/apis/restapis/application-management.yaml

+592-30
Large diffs are not rendered by default.

en/asgardeo/docs/apis/restapis/attribute-management.yaml

+200-15
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,13 @@ paths:
7171
application/json:
7272
schema:
7373
$ref: '#/components/schemas/Error'
74-
x-wso2-curl: ""
74+
x-codeSamples:
75+
- lang: Curl
76+
source: |
77+
curl -X 'GET' \
78+
'https://api.asgardeo.io/t/{organization-name}/api/server/v1/claim-dialects/local/claims' \
79+
-H 'accept: application/json' \
80+
-H 'Authorization: Bearer {bearer_token}'
7581
post:
7682
tags:
7783
- Claims (local)
@@ -119,7 +125,36 @@ paths:
119125
'*/*':
120126
schema:
121127
$ref: '#/components/schemas/Error'
122-
x-wso2-curl: ""
128+
x-codeSamples:
129+
- lang: Curl
130+
source: |
131+
curl -X 'POST' \
132+
'https://api.asgardeo.io/t/{organization-name}/api/server/v1/claim-dialects/local/claims' \
133+
-H 'accept: */*' \
134+
-H 'Content-Type: application/json' \
135+
-H 'Authorization: Bearer {bearer_token}' \
136+
-d '{
137+
"claimURI": "http://wso2.org/claims/username",
138+
"description": "Some description about the claim.",
139+
"displayOrder": 10,
140+
"displayName": "Username",
141+
"readOnly": true,
142+
"regEx": "^([a-zA-Z)$",
143+
"required": true,
144+
"supportedByDefault": true,
145+
"attributeMapping": [
146+
{
147+
"mappedAttribute": "username",
148+
"userstore": "SECONDARY"
149+
}
150+
],
151+
"properties": [
152+
{
153+
"key": "string",
154+
"value": "string"
155+
}
156+
]
157+
}'
123158
x-codegen-request-body-name: localClaim
124159
/claim-dialects/local/claims/{claim-id}:
125160
get:
@@ -166,7 +201,13 @@ paths:
166201
application/json:
167202
schema:
168203
$ref: '#/components/schemas/Error'
169-
x-wso2-curl: ""
204+
x-codeSamples:
205+
- lang: Curl
206+
source: |
207+
curl -X 'GET' \
208+
'https://api.asgardeo.io/t/{organization-name}/api/server/v1/claim-dialects/local/claims/{claim-id}' \
209+
-H 'accept: application/json' \
210+
-H 'Authorization: Bearer {bearer_token}'
170211
put:
171212
tags:
172213
- Claims (local)
@@ -215,7 +256,36 @@ paths:
215256
'*/*':
216257
schema:
217258
$ref: '#/components/schemas/Error'
218-
x-wso2-curl: ""
259+
x-codeSamples:
260+
- lang: Curl
261+
source: |
262+
curl -X 'PUT' \
263+
'https://api.asgardeo.io/t/{organization-name}/api/server/v1/claim-dialects/local/claims/{claim-id}' \
264+
-H 'accept: */*' \
265+
-H 'Content-Type: application/json' \
266+
-H 'Authorization: Bearer {bearer_token}' \
267+
-d '{
268+
"claimURI": "http://wso2.org/claims/username",
269+
"description": "Some description about the claim.",
270+
"displayOrder": 10,
271+
"displayName": "Username",
272+
"readOnly": true,
273+
"regEx": "^([a-zA-Z)$",
274+
"required": true,
275+
"supportedByDefault": true,
276+
"attributeMapping": [
277+
{
278+
"mappedAttribute": "username",
279+
"userstore": "SECONDARY"
280+
}
281+
],
282+
"properties": [
283+
{
284+
"key": "string",
285+
"value": "string"
286+
}
287+
]
288+
}'
219289
x-codegen-request-body-name: localClaim
220290
delete:
221291
tags:
@@ -252,7 +322,14 @@ paths:
252322
'*/*':
253323
schema:
254324
$ref: '#/components/schemas/Error'
255-
x-wso2-curl: ""
325+
x-codeSamples:
326+
- lang: Curl
327+
source: |
328+
curl -X 'DELETE' \
329+
'https://api.asgardeo.io/t/{organization-name}/api/server/v1/claim-dialects/local/claims/{claim-id}' \
330+
-H 'accept: */*' \
331+
-H 'Authorization: Bearer {bearer_token}'
332+
256333
/claim-dialects:
257334
get:
258335
tags:
@@ -307,7 +384,13 @@ paths:
307384
application/json:
308385
schema:
309386
$ref: '#/components/schemas/Error'
310-
x-wso2-curl: ""
387+
x-codeSamples:
388+
- lang: Curl
389+
source: |
390+
curl -X 'GET' \
391+
'https://api.asgardeo.io/t/{organization-name}/api/server/v1/claim-dialects' \
392+
-H 'accept: application/json' \
393+
-H 'Authorization: Bearer {bearer_token}'
311394
post:
312395
tags:
313396
- Claim dialects
@@ -354,7 +437,17 @@ paths:
354437
'*/*':
355438
schema:
356439
$ref: '#/components/schemas/Error'
357-
x-wso2-curl: ""
440+
x-codeSamples:
441+
- lang: Curl
442+
source: |
443+
curl -X 'POST' \
444+
'https://api.asgardeo.io/t/{organization-name}/api/server/v1/claim-dialects' \
445+
-H 'accept: */*' \
446+
-H 'Authorization: Bearer {bearer_token}' \
447+
-H 'Content-Type: application/json' \
448+
-d '{
449+
"dialectURI": "urn:ietf:params:scim:schemas:core:2.0:User"
450+
}'
358451
x-codegen-request-body-name: claimDialect
359452
/claim-dialects/{dialect-id}:
360453
get:
@@ -401,7 +494,13 @@ paths:
401494
application/json:
402495
schema:
403496
$ref: '#/components/schemas/Error'
404-
x-wso2-curl: ""
497+
x-codeSamples:
498+
- lang: Curl
499+
source: |
500+
curl -X 'GET' \
501+
'https://api.asgardeo.io/t/{organization-name}/api/server/v1/claim-dialects/{dialect-id}' \
502+
-H 'accept: application/json' \
503+
-H 'Authorization: Bearer {bearer_token}'
405504
put:
406505
tags:
407506
- Claim dialects
@@ -444,7 +543,17 @@ paths:
444543
'*/*':
445544
schema:
446545
$ref: '#/components/schemas/Error'
447-
x-wso2-curl: ""
546+
x-codeSamples:
547+
- lang: Curl
548+
source: |
549+
curl -X 'PUT' \
550+
'https://api.asgardeo.io/t/{organization-name}/api/server/v1/claim-dialects/{dialect-id}' \
551+
-H 'accept: */*' \
552+
-H 'Authorization: Bearer {bearer_token}' \
553+
-H 'Content-Type: application/json' \
554+
-d '{
555+
"dialectURI": "urn:ietf:params:scim:schemas:core:2.0:User"
556+
}'
448557
x-codegen-request-body-name: claimDialect
449558
delete:
450559
tags:
@@ -481,7 +590,14 @@ paths:
481590
'*/*':
482591
schema:
483592
$ref: '#/components/schemas/Error'
484-
x-wso2-curl: ""
593+
x-codeSamples:
594+
- lang: Curl
595+
source: |
596+
curl -X 'DELETE' \
597+
'https://api.asgardeo.io/t/{organization-name}/api/server/v1/claim-dialects/{dialect-id}' \
598+
-H 'accept: */*' \
599+
-H 'Authorization: Bearer {bearer_token}'
600+
485601
/claim-dialects/{dialect-id}/claims:
486602
get:
487603
tags:
@@ -548,7 +664,14 @@ paths:
548664
application/json:
549665
schema:
550666
$ref: '#/components/schemas/Error'
551-
x-wso2-curl: ""
667+
x-codeSamples:
668+
- lang: Curl
669+
source: |
670+
curl -X 'GET' \
671+
'https://api.asgardeo.io/t/{organization-name}/api/server/v1/claim-dialects/{dialect-id}/export' \
672+
-H 'accept: application/json' \
673+
-H 'Authorization: Bearer {bearer_token}'
674+
552675
post:
553676
tags:
554677
- Claims (External)
@@ -608,7 +731,18 @@ paths:
608731
'*/*':
609732
schema:
610733
$ref: '#/components/schemas/Error'
611-
x-wso2-curl: ""
734+
x-codeSamples:
735+
- lang: Curl
736+
source: |
737+
curl -X 'POST' \
738+
'https://api.asgardeo.io/t/{organization-name}/api/server/v1/claim-dialects/{dialect-id}/claims' \
739+
-H 'accept: */*' \
740+
-H 'Content-Type: application/json' \
741+
-H 'Authorization: Bearer {bearer_token}' \
742+
-d '{
743+
"claimURI": "urn:ietf:params:scim:schemas:core:2.0:User:userName",
744+
"mappedLocalClaimURI": "http://wso2.org/claims/username"
745+
}'
612746
x-codegen-request-body-name: externalClaim
613747
/claim-dialects/{dialect-id}/claims/{claim-id}:
614748
get:
@@ -662,7 +796,14 @@ paths:
662796
application/json:
663797
schema:
664798
$ref: '#/components/schemas/Error'
665-
x-wso2-curl: ""
799+
x-codeSamples:
800+
- lang: Curl
801+
source: |
802+
curl -X 'GET' \
803+
'https://api.asgardeo.io/t/{organization-name}/api/server/v1/claim-dialects/{dialect-id}/claims/{claim-id}' \
804+
-H 'accept: application/json' \
805+
-H 'Authorization: Bearer {bearer_token}'
806+
666807
put:
667808
tags:
668809
- Claims (External)
@@ -717,7 +858,19 @@ paths:
717858
'*/*':
718859
schema:
719860
$ref: '#/components/schemas/Error'
720-
x-wso2-curl: ""
861+
x-codeSamples:
862+
- lang: Curl
863+
source: |
864+
curl -X 'PUT' \
865+
'https://api.asgardeo.io/t/{organization-name}/api/server/v1/claim-dialects/{dialect-id}/claims/{claim-id}' \
866+
-H 'accept: */*' \
867+
-H 'Content-Type: application/json' \
868+
-H 'Authorization: Bearer {bearer_token}' \
869+
-d '{
870+
"claimURI": "urn:ietf:params:scim:schemas:core:2.0:User:userName",
871+
"mappedLocalClaimURI": "http://wso2.org/claims/username"
872+
}'
873+
721874
x-codegen-request-body-name: externalClaim
722875
delete:
723876
tags:
@@ -760,7 +913,14 @@ paths:
760913
'*/*':
761914
schema:
762915
$ref: '#/components/schemas/Error'
763-
x-wso2-curl: ""
916+
x-codeSamples:
917+
- lang: Curl
918+
source: |
919+
curl -X 'DELETE' \
920+
'https://api.asgardeo.io/t/{organization-name}/api/server/v1/claim-dialects/{dialect-id}/claims/{claim-id}' \
921+
-H 'accept: */*' \
922+
-H 'Authorization: Bearer {bearer_token}'
923+
764924
/claim-dialects/{dialect-id}/export:
765925
get:
766926
tags:
@@ -799,6 +959,14 @@ paths:
799959
$ref: '#/components/responses/NotFound'
800960
'500':
801961
$ref: '#/components/responses/ServerError'
962+
x-codeSamples:
963+
- lang: Curl
964+
source: |
965+
curl -X 'GET' \
966+
'https://api.asgardeo.io/t/{organization-name}/api/server/v1/claim-dialects/{dialect-id}/export' \
967+
-H 'accept: application/json' \
968+
-H 'Authorization: Bearer {bearer_token}'
969+
802970
/claim-dialects/import:
803971
put:
804972
tags:
@@ -826,6 +994,15 @@ paths:
826994
$ref: '#/components/responses/Forbidden'
827995
'500':
828996
$ref: '#/components/responses/ServerError'
997+
x-codeSamples:
998+
- lang: Curl
999+
source: |
1000+
curl -X 'PUT' \
1001+
'https://api.asgardeo.io/t/{organization-name}/api/server/v1/claim-dialects/import?preserveClaims=false' \
1002+
-H 'accept: */*' \
1003+
-H 'Content-Type: multipart/form-data' \
1004+
-H 'Authorization: Bearer {bearer_token}'
1005+
8291006
post:
8301007
tags:
8311008
- Claim dialects
@@ -851,6 +1028,14 @@ paths:
8511028
$ref: '#/components/responses/Forbidden'
8521029
'500':
8531030
$ref: '#/components/responses/ServerError'
1031+
x-codeSamples:
1032+
- lang: Curl
1033+
source: |
1034+
curl -X 'POST' \
1035+
'https://api.asgardeo.io/t/{organization-name}/api/server/v1/claim-dialects/import' \
1036+
-H 'accept: */*' \
1037+
-H 'Content-Type: multipart/form-data' \
1038+
-H 'Authorization: Bearer {bearer_token}'
8541039
components:
8551040
schemas:
8561041
LocalClaimReq:

en/asgardeo/docs/apis/restapis/backup-code.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ paths:
3737
application/json:
3838
schema:
3939
$ref: '#/components/schemas/Error'
40+
x-codeSamples:
41+
- lang: Curl
42+
source: |
43+
curl -X 'POST' \
44+
'https://api.asgardeo.io/t/{organization-name}/api/users/v1/me/backup-codes' \
45+
-H 'accept: application/json' \
46+
-H 'Authorization: Bearer {bearer_token}' \
47+
-d ''
4048
tags:
4149
- me
4250
get:
@@ -60,6 +68,13 @@ paths:
6068
application/json:
6169
schema:
6270
$ref: '#/components/schemas/Error'
71+
x-codeSamples:
72+
- lang: Curl
73+
source: |
74+
curl -X 'GET' \
75+
'https://api.asgardeo.io/t/{organization-name}/api/users/v1/me/backup-codes' \
76+
-H 'accept: application/json' \
77+
-H 'Authorization: Bearer {bearer_token}'
6378
delete:
6479
tags:
6580
- me
@@ -77,6 +92,13 @@ paths:
7792
application/json:
7893
schema:
7994
$ref: '#/components/schemas/Error'
95+
x-codeSamples:
96+
- lang: Curl
97+
source: |
98+
curl -X 'DELETE' \
99+
'https://api.asgardeo.io/t/{organization-name}/api/users/v1/me/backup-codes' \
100+
-H 'accept: */*' \
101+
-H 'Authorization: Bearer {bearer_token}'
80102
components:
81103
schemas:
82104
Error:

0 commit comments

Comments
 (0)