Cloud API Overview
Base URL: https://public-api.loadgen.cloud
The LoadGen Cloud API is a REST API that provides programmatic access to LoadGen Cloud services, enabling automation of tenant onboarding, End-to-End Monitoring configuration, dashboard management, alerts, and integrations.
Base information
-
Swagger UI:
https://public-api.loadgen.cloud/swagger
- OpenAPI spec: https://public-api.loadgen.cloud/swagger/v1/swagger.json
Authentication (required for most endpoints)
Most endpoints require a bearer token in the Authorization header.
- Use
POST /api/TokenAuth/Authenticateto obtain an access token - Use
POST /api/TokenAuth/RefreshTokento refresh a token
For detailed, per-endpoint documentation, see: https://support.loadgen.com/hc/en-us/articles/32730490295965-Cloud-API-Authentication
Multi-tenancy (tenant vs host)
This API is multi-tenant. Tenant context is typically determined by the token and/or the Abp.TenantId header.
Tenant context
- If you are calling tenant-scoped endpoints, include
Abp.TenantId:unless your access token already implies the tenant context. - Tenant discovery endpoints (e.g.
Account/IsTenantAvailable,Account/ResolveTenantId) do not require tenant context.
Host (no tenant) context
- Host/admin endpoints run without a tenant context. In that case, omit the
Abp.TenantIdheader. - Some host/admin endpoints accept a
TenantIdquery/body field to operate on a specific tenant (without switching the request context).
Response envelope (ABP)
Most endpoints use an ABP-style response envelope.
- Successful calls typically return
success: trueand provide the payload underresult. - Failed calls typically return
success: falseand provide error details undererror(and sometimesunAuthorizedRequest).
Example (successful response):
`json
{
"result": {
"accessToken": "eyJ...",
"expireInSeconds": 86400
},
"targetUrl": null,
"success": true,
"error": null,
"unAuthorizedRequest": false,
"__abp": true
}
`
Quick start
Discover your tenant (optional)
Use this when you need to determine whether a tenancy name exists (and/or resolve its tenant ID).
#### Curl
`bash
curl --request POST "https://public-api.loadgen.cloud/api/services/app/Account/IsTenantAvailable" \
--header "Content-Type: application/json" \
--data-raw "{\"tenancyName\":\"your-tenant\"}"
`
#### PowerShell
`powershell
$uri = "https://public-api.loadgen.cloud/api/services/app/Account/IsTenantAvailable"
$body = @{ tenancyName = "your-tenant" } | ConvertTo-Json -Depth 10
Invoke-RestMethod -Method Post -Uri $uri -ContentType "application/json" -Body $body
`
Authenticate (get an access token)
#### Curl
`bash
curl --request POST "https://public-api.loadgen.cloud/api/TokenAuth/Authenticate" \
--header "Content-Type: application/json" \
--data-raw "{\"userNameOrEmailAddress\":\"user@example.com\",\"password\":\"your-password\"}"
`
#### PowerShell
`powershell
$uri = "https://public-api.loadgen.cloud/api/TokenAuth/Authenticate"
$body = @{
userNameOrEmailAddress = "user@example.com"
password = "your-password"
} | ConvertTo-Json -Depth 10
Invoke-RestMethod -Method Post -Uri $uri -ContentType "application/json" -Body $body
`
Call an authenticated endpoint
Once you have an accessToken, pass it as a bearer token. Add Abp.TenantId when calling tenant-scoped endpoints.
#### Curl
`bash
curl --request GET "https://public-api.loadgen.cloud/api/services/app/Session/GetCurrentLoginInformations" \
--header "Authorization: Bearer " \
--header "Abp.TenantId: "
`
#### PowerShell
`powershell
$uri = "https://public-api.loadgen.cloud/api/services/app/Session/GetCurrentLoginInformations"
$headers = @{
Authorization = "Bearer "
"Abp.TenantId" = ""
}
Invoke-RestMethod -Method Get -Uri $uri -Headers $headers
`