如何通过BMC Remedy REST API认证获取事件详情?沙箱报错求助
Hey there, it looks like you're hitting a snag trying to authenticate to your BMC Remedy sandbox via URL-form encoded requests to fetch incidents. Let's break down the key checks and fixes based on the sandbox details you provided:
1. Verify You're Using the Correct Authentication Endpoint
First off, the Innovation Studio frontend URL you got in the email is for the web UI—you can't use that for API authentication. You need to target the Mid Tier API endpoint (your email cut off this part, but it should look like https://developerxxxx.innovate.bmc.com/arsys). The standard auth endpoints for Remedy are:
/arsys/v1/login(returns a JWT token for subsequent API calls)/api/jwt/login(alternative endpoint for JWT auth)
Don't use the AR Java API Port (46200) here—that's for direct Java SDK connections, not HTTP/HTTPS API requests. Stick to port 443 (default HTTPS) unless your sandbox's Mid Tier is configured for a non-standard port.
2. Double-Check Your Request Parameters & Headers
For application/x-www-form-urlencoded auth requests, precision matters:
- Ensure your parameter names are exactly what Remedy expects: usually
usernameandpassword(watch out for camelCase variations likeuserNamedepending on your Remedy version—stick to lowercase first unless docs specify otherwise). - Confirm the
Content-Typeheader is exactlyapplication/x-www-form-urlencoded—no typos, extra spaces, or capitalization errors. Remedy's API is strict about this header.
3. Validate Sandbox Permissions & Initialization
- Permissions: Your sandbox user might not have access to incident data by default. Log into the Innovation Studio UI, navigate to role management, and assign your user a role with
Incident Viewer(or higher) permissions. Without this, even a successful auth will return empty or forbidden responses. - Sandbox Warm-Up: Newly created Innovation Studio sandboxes can take 10-15 minutes to fully initialize all services. If you're testing immediately after setup, wait a bit and try again—you might be hitting a "service not ready" error that's not clearly reported.
4. Test with a Simple cURL Request
To rule out code-specific issues, run this cURL command (replace placeholders with your sandbox details) to test auth:
curl -X POST "https://developerxxxx.innovate.bmc.com/arsys/v1/login" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "username=YOUR_SANDBOX_USER&password=YOUR_SANDBOX_PASS"
If this returns a JWT token, your auth setup is correct, and the issue is likely in how you're using the token to fetch incidents. If it errors out, share the exact HTTP status code and response body—this will help pinpoint the problem (e.g., 401 for bad credentials, 404 for wrong endpoint).
Final Tip
If you still can't get past the error, make sure your sandbox instance is active—sometimes free developer sandboxes can be suspended if unused for a period. You can check this by logging into the Innovation Studio UI directly.
内容的提问来源于stack exchange,提问作者Suganthan Raj

