囲みマス API (苫小牧)
Download OpenAPI specification:Download
試合一覧取得API
試合の一覧を取得するためのエンドポイントです
以下の場合にエラーを返します (優先度順)
- 401
- リクエストにAPIトークンが含まれていない, または不正な場合
Authorizations:
BearerToken
Responses
Response samples
- 200
Content type
application/json
{- "matches": [
- {
- "matchID": "string",
- "teams": [
- {
- "teamID": 0,
- "name": "string"
}
], - "turns": 0,
- "operationMillis": 0,
- "transitionMillis": 0
}
]
}
試合状態取得API
試合中に試合の状態を取得するためのエンドポイントです
以下の場合にエラーを返します (優先度順)
- 401
- リクエストにAPIトークンが含まれていない, または不正な場合
- 404
- 参加していない試合に対するリクエスト, また存在しない試合IDの場合
- 425
- 試合開始前のリクエストの場合
Authorizations:
PIC
path Parameters
matchID required | string |
Responses
Response samples
- 200
Content type
application/json
{- "turn": 0,
- "startedAtUnixTime": 0,
- "width": 0,
- "height": 0,
- "teams": [
- {
- "teamID": 0,
- "agent": 0,
- "agents": [
- {
- "x": 0,
- "y": 0,
- "agentID": 0
}
], - "areaPoint": 0,
- "wallPoint": 0
}
], - "walls": [
- [
- 0
]
], - "areas": [
- [
- 0
]
], - "points": [
- [
- 0
]
], - "actions": [
- {
- "x": 0,
- "y": 0,
- "type": "put",
- "turn": 0,
- "agentID": 0,
- "apply": -1
}
]
}
行動更新API
試合中にエージェントの行動を更新するためのエンドポイントです
同一ターン中に複数回更新した場合は正常に受理された最後のリクエストが採用されます
並列で更新をリクエストした場合は順序を保証しません
リクエストに含まれていないエージェントの行動は停留となります
以下の場合にエラーを返します (優先度順)
- 401
- リクエストにAPIトークンが含まれていない, または不正な場合
- 422
- リクエストがフォーマットに則ってない場合
- 404
- 参加していない試合に対するリクエスト, また存在しない試合IDの場合
- 425
- 試合開始前のリクエストの場合
- 400
- 遷移ステップや試合終了後にアクセスした場合
- リクエストの中に自分のエージェント以外を指定したアクションが含まれる場合
- リクエストの中にエージェントIDが重複しているアクションが含まれる場合
Authorizations:
PIC
path Parameters
matchID required | string |
Request Body schema: application/json
required | Array of objects (ActionRequest) 行動 |
Responses
Request samples
- Payload
Content type
application/json
{- "actions": [
- {
- "x": 0,
- "y": 0,
- "type": "put",
- "agentID": 0
}
]
}
Response samples
- 202
Content type
application/json
{- "actions": [
- {
- "x": 0,
- "y": 0,
- "type": "put",
- "turn": 0,
- "agentID": 0
}
]
}
試合一覧取得API
試合開始前に自分に関連する試合の一覧を取得するためのエンドポイントです
以下の場合にエラーを返します (優先度順)
- 401
- リクエストにAPIトークンが含まれていない, または不正な場合
- 403
- APIトークンと異なるチームのリソースにアクセスした場合
Authorizations:
BearerToken
path Parameters
teamID required | string |
Responses
Response samples
- 200
Content type
application/json
{- "matches": [
- {
- "matchID": "string",
- "teams": [
- {
- "teamID": 0,
- "name": "string"
}
], - "turns": 0,
- "operationMillis": 0,
- "transitionMillis": 0
}
]
}