teamAccessLogs
Gets the access logs for the current team.
Details
- Method:
GET - Path:
/team.accessLogs - Operation ID:
team_accessLogs
Parameters
{
"token": {
"description": "Authentication token. Requires scope: `admin`",
"required": true,
"location": "query",
"type": "string"
},
"before": {
"description": "End of time range of logs to include in results (inclusive).",
"required": false,
"location": "query",
"type": "string"
},
"count": {
"description": "",
"required": false,
"location": "query",
"type": "string"
},
"page": {
"description": "",
"required": false,
"location": "query",
"type": "string"
}
}Response Schema
{
"additionalProperties": false,
"description": "Schema for successful response from team.accessLogs method",
"properties": {
"logins": {
"items": {
"additionalProperties": false,
"properties": {
"count": {
"type": "integer"
},
"country": {
"type": [
"string",
"null"
]
},
"date_first": {
"type": "integer"
},
"date_last": {
"type": "integer"
},
"ip": {
"type": [
"string",
"null"
]
},
"isp": {
"type": [
"string",
"null"
]
},
"region": {
"type": [
"string",
"null"
]
},
"user_agent": {
"type": "string"
},
"user_id": {
"pattern": "^[UW][A-Z0-9]{2,}$",
"title": "User ID",
"type": "string"
},
"username": {
"type": "string"
}
},
"required": [
"user_id",
"username",
"date_first",
"date_last",
"count",
"ip",
"user_agent",
"isp",
"country",
"region"
],
"type": "object"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"ok": {
"enum": [
true
],
"title": "default success response",
"type": "boolean"
},
"paging": {
"additionalProperties": false,
"properties": {
"count": {
"type": "integer"
},
"page": {
"type": "integer"
},
"pages": {
"type": "integer"
},
"per_page": {
"type": "integer"
},
"spill": {
"type": "integer"
},
"total": {
"type": "integer"
}
},
"required": [
"page",
"total"
],
"title": "paging object",
"type": "object"
}
},
"required": [
"ok",
"logins",
"paging"
],
"title": "team.accessLogs schema",
"type": "object"
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('slack')
# Call this tool
result = await agent.call_tool('teamAccessLogs', {
# Add required parameters here
})