Add a Public Token
API Explorer: /masters/{masterId}/public-token
To create a public token for a given master, you need to know the masterId
of a givne master. The sample code creates a public token with a masterId
of 12345678
. Use the masterId
of the actual master you want to add the public token to in place of 12345678
.
masterId
for the master in question, you can use the List Masters API to find it.Add a Public Token
curl 'https://a.blazemeter.com/api/v4/masters/12345678/public-token' \
-X POST \
-H 'Content-Type: application/json' \
--user 'api_key_id:api_key_secret' \
-d '{"publicToken":null}'
Add a Public Token Request Attributes
Attributes
-
publicToken
nullrequired
The public token attached to this master. This should always be set to
null
Add a Public TokenAdd a Public Token POST Body (JSON)
{
"publicToken": null
}
Add a Public Token Response Attributes
Attributes
-
publicToken
stringread-only
The token that is generated to allow for public access to the report. This value goes into the following part of the blazemeter URL:
https://a.blazemeter.com/app/?public-token={publicToken}
#/.../masters/{masterId}
Response201 Created
{
"api_version": 4,
"error": null,
"result": {
"publicToken": "RUSd9VYDPnIW5SmBWDkqRXeovQ5U0XFtwGCLNikkxgELMGSafl",
"new": false
},
"request_id": "5ef2054733d53"
}