Create a Service
To create a Service in your Workspace, you need to know your Workspace identifier. The sample code uses a workspaceId
of 123456
. Use the actual ID value of your workspace.
The response contains a Service identifier that you should note down. You will need the serviceID when you want to configure, deploy, or delete this Service later.
The following parameters are the base parameters required to create Service.
Create a ServiceMinimum Configuration Sample
curl 'https://mock.blazemeter.com/api/v1/workspaces/123456/services' \
-X POST \
-H 'accept: */*' \
-H 'authorization: Basic Aa1Bb2Cc3Dd4Ee5Ff6Gg7Hh8Ii9Jj0Aa1Bb2Cc3Dd4Ee5Ff6' \
-H 'Content-Type: application/json' \
-d '{ "description": "This service handles foo.", "name": "My Foo Service"}'
Create a Service Request Attributes
Attributes
-
workspaceId
stringrequired
The Workspace identifier
-
description
stringDescription of the Service
-
name
stringThe name of the Service
Create a ServiceMinimum Configuration Sample POST Body (JSON)
{
"description": "This service handles foo.",
"name": "My Foo Service"
}
Response201 Created
{
"apiVersion": 1,
"error": null,
"result": {
"id": 1645,
"name": "My Foo Service",
"description": "This service handles foo.",
"created": 1563897852,
"updated": 1563897852,
"createdBy": "someone@example.com",
"updatedBy": "someone@example.com"
},
"requestId": "ec0e40cf720bdbc4"
}