import requests
url = "https://api.platform.ankra.app/org/applications/{application_id}/environments/{environment_id}/log-pattern-marks"
payload = {
"pattern": "<string>",
"mark": "<string>"
}
headers = {
"cookie": "ankra_session=",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {cookie: 'ankra_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({pattern: '<string>', mark: '<string>'})
};
fetch('https://api.platform.ankra.app/org/applications/{application_id}/environments/{environment_id}/log-pattern-marks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://api.platform.ankra.app/org/applications/{application_id}/environments/{environment_id}/log-pattern-marks \
--header 'Content-Type: application/json' \
--cookie ankra_session= \
--data '
{
"pattern": "<string>",
"mark": "<string>"
}
'{
"pattern": "<string>",
"pattern_hash": "<string>",
"mark": "resolved",
"marked_by": {
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"marked_at": "2023-11-07T05:31:56Z"
}{
"pattern": "<string>",
"pattern_hash": "<string>",
"mark": "resolved",
"marked_by": {
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"marked_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>",
"error_code": "log_pattern_invalid"
}{
"detail": "<string>"
}{
"detail": "<string>",
"error_code": "log_pattern_invalid"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Mark a pattern of an application's Logs (browser session)
Marks a pattern of the environment’s Logs resolved or ignored, for everyone who opens the application. The pattern is named by its text, the normalised message the grouping answers for it; the platform keys the mark on the application, the environment and the SHA-256 of the text, and keeps the text as sent. Setting a mark on a pattern that carries one replaces it, the same mark included, and records who and when anew. An environment keeps at most 500 marks. Each set is audited on the application with the environment, the pattern’s hash and the mark, never the pattern’s text. A mark changes nothing the platform reads or counts: lines, counts and the AI tools’ grouping are the same with or without it. What “comes back as new” means is the page’s to decide, from the mark’s time and the releases it has. Requires applications.write.
import requests
url = "https://api.platform.ankra.app/org/applications/{application_id}/environments/{environment_id}/log-pattern-marks"
payload = {
"pattern": "<string>",
"mark": "<string>"
}
headers = {
"cookie": "ankra_session=",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {cookie: 'ankra_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({pattern: '<string>', mark: '<string>'})
};
fetch('https://api.platform.ankra.app/org/applications/{application_id}/environments/{environment_id}/log-pattern-marks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://api.platform.ankra.app/org/applications/{application_id}/environments/{environment_id}/log-pattern-marks \
--header 'Content-Type: application/json' \
--cookie ankra_session= \
--data '
{
"pattern": "<string>",
"mark": "<string>"
}
'{
"pattern": "<string>",
"pattern_hash": "<string>",
"mark": "resolved",
"marked_by": {
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"marked_at": "2023-11-07T05:31:56Z"
}{
"pattern": "<string>",
"pattern_hash": "<string>",
"mark": "resolved",
"marked_by": {
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"marked_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>",
"error_code": "log_pattern_invalid"
}{
"detail": "<string>"
}{
"detail": "<string>",
"error_code": "log_pattern_invalid"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Body
A mark to set on a pattern: the pattern's text and the mark, both required.
Response
The pattern carried a mark, and it is replaced; the answer is the mark as it is now
One mark on a pattern of an environment's Logs: the pattern's text, resolved or ignored, who set it and when. A mark changes nothing the platform reads or counts: lines, counts and the AI tools' grouping are the same with or without it. What "comes back as new" means is the page's to decide, from the mark's time and the releases it has.