Created
March 14, 2022 14:05
-
-
Save kkroesch/34e3a73d5ec421ab93a53691d5181770 to your computer and use it in GitHub Desktop.
Kix REST API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Requests for Kix API | |
@base_url = http://localhost:20000/api/v1 | |
### Authorization | |
# @name request_auth_token | |
POST {{base_url}}/auth | |
{ | |
"UserLogin": "admin", | |
"UserType": "Agent", | |
"Password": "Passw0rd" | |
} | |
### List Tickets | |
@auth_token = {{request_auth_token.response.body.Token}} | |
GET {{base_url}}/tickets | |
Authorization: Token {{auth_token}} | |
### Get Ticket | |
@ticket_id = 2 | |
GET {{base_url}}/tickets/{{ticket_id}} | |
Authorization: Token {{auth_token}} | |
### Update Ticket Status to "False Positive" | |
PATCH {{base_url}}/tickets/{{ticket_id}} | |
Authorization: Token {{auth_token}} | |
{ | |
"Ticket": { | |
"StateID": 9 | |
} | |
} | |
### Get Organizations | |
GET {{base_url}}/organisations | |
Authorization: Token {{auth_token}} | |
### Get Contacts | |
GET {{base_url}}/contacts | |
Authorization: Token {{auth_token}} | |
### Create Contact | |
POST {{base_url}}/contacts | |
Authorization: Token {{auth_token}} | |
{ | |
"Contact": { | |
"Email": "[email protected]", | |
"Firstname": "Max", | |
"Lastname": "Mustermann", | |
"OrganisationIDs": [1], | |
"PrimaryOrganisationID": 1 | |
} | |
} | |
### Create Ticket | |
POST {{base_url}}/tickets | |
Authorization: Token {{auth_token}} | |
{ | |
"Ticket":{ | |
"OrganisationID": 1, | |
"OwnerID": 2, | |
"PriorityID": 1, | |
"QueueID": 1, | |
"StateID": 3, | |
"Title": "UC-999 - Test Ticket", | |
"TypeID": 1, | |
"ContactID": 2, | |
"Articles":[ | |
{ | |
"Body":"Connecting to a known C&C server.", | |
"Charset":"utf8", | |
"ContentType":"text/html; charset=utf8", | |
"CustomerVisible":1, | |
"From":"[email protected]", | |
"MimeType":"text/html", | |
"Subject":"The printer does not work!" | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment