Skip to content

Instantly share code, notes, and snippets.

@vletoux
Created September 21, 2018 18:35
Show Gist options
  • Save vletoux/c6c565c8af07b4df5df65ed01ffeb917 to your computer and use it in GitHub Desktop.
Save vletoux/c6c565c8af07b4df5df65ed01ffeb917 to your computer and use it in GitHub Desktop.
{
"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