Skip to content

Commit 6d1a3f2

Browse files
Profiles API doc: Add additional examples. Add index link
1 parent 5ca51be commit 6d1a3f2

2 files changed

Lines changed: 33 additions & 2 deletions

File tree

restcomm/restcomm.docs/sources-asciidoc/src/main/asciidoc/api/index.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Restcomm Accounts have the following subresources. Click on a link to read the A
3434
* <<ussd-push-api.adoc#uss-push,Restcomm API – UssdPush>>
3535
* <<conferences-api.adoc#conferenceapi, Restcomm API - Conference Management>>
3636
* <<participants-api.adoc#participantsapi, Restcomm API - Conference Participants Management>>
37+
* <<profile-api.adoc#profileapi, Restcomm API - Profiles Management>>
3738

3839
=== Management Sub-Resources
3940

restcomm/restcomm.docs/sources-asciidoc/src/main/asciidoc/api/profile-api.adoc

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,19 @@ To associate a single Profile with multiple Accounts/Organizations, multiple req
123123
....
124124
curl -X GET https://ACae6e420f425248d6a26948c17a9e2acf:77f8c12cc7b8f8423e5c38b035249166@127.0.0.1:8080/restcomm/2012-04-24/Profiles/PRae6e420f425248d6a26948c17a9e2acf
125125
....
126+
**Add a new Profile.**
126127

128+
....
129+
curl -X POST -H 'Content-Type: application/instance+json' --data "@/path/to/filename" https://ACae6e420f425248d6a26948c17a9e2acf:77f8c12cc7b8f8423e5c38b035249166@127.0.0.1:8080/restcomm/2012-04-24/Profiles
130+
....
127131

128132
**Modify a Profile.**
129133

130-
To update a Profile you need to provide the SID
134+
To update a Profile you need to provide the Profile SID
131135

132136
For example, update Proile using sid:
133137
....
134-
curl -H 'Content-Type: application/instance+json' --data "@/path/to/filename" -X PUT https://ACae6e420f425248d6a26948c17a9e2acf:77f8c12cc7b8f8423e5c38b035249166@127.0.0.1:8080/restcomm/2012-04-24/Profiles/PRae6e420f425248d6a26948c17a9e2123
138+
curl -X PUT -H 'Content-Type: application/instance+json' --data "@/path/to/filename" https://ACae6e420f425248d6a26948c17a9e2acf:77f8c12cc7b8f8423e5c38b035249166@127.0.0.1:8080/restcomm/2012-04-24/Profiles/PRae6e420f425248d6a26948c17a9e2123
135139
....
136140

137141
....
@@ -163,6 +167,32 @@ The above command will print an output similar to the one below:
163167
}
164168
----
165169

170+
**Link/Unlink a Profile to an Entity**
171+
172+
To link a Profile to an Account
173+
174+
....
175+
curl -X PUT -H "X-HTTP-Method-Override:LINK" -H "Link:<https://127.0.0.1:8080/restcomm/2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf>;rel=related" https://ACae6e420f425248d6a26948c17a9e2acf:77f8c12cc7b8f8423e5c38b035249166@127.0.0.1:8080/restcomm/2012-04-24/Profiles/PRae6e420f425248d6a26948c17a9e2123
176+
....
177+
178+
To unlink a Profile from an Account
179+
180+
....
181+
curl -X PUT -H "X-HTTP-Method-Override:UNLINK" -H "Link:<https://127.0.0.1:8080/restcomm/2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf>;rel=related" https://ACae6e420f425248d6a26948c17a9e2acf:77f8c12cc7b8f8423e5c38b035249166@127.0.0.1:8080/restcomm/2012-04-24/Profiles/PRae6e420f425248d6a26948c17a9e2123
182+
....
183+
184+
To link a Profile to an Organization
185+
186+
....
187+
curl -X PUT -H "X-HTTP-Method-Override:LINK" -H "Link:<https://127.0.0.1:8080/restcomm/2012-04-24/Organizations/ORafbe225ad37541eba518a74248f0ac4c>;rel=related" https://ACae6e420f425248d6a26948c17a9e2acf:77f8c12cc7b8f8423e5c38b035249166@127.0.0.1:8080/restcomm/2012-04-24/Profiles/PRae6e420f425248d6a26948c17a9e2123
188+
....
189+
190+
To unlink a Profile from an Organization
191+
192+
....
193+
curl -X PUT -H "X-HTTP-Method-Override:UNLINK" -H "Link:<https://127.0.0.1:8080/restcomm/2012-04-24/Organizations/ORafbe225ad37541eba518a74248f0ac4c>;rel=related" https://ACae6e420f425248d6a26948c17a9e2acf:77f8c12cc7b8f8423e5c38b035249166@127.0.0.1:8080/restcomm/2012-04-24/Profiles/PRae6e420f425248d6a26948c17a9e2123
194+
....
195+
166196
[[Profiles_List]]
167197
== Profile List Resource
168198

0 commit comments

Comments
 (0)