Skip to main content
PUT
/
v3
/
groups
/
definitions
/
{group}
Edit Group Definition
curl --request PUT \
  --url https://api.{tenant}.getomneo.com/api/v3/groups/definitions/{group} \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "handle": "<string>",
  "type": "<string>",
  "source_type": "<string>",
  "source_id": 123,
  "query": "<string>",
  "query_type": "<string>",
  "period": 1,
  "absolute_expiry": "<string>",
  "refresh_period": 1,
  "refresh_absolute_expiry": "<string>",
  "short_description": "<string>",
  "description": "<string>",
  "owner_profile_id": "<string>",
  "meta": [
    "<string>"
  ],
  "is_published": true,
  "is_active": true,
  "is_archived": true,
  "arguments": [
    {
      "name": "<string>"
    }
  ]
}
'
import requests

url = "https://api.{tenant}.getomneo.com/api/v3/groups/definitions/{group}"

payload = {
"name": "<string>",
"handle": "<string>",
"type": "<string>",
"source_type": "<string>",
"source_id": 123,
"query": "<string>",
"query_type": "<string>",
"period": 1,
"absolute_expiry": "<string>",
"refresh_period": 1,
"refresh_absolute_expiry": "<string>",
"short_description": "<string>",
"description": "<string>",
"owner_profile_id": "<string>",
"meta": ["<string>"],
"is_published": True,
"is_active": True,
"is_archived": True,
"arguments": [{ "name": "<string>" }]
}
headers = {"Content-Type": "application/json"}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
handle: '<string>',
type: '<string>',
source_type: '<string>',
source_id: 123,
query: '<string>',
query_type: '<string>',
period: 1,
absolute_expiry: '<string>',
refresh_period: 1,
refresh_absolute_expiry: '<string>',
short_description: '<string>',
description: '<string>',
owner_profile_id: '<string>',
meta: ['<string>'],
is_published: true,
is_active: true,
is_archived: true,
arguments: [{name: '<string>'}]
})
};

fetch('https://api.{tenant}.getomneo.com/api/v3/groups/definitions/{group}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{tenant}.getomneo.com/api/v3/groups/definitions/{group}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'handle' => '<string>',
'type' => '<string>',
'source_type' => '<string>',
'source_id' => 123,
'query' => '<string>',
'query_type' => '<string>',
'period' => 1,
'absolute_expiry' => '<string>',
'refresh_period' => 1,
'refresh_absolute_expiry' => '<string>',
'short_description' => '<string>',
'description' => '<string>',
'owner_profile_id' => '<string>',
'meta' => [
'<string>'
],
'is_published' => true,
'is_active' => true,
'is_archived' => true,
'arguments' => [
[
'name' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.{tenant}.getomneo.com/api/v3/groups/definitions/{group}"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"handle\": \"<string>\",\n \"type\": \"<string>\",\n \"source_type\": \"<string>\",\n \"source_id\": 123,\n \"query\": \"<string>\",\n \"query_type\": \"<string>\",\n \"period\": 1,\n \"absolute_expiry\": \"<string>\",\n \"refresh_period\": 1,\n \"refresh_absolute_expiry\": \"<string>\",\n \"short_description\": \"<string>\",\n \"description\": \"<string>\",\n \"owner_profile_id\": \"<string>\",\n \"meta\": [\n \"<string>\"\n ],\n \"is_published\": true,\n \"is_active\": true,\n \"is_archived\": true,\n \"arguments\": [\n {\n \"name\": \"<string>\"\n }\n ]\n}")

req, _ := http.NewRequest("PUT", url, payload)

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))

}
HttpResponse<String> response = Unirest.put("https://api.{tenant}.getomneo.com/api/v3/groups/definitions/{group}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"handle\": \"<string>\",\n \"type\": \"<string>\",\n \"source_type\": \"<string>\",\n \"source_id\": 123,\n \"query\": \"<string>\",\n \"query_type\": \"<string>\",\n \"period\": 1,\n \"absolute_expiry\": \"<string>\",\n \"refresh_period\": 1,\n \"refresh_absolute_expiry\": \"<string>\",\n \"short_description\": \"<string>\",\n \"description\": \"<string>\",\n \"owner_profile_id\": \"<string>\",\n \"meta\": [\n \"<string>\"\n ],\n \"is_published\": true,\n \"is_active\": true,\n \"is_archived\": true,\n \"arguments\": [\n {\n \"name\": \"<string>\"\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.{tenant}.getomneo.com/api/v3/groups/definitions/{group}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"handle\": \"<string>\",\n \"type\": \"<string>\",\n \"source_type\": \"<string>\",\n \"source_id\": 123,\n \"query\": \"<string>\",\n \"query_type\": \"<string>\",\n \"period\": 1,\n \"absolute_expiry\": \"<string>\",\n \"refresh_period\": 1,\n \"refresh_absolute_expiry\": \"<string>\",\n \"short_description\": \"<string>\",\n \"description\": \"<string>\",\n \"owner_profile_id\": \"<string>\",\n \"meta\": [\n \"<string>\"\n ],\n \"is_published\": true,\n \"is_active\": true,\n \"is_archived\": true,\n \"arguments\": [\n {\n \"name\": \"<string>\"\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "data": {
    "id": 123,
    "name": "<string>",
    "handle": "<string>",
    "type": "<string>",
    "source_type": "<string>",
    "source_id": 123,
    "query": "<string>",
    "query_type": "<string>",
    "arguments": [
      "<unknown>"
    ],
    "period": 123,
    "period_type": "<string>",
    "absolute_expiry": "<string>",
    "refresh_period": 123,
    "refresh_period_type": "<string>",
    "refresh_absolute_expiry": "<string>",
    "last_refreshed_at": "<string>",
    "next_refresh_at": "<string>",
    "refresh_status": "<string>",
    "refresh_error": "<string>",
    "short_description": "<string>",
    "description": "<string>",
    "owner_profile_id": "<string>",
    "meta": [
      "<unknown>"
    ],
    "is_published": true,
    "is_active": true,
    "is_archived": true,
    "created_at": "<string>",
    "updated_at": "<string>",
    "current_member_count": 123,
    "rules": [
      {
        "id": 123,
        "group_definition_id": 123,
        "group_rule_definition_id": 123,
        "type": "<string>",
        "name": "<string>",
        "arguments": [
          "<unknown>"
        ],
        "sort_order": 123,
        "is_active": true,
        "meta": [
          "<unknown>"
        ],
        "effective": {
          "handle": "<string>",
          "evaluator": "<string>",
          "rule": {},
          "name": "<string>",
          "arguments": [
            "<unknown>"
          ]
        },
        "created_at": "<string>",
        "updated_at": "<string>"
      }
    ]
  }
}
{
"message": "<string>"
}
{
"message": "<string>"
}
{
"message": "<string>"
}
{
"message": "<string>",
"errors": {}
}

Path Parameters

group
integer
required

The group ID

Body

application/json
name
string
Maximum string length: 255
handle
string
Maximum string length: 255
type
string

Type cannot change on an existing definition — flipping a static group to dynamic (or vice versa) would invalidate every existing group_profile / snapshot row.

source_type
string | null
Maximum string length: 255
source_id
integer | null
query
string | null
Maximum string length: 255
query_type
string | null
Maximum string length: 255
period
integer | null
Required range: x >= 0
period_type
enum<string> | null
Available options:
days,
weeks,
months,
years,
absolute_date,
absolute_week,
absolute_month
absolute_expiry
string | null
refresh_period
integer | null
Required range: x >= 0
refresh_period_type
enum<string> | null
Available options:
days,
weeks,
months,
years,
absolute_date,
absolute_week,
absolute_month
refresh_absolute_expiry
string | null
short_description
string | null
description
string | null
owner_profile_id
string | null
meta
string[] | null
is_published
boolean
is_active
boolean
is_archived
boolean
arguments
object[] | null

Response

GroupDefinition

data
GroupDefinition · object
required