Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISSUE-60: View list of Regex patterns added by user #86

Merged
merged 5 commits into from
Jan 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DSL.Resql/list_regex.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select Regex_Entity.id, Regex_Entity.entity, Regex_Entity.regex from Regex_Entity join (select Regex_Entity."id", max(Regex_Entity."created_at") as most_recent_record from Regex_Entity group by id) p ON (Regex_Entity.id = p.id and Regex_Entity.created_at = p.most_recent_record) where Regex_Entity.active = True;
8 changes: 8 additions & 0 deletions DSL.Ruuter/GET/regex.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
list_regex:
call: http.post
args:
url: http://resql:8082/list_regex
result: request_response

return_value:
return: ${request_response.response.body}
16 changes: 16 additions & 0 deletions README.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,19 @@ https://github.com/buerokratt/Data-Anonymizer/blob/main/DSL.Ruuter/POST/annotate
```
curl -H "Content-Type: application/json" -X "POST" "http://localhost:8080/annotate?project=097afbed-761e-4ede-b7d4-97cafdadc488" --data '{"id":932021,"annotated_text":"text","sentences_annotations":"[{\"value\":{\"start\":44,\"end\":48,\"text\":\"2343\",\"labels\":[\"Aadress\"]},\"id\":\"AFPMDbFSpq\",\"from_name\":\"label\",\"to_name\":\"text\",\"type\":\"labels\",\"origin\":\"manual\"}]","annotate_existing_task":false,"project":"097afbed-761e-4ede-b7d4-97cafdadc488"}'
```

### View list of Regex patterns added by user

https://github.com/buerokratt/Data-Anonymizer/issues/60

https://github.com/buerokratt/Data-Anonymizer/blob/main/DSL.Resql/list_regex.sql

```
curl -X "POST" "http://localhost:8082/list_regex"
```

https://github.com/buerokratt/Data-Anonymizer/blob/main/DSL.Ruuter/GET/regex.yml

```
curl "http://localhost:8080/regex"
```