CreateUserGroup
curl --request POST \
--url https://api.siftstack.com/api/v2/user-groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userGroup": {
"name": "<string>",
"isDefault": true,
"isExternal": true,
"userGroupId": "<string>",
"roleId": "<string>",
"userIds": [
"<string>"
]
}
}
'import requests
url = "https://api.siftstack.com/api/v2/user-groups"
payload = { "userGroup": {
"name": "<string>",
"isDefault": True,
"isExternal": True,
"userGroupId": "<string>",
"roleId": "<string>",
"userIds": ["<string>"]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.siftstack.com/api/v2/user-groups"
payload := strings.NewReader("{\n \"userGroup\": {\n \"name\": \"<string>\",\n \"isDefault\": true,\n \"isExternal\": true,\n \"userGroupId\": \"<string>\",\n \"roleId\": \"<string>\",\n \"userIds\": [\n \"<string>\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"userGroup": {
"name": "<string>",
"isDefault": true,
"isExternal": true,
"userGroupId": "<string>",
"roleId": "<string>",
"resources": {
"allAssets": true,
"assetIds": [
"<string>"
]
},
"userIds": [
"<string>"
]
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}UserGroupService
CreateUserGroup
Creates a user group.
POST
/
api
/
v2
/
user-groups
CreateUserGroup
curl --request POST \
--url https://api.siftstack.com/api/v2/user-groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userGroup": {
"name": "<string>",
"isDefault": true,
"isExternal": true,
"userGroupId": "<string>",
"roleId": "<string>",
"userIds": [
"<string>"
]
}
}
'import requests
url = "https://api.siftstack.com/api/v2/user-groups"
payload = { "userGroup": {
"name": "<string>",
"isDefault": True,
"isExternal": True,
"userGroupId": "<string>",
"roleId": "<string>",
"userIds": ["<string>"]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.siftstack.com/api/v2/user-groups"
payload := strings.NewReader("{\n \"userGroup\": {\n \"name\": \"<string>\",\n \"isDefault\": true,\n \"isExternal\": true,\n \"userGroupId\": \"<string>\",\n \"roleId\": \"<string>\",\n \"userIds\": [\n \"<string>\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"userGroup": {
"name": "<string>",
"isDefault": true,
"isExternal": true,
"userGroupId": "<string>",
"roleId": "<string>",
"resources": {
"allAssets": true,
"assetIds": [
"<string>"
]
},
"userIds": [
"<string>"
]
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Was this page helpful?
⌘I