curl --request PUT \
--url https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"mockApi": {
"name": "My modified mock API",
"hostname": "my-new-mock-api",
"adminSecurityEnabled": false
}
}
'{
"mockApi": {
"id": "jjl8y",
"aclObject": "gkqjy",
"name": "My modified mock API",
"state": "RUNNING",
"adminSecurityEnabled": true,
"exportState": "EXPORT_ALLOWED",
"createdDate": "2024-08-23T21:34:36.595372Z",
"openApiGitIntegration": "jjl8y-openapi-integration-git",
"links": {
"self": "/v1/mock-apis/jjl8y",
"requests": "/v1/mock-apis/jjl8y/requests",
"mappings": "/v1/mock-apis/jjl8y/mappings",
"scenarios": "/v1/mock-apis/jjl8y/scenarios",
"recordings": {
"start": "/v1/mock-apis/jjl8y/recordings/start",
"stop": "/v1/mock-apis/jjl8y/recordings/stop",
"status": "/v1/mock-apis/jjl8y/recordings/status",
"snapshot": "/v1/mock-apis/jjl8y/recordings/snapshot"
},
"imports": "/v1/mock-apis/jjl8y/imports",
"organisation": "/v1/organisations/mgk7g",
"apiTemplate": "/v1/api-templates/8nd5x",
"aclObject": "/v1/acl/objects/gkqjy",
"aclRoles": "/v1/acl/objects/gkqjy/roles",
"invitations": "/v1/mock-apis/jjl8y/invitations",
"acl": "/v1/mock-apis/jjl8y/acl{?subjectId}",
"versionHistoryCommits": "/v1/mock-apis/jjl8y/version-history/commits"
},
"baseUrl": "https://jjl8y.wiremockapi.cloud",
"domainNames": [
{
"domainName": "my-new-mock-api.wiremockapi.cloud",
"editableSubdomainPart": "my-new-mock-api",
"urls": [
{
"url": "https://my-new-mock-api.wiremockapi.cloud"
},
{
"url": "http://my-new-mock-api.wiremockapi.cloud"
}
]
},
{
"domainName": "jjl8y.wiremockapi.cloud",
"urls": [
{
"url": "https://jjl8y.wiremockapi.cloud"
},
{
"url": "http://jjl8y.wiremockapi.cloud"
}
]
}
],
"domains": [
"jjl8y.wiremockapi.cloud",
"my-new-mock-api.wiremockapi.cloud"
]
}
}curl --request PUT \
--url https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"mockApi": {
"name": "My modified mock API",
"hostname": "my-new-mock-api",
"adminSecurityEnabled": false
}
}
'{
"mockApi": {
"id": "jjl8y",
"aclObject": "gkqjy",
"name": "My modified mock API",
"state": "RUNNING",
"adminSecurityEnabled": true,
"exportState": "EXPORT_ALLOWED",
"createdDate": "2024-08-23T21:34:36.595372Z",
"openApiGitIntegration": "jjl8y-openapi-integration-git",
"links": {
"self": "/v1/mock-apis/jjl8y",
"requests": "/v1/mock-apis/jjl8y/requests",
"mappings": "/v1/mock-apis/jjl8y/mappings",
"scenarios": "/v1/mock-apis/jjl8y/scenarios",
"recordings": {
"start": "/v1/mock-apis/jjl8y/recordings/start",
"stop": "/v1/mock-apis/jjl8y/recordings/stop",
"status": "/v1/mock-apis/jjl8y/recordings/status",
"snapshot": "/v1/mock-apis/jjl8y/recordings/snapshot"
},
"imports": "/v1/mock-apis/jjl8y/imports",
"organisation": "/v1/organisations/mgk7g",
"apiTemplate": "/v1/api-templates/8nd5x",
"aclObject": "/v1/acl/objects/gkqjy",
"aclRoles": "/v1/acl/objects/gkqjy/roles",
"invitations": "/v1/mock-apis/jjl8y/invitations",
"acl": "/v1/mock-apis/jjl8y/acl{?subjectId}",
"versionHistoryCommits": "/v1/mock-apis/jjl8y/version-history/commits"
},
"baseUrl": "https://jjl8y.wiremockapi.cloud",
"domainNames": [
{
"domainName": "my-new-mock-api.wiremockapi.cloud",
"editableSubdomainPart": "my-new-mock-api",
"urls": [
{
"url": "https://my-new-mock-api.wiremockapi.cloud"
},
{
"url": "http://my-new-mock-api.wiremockapi.cloud"
}
]
},
{
"domainName": "jjl8y.wiremockapi.cloud",
"urls": [
{
"url": "https://jjl8y.wiremockapi.cloud"
},
{
"url": "http://jjl8y.wiremockapi.cloud"
}
]
}
],
"domains": [
"jjl8y.wiremockapi.cloud",
"my-new-mock-api.wiremockapi.cloud"
]
}
}The ID of the Mock API
5 - 10"jjl8y"
Show child attributes
The display name of the mock API.
Whether security is enabled on the mock API's /acl/* endpoints.
The friendly, unqualified domain name for this mock API's base URL
e.g. in the SaaS edition, for a base URL of https://my-api.wiremockapi.cloud this value should be set to my-api.
200 response
Show child attributes
The display name of the mock API.
Whether the API is running or stopped.
Whether security is enabled on the mock API's /__admin/* endpoints.
Show child attributes
The link to the access control list for this mock API.
The list of domain names that can be used to address this mock API.
The type of the mock API. Defaults to the "unstructured" type if not specified.
openapi, grpc, graphql The ACL object ID of the entity.