POST
Adds a new security profile.
The following example adds a new security profiles with given information.
# Request:
curl --location --request POST 'https://trial.dsserver.io/admin/securityprofiles' \
--header 'Authorization: Basic YWRtaW46YWRtaW5hZG1pbg==' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "My security profile",
"clientCredentials": {
"id": "GHGGHGD6766",
"secret": "GHZUZW441543HJUKUU",
"authorizedRedirectUris": [
"https://trial.dsserver.io/oauth/redirect"
],
"allowClientCredentialsGrantType": false
}
}'
# Result:
7
Type | Value |
---|---|
Security |
The Security |
Name | Type | Value | Optional |
---|---|---|---|
name | String | A user friendly name for the security profile | no |
allow |
Boolean | Specifies whether the client credentials grant type is activated or not. | yes |
expiry |
Date |
An expiry date for the security profile. When omitted, the security profile doesn't expire. | yes |
client |
Client |
The Client |
yes |
Name | Type | Value | Optional |
---|---|---|---|
id | String | The Client |
no |
secret | String | The Client |
no |
authorized |
String[] | An array of authorized redirect URIs. | no |
Status | Description |
---|---|
200 | On success, the HTTP status code in the response header is 200 (OK). The return value is the new ID of the added security profile. |
Status | Description |
---|---|
401 | A 401 (Unauthorized) is returned, if the user is not authorized. |
400 | A 400 (Bad Request) is returned, if the given ID exists already. |
400 | A 400 (Bad Request) is returned, if the security profile could not be added. |