Created
September 21, 2018 18:35
-
-
Save vletoux/c6c565c8af07b4df5df65ed01ffeb917 to your computer and use it in GitHub Desktop.
This file contains 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
{ | |
"swagger":"2.0", | |
"info":{ | |
"version":"v1", | |
"title":"PingCastle API" | |
}, | |
"paths":{ | |
"/api/Agent/Login":{ | |
"post":{ | |
"tags":[ | |
"Agent" | |
], | |
"summary":"Login and get a token for API", | |
"operationId":"ApiAgentLoginPost", | |
"consumes":[ | |
"application/json-patch+json", | |
"application/json", | |
"text/json", | |
"application/*+json" | |
], | |
"produces":[ | |
], | |
"parameters":[ | |
{ | |
"name":"login", | |
"in":"body", | |
"description":"The API key previously registered in the application.", | |
"required":false, | |
"schema":{ | |
"$ref":"#/definitions/LoginData" | |
} | |
} | |
], | |
"responses":{ | |
"200":{ | |
"description":"token returned" | |
}, | |
"400":{ | |
"description":"Invalid API key" | |
} | |
} | |
} | |
}, | |
"/api/Agent/SendReport":{ | |
"post":{ | |
"tags":[ | |
"Agent" | |
], | |
"summary":"Import a report", | |
"operationId":"ApiAgentSendReportPost", | |
"consumes":[ | |
"application/json-patch+json", | |
"application/json", | |
"text/json", | |
"application/*+json" | |
], | |
"produces":[ | |
], | |
"parameters":[ | |
{ | |
"name":"report", | |
"in":"body", | |
"description":"the xml report", | |
"required":false, | |
"schema":{ | |
"$ref":"#/definitions/ReportData" | |
} | |
}, | |
{ | |
"name":"Authorization", | |
"in":"header", | |
"description":"access token", | |
"required":true, | |
"type":"string" | |
} | |
], | |
"responses":{ | |
"200":{ | |
"description":"report imported" | |
}, | |
"400":{ | |
"description":"report is not imported" | |
}, | |
"401":{ | |
"description":"authentication failed" | |
} | |
} | |
} | |
} | |
}, | |
"definitions":{ | |
"LoginData":{ | |
"type":"object", | |
"properties":{ | |
"apikey":{ | |
"type":"string" | |
}, | |
"location":{ | |
"type":"string" | |
} | |
} | |
}, | |
"ReportData":{ | |
"type":"object", | |
"properties":{ | |
"filename":{ | |
"type":"string" | |
}, | |
"xmlReport":{ | |
"type":"string" | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment