You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: restcomm/restcomm.docs/sources-asciidoc/src/main/asciidoc/api/profile-api.adoc
+32-2Lines changed: 32 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -123,15 +123,19 @@ To associate a single Profile with multiple Accounts/Organizations, multiple req
123
123
....
124
124
curl -X GET https://ACae6e420f425248d6a26948c17a9e2acf:77f8c12cc7b8f8423e5c38b035249166@127.0.0.1:8080/restcomm/2012-04-24/Profiles/PRae6e420f425248d6a26948c17a9e2acf
125
125
....
126
+
**Add a new Profile.**
126
127
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
+
....
127
131
128
132
**Modify a Profile.**
129
133
130
-
To update a Profile you need to provide the SID
134
+
To update a Profile you need to provide the Profile SID
131
135
132
136
For example, update Proile using sid:
133
137
....
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
135
139
....
136
140
137
141
....
@@ -163,6 +167,32 @@ The above command will print an output similar to the one below:
163
167
}
164
168
----
165
169
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
0 commit comments