Skip to main content
PUT
/
v3
/
profiles
/
validation-rules
/
{profileValidationRule}
Update Profile Validation Rule
curl --request PUT \
  --url https://api.{tenant}.getomneo.com/api/v3/profiles/validation-rules/{profileValidationRule} \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "pattern": "<string>",
  "error_message": "<string>",
  "priority": 123,
  "is_active": true,
  "effective_from": "2023-11-07T05:31:56Z",
  "effective_to": "2023-11-07T05:31:56Z",
  "created_by": "<string>",
  "updated_by": "<string>",
  "values": [
    {
      "value": "<string>",
      "is_active": true
    }
  ]
}
'
import requests

url = "https://api.{tenant}.getomneo.com/api/v3/profiles/validation-rules/{profileValidationRule}"

payload = {
"name": "<string>",
"pattern": "<string>",
"error_message": "<string>",
"priority": 123,
"is_active": True,
"effective_from": "2023-11-07T05:31:56Z",
"effective_to": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"updated_by": "<string>",
"values": [
{
"value": "<string>",
"is_active": True
}
]
}
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>',
pattern: '<string>',
error_message: '<string>',
priority: 123,
is_active: true,
effective_from: '2023-11-07T05:31:56Z',
effective_to: '2023-11-07T05:31:56Z',
created_by: '<string>',
updated_by: '<string>',
values: [{value: '<string>', is_active: true}]
})
};

fetch('https://api.{tenant}.getomneo.com/api/v3/profiles/validation-rules/{profileValidationRule}', 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/profiles/validation-rules/{profileValidationRule}",
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>',
'pattern' => '<string>',
'error_message' => '<string>',
'priority' => 123,
'is_active' => true,
'effective_from' => '2023-11-07T05:31:56Z',
'effective_to' => '2023-11-07T05:31:56Z',
'created_by' => '<string>',
'updated_by' => '<string>',
'values' => [
[
'value' => '<string>',
'is_active' => true
]
]
]),
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/profiles/validation-rules/{profileValidationRule}"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"pattern\": \"<string>\",\n \"error_message\": \"<string>\",\n \"priority\": 123,\n \"is_active\": true,\n \"effective_from\": \"2023-11-07T05:31:56Z\",\n \"effective_to\": \"2023-11-07T05:31:56Z\",\n \"created_by\": \"<string>\",\n \"updated_by\": \"<string>\",\n \"values\": [\n {\n \"value\": \"<string>\",\n \"is_active\": true\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/profiles/validation-rules/{profileValidationRule}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"pattern\": \"<string>\",\n \"error_message\": \"<string>\",\n \"priority\": 123,\n \"is_active\": true,\n \"effective_from\": \"2023-11-07T05:31:56Z\",\n \"effective_to\": \"2023-11-07T05:31:56Z\",\n \"created_by\": \"<string>\",\n \"updated_by\": \"<string>\",\n \"values\": [\n {\n \"value\": \"<string>\",\n \"is_active\": true\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.{tenant}.getomneo.com/api/v3/profiles/validation-rules/{profileValidationRule}")

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 \"pattern\": \"<string>\",\n \"error_message\": \"<string>\",\n \"priority\": 123,\n \"is_active\": true,\n \"effective_from\": \"2023-11-07T05:31:56Z\",\n \"effective_to\": \"2023-11-07T05:31:56Z\",\n \"created_by\": \"<string>\",\n \"updated_by\": \"<string>\",\n \"values\": [\n {\n \"value\": \"<string>\",\n \"is_active\": true\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "data": {
    "id": 123,
    "name": "<string>",
    "type": "<string>",
    "rule_type": "<string>",
    "applies_to": "<string>",
    "pattern": "<string>",
    "error_message": "<string>",
    "priority": 123,
    "is_active": true,
    "effective_from": "<string>",
    "effective_to": "<string>",
    "created_by": "<string>",
    "updated_by": "<string>",
    "created_at": "<string>",
    "updated_at": "<string>",
    "values": [
      {
        "id": 123,
        "rule_id": 123,
        "value": "<string>",
        "is_active": true,
        "created_at": "<string>",
        "updated_at": "<string>"
      }
    ]
  }
}
{
"message": "<string>"
}
{
"message": "<string>"
}
{
"message": "<string>",
"errors": {}
}

Path Parameters

profileValidationRule
integer
required

The profile validation rule ID

Body

application/json
name
string
Maximum string length: 255
type
enum<string>
Available options:
email,
mobile,
name
rule_type
enum<string>
Available options:
exact,
domain,
prefix,
regex
applies_to
enum<string>
Available options:
create,
update,
import,
all
pattern
string | null
error_message
string | null
Maximum string length: 255
priority
integer | null
is_active
boolean | null
effective_from
string<date-time> | null
effective_to
string<date-time> | null
created_by
string | null
Maximum string length: 255
updated_by
string | null
Maximum string length: 255
values
object[]

Response

ProfileValidationRule

data
ProfileValidationRule · object
required