Skip to content

Commit

Permalink
sample api call create nw group
Browse files Browse the repository at this point in the history
  • Loading branch information
tpurschke committed Sep 24, 2024
1 parent e93edff commit 770a2a7
Showing 1 changed file with 57 additions and 1 deletion.
58 changes: 57 additions & 1 deletion roles/lib/files/FWO.Tufin.SecureChange/ExternalTicket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,65 @@ public async Task<RestResponse<int>> CreateTicketInTufin(ExternalTicketSystem tu
// send API call
return await restClient.ExecuteAsync<int>(request);
}

/*
Create Ticket for creating network groups
parameters:
- management_id: we need to get all management ids from tufin st?
-
workflow:
- get all management ids (from sc or do we need to access sc as well?)
- loop over all managements
- create group modify ticket with all groups of the app (first: adds only)
- store ticket ids for checking status
- check status and wait for status "closed"
curl --request POST \
--insecure \
--url https://tufin-stest.xxx.de/securechangeworkflow/api/securechange/tickets.json \
--header 'Authorization: Basic xxx' \
--header 'Content-Type: application/json' \
--data '{
"ticket": {
"subject": "Neue automatische Gruppenerstellung",
"priority": "Normal",
"domain_name": "",
"workflow": {
"name": "Automatische Gruppenerstellung"
},
"steps": {
"step": [
{
"name": "Submit Request",
"tasks": {
"task": {
"fields": {
"field": {
"@xsi.type": "multi_group_change",
"name": "Modify network object group",
"group_change": {
"name": "test-group-change-ticket-1",
"management_id": 1,
"management_name": mgmt_name,
"members": {
"member": []
},
"change_action": "CREATE"
}
}
}
}
}
}
]
}
}
}'
Create Ticket Sample Call
Create Ticket for access rule
curl --request POST \
--insecure \
Expand Down

0 comments on commit 770a2a7

Please sign in to comment.