Island: Minor changes to API spec comments as per CR

This commit is contained in:
Shreya Malviya 2022-05-27 23:09:03 +05:30
parent 8845588ec9
commit c54b3da86d
2 changed files with 5 additions and 3 deletions

View File

@ -155,7 +155,7 @@ def init_api_resources(api: FlaskDIWrapper):
api.add_resource(IslandConfiguration)
api.add_resource(ConfigurationExport)
api.add_resource(ConfigurationImport)
# API Spec: Rename to /api/agent-binary, because information about agent runs
# API Spec: Rename to /api/agent-binaries, because information about agent runs
# and binary files are different resources
api.add_resource(MonkeyDownload)
api.add_resource(NetMap)
@ -175,7 +175,7 @@ def init_api_resources(api: FlaskDIWrapper):
api.add_resource(Log)
api.add_resource(IslandLog)
# API Spec: These two should have the same url syntax
# API Spec: These two should be the same resource, GET for download and POST for upload
api.add_resource(PBAFileDownload)
api.add_resource(FileUpload)

View File

@ -1,8 +1,10 @@
from monkey_island.cc.resources.AbstractResource import AbstractResource
from monkey_island.cc.services.infection_lifecycle import should_agent_die
class StopAgentCheck(AbstractResource):
# API Spec: Rename to AgentStopStatus or something
# API Spec: Rename to AgentStopStatus or something, endpoint for this could be
# "/api/agents/<GUID>/stop-status"
urls = ["/api/monkey-control/needs-to-stop/<int:monkey_guid>"]
def get(self, monkey_guid: int):