Get mock APIs accessible to a user
curl --request GET \
--url https://wmc.wiremockapi.cloud/v1/users/{userId}/apis \
--header 'Authorization: <api-key>'import requests
url = "https://wmc.wiremockapi.cloud/v1/users/{userId}/apis"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://wmc.wiremockapi.cloud/v1/users/{userId}/apis', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://wmc.wiremockapi.cloud/v1/users/{userId}/apis",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://wmc.wiremockapi.cloud/v1/users/{userId}/apis"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://wmc.wiremockapi.cloud/v1/users/{userId}/apis")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://wmc.wiremockapi.cloud/v1/users/{userId}/apis")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"links": {
"self": "/v1/users/9gd5l/apis?limit=20&page=1"
},
"meta": {
"start": 1,
"end": 1,
"total": 1,
"page": 1,
"totalPages": 1
},
"mockApis": [
{
"id": "63om1",
"aclObject": "1z6rd",
"name": "Example Mock API",
"description": "An API consisting of assorted stubs.",
"state": "RUNNING",
"adminSecurityEnabled": true,
"exportState": "EXPORT_ALLOWED",
"createdDate": "2024-08-23T20:15:32.432385Z",
"openApiGitIntegration": "63om1-openapi-integration-git",
"links": {
"self": "/v1/mock-apis/63om1",
"requests": "/v1/mock-apis/63om1/requests",
"mappings": "/v1/mock-apis/63om1/mappings",
"scenarios": "/v1/mock-apis/63om1/scenarios",
"recordings": {
"start": "/v1/mock-apis/63om1/recordings/start",
"stop": "/v1/mock-apis/63om1/recordings/stop",
"status": "/v1/mock-apis/63om1/recordings/status",
"snapshot": "/v1/mock-apis/63om1/recordings/snapshot"
},
"imports": "/v1/mock-apis/63om1/imports",
"organisation": "/v1/organisations/mgk7g",
"aclObject": "/v1/acl/objects/1z6rd",
"aclRoles": "/v1/acl/objects/1z6rd/roles",
"invitations": "/v1/mock-apis/63om1/invitations",
"acl": "/v1/mock-apis/63om1/acl{?subjectId}",
"versionHistoryCommits": "/v1/mock-apis/63om1/version-history/commits"
},
"baseUrl": "https://63om1.wiremockapi.cloud",
"domainNames": [
{
"domainName": "63om1.wiremockapi.cloud",
"urls": [
{
"url": "https://63om1.wiremockapi.cloud"
},
{
"url": "http://63om1.wiremockapi.cloud"
}
]
}
],
"domains": [
"63om1.wiremockapi.cloud"
]
}
],
"aclObjects": [
{
"id": "1z6rd",
"objectType": "mock-api",
"name": "Example Mock API",
"aclGrants": [
"9gd5l-1z6rd-mock_api_admin"
],
"links": {
"self": "/v1/acl/objects/1z6rd",
"grants": "/v1/acl/grants?aclObjectId=1z6rd"
}
}
],
"openApiGitIntegrations": []
}"Credentials are required to access this resource."{
"errors": [
{
"title": "Forbidden",
"source": {}
}
]
}Mock APIs
Get mock APIs accessible to a user
GET
/
v1
/
users
/
{userId}
/
apis
Get mock APIs accessible to a user
curl --request GET \
--url https://wmc.wiremockapi.cloud/v1/users/{userId}/apis \
--header 'Authorization: <api-key>'import requests
url = "https://wmc.wiremockapi.cloud/v1/users/{userId}/apis"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://wmc.wiremockapi.cloud/v1/users/{userId}/apis', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://wmc.wiremockapi.cloud/v1/users/{userId}/apis",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://wmc.wiremockapi.cloud/v1/users/{userId}/apis"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://wmc.wiremockapi.cloud/v1/users/{userId}/apis")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://wmc.wiremockapi.cloud/v1/users/{userId}/apis")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"links": {
"self": "/v1/users/9gd5l/apis?limit=20&page=1"
},
"meta": {
"start": 1,
"end": 1,
"total": 1,
"page": 1,
"totalPages": 1
},
"mockApis": [
{
"id": "63om1",
"aclObject": "1z6rd",
"name": "Example Mock API",
"description": "An API consisting of assorted stubs.",
"state": "RUNNING",
"adminSecurityEnabled": true,
"exportState": "EXPORT_ALLOWED",
"createdDate": "2024-08-23T20:15:32.432385Z",
"openApiGitIntegration": "63om1-openapi-integration-git",
"links": {
"self": "/v1/mock-apis/63om1",
"requests": "/v1/mock-apis/63om1/requests",
"mappings": "/v1/mock-apis/63om1/mappings",
"scenarios": "/v1/mock-apis/63om1/scenarios",
"recordings": {
"start": "/v1/mock-apis/63om1/recordings/start",
"stop": "/v1/mock-apis/63om1/recordings/stop",
"status": "/v1/mock-apis/63om1/recordings/status",
"snapshot": "/v1/mock-apis/63om1/recordings/snapshot"
},
"imports": "/v1/mock-apis/63om1/imports",
"organisation": "/v1/organisations/mgk7g",
"aclObject": "/v1/acl/objects/1z6rd",
"aclRoles": "/v1/acl/objects/1z6rd/roles",
"invitations": "/v1/mock-apis/63om1/invitations",
"acl": "/v1/mock-apis/63om1/acl{?subjectId}",
"versionHistoryCommits": "/v1/mock-apis/63om1/version-history/commits"
},
"baseUrl": "https://63om1.wiremockapi.cloud",
"domainNames": [
{
"domainName": "63om1.wiremockapi.cloud",
"urls": [
{
"url": "https://63om1.wiremockapi.cloud"
},
{
"url": "http://63om1.wiremockapi.cloud"
}
]
}
],
"domains": [
"63om1.wiremockapi.cloud"
]
}
],
"aclObjects": [
{
"id": "1z6rd",
"objectType": "mock-api",
"name": "Example Mock API",
"aclGrants": [
"9gd5l-1z6rd-mock_api_admin"
],
"links": {
"self": "/v1/acl/objects/1z6rd",
"grants": "/v1/acl/grants?aclObjectId=1z6rd"
}
}
],
"openApiGitIntegrations": []
}"Credentials are required to access this resource."{
"errors": [
{
"title": "Forbidden",
"source": {}
}
]
}Path Parameters
Query Parameters
A filter for the retrieved items. Only items whose name contains the filter value will be retrieved. The filter is case insensitive.
Comma-separated list of sort fields. Prefix with - for descending order. Supported fields: name, createdDate.
Filter mock APIs by ACL subject type. Must be used together with subjectId.
Available options:
team, user Filter mock APIs by ACL subject ID. Must be used together with subjectType.
Required range:
x >= 1Required range:
x >= 1⌘I