/ByDiscordId


Get User Data by Discord ID

Returns user data from a Google Sheets spreadsheet based on Discord ID.

Request

  • URL

    /api/v1/roster/users/bydiscordid

  • Method

    GET

  • Query Parameters

    • discordid: The Discord ID of the user.

Response

  • Success Response

    • Code: 200 OK

    • Content:

      {
          "user_info": {
              "discord_id": "123456789012345678",
              "discord_user": "username"
          },
          "arma_data": {
              "ingame_name": "IngameName",
              "rank_name": "RankName",
              "team_name": "TeamName",
              "default_role": "DefaultRole",
              "abv": "ABV",
              "time_in_grade": "TimeInGrade",
              "ao_points": "AOPoints",
              "promotion_eligible": "PromotionEligible",
              "hire_date": "HireDate",
              "promotion_date": "PromotionDate"
          }
      }
  • Error Response

    • Code: 400 Bad Request

    • Content:

      {
          "error": "Please provide a discord_id"
      }

    OR

    • Code: 404 Not Found

    • Content:

      {
          "error": "The user specified does not exist."
      }
  • Sample Call

    GET https://api.arma.origin-development.net/api/v1/roster/users/bydiscordid?discordid=123456789012345678

Notes

  • This endpoint retrieves user data from a Google Sheets spreadsheet.

  • The Discord ID of the user is required as a query parameter.

  • If the user with the specified Discord ID is found, their information is returned.

  • If no Discord ID is provided or the user doesn't exist, appropriate error messages are returned.

Last updated