Data sources
Get data sources accessible by a user
Mock APIs
Teams
Organisations
Data sources
Database connections
Usage
Access control
Stub Mappings
- GETGet all stub mappings
- POSTCreate a new stub mapping
- DELDelete all stub mappings
- POSTReset stub mappings
- POSTPersist stub mappings
- POSTImport stub mappings
- GETGet stub mapping by ID
- PUTUpdate a stub mapping
- DELDelete a stub mapping
- POSTFind stub mappings matching metadata
- POSTDelete stub mappings matching metadata
Requests
OpenAPI
Imports
Data sources
Get data sources accessible by a user
GET
/
v1
/
users
/
{userId}
/
data-sources
curl --request GET \
--url https://wmc.wiremockapi.cloud/v1/users/{userId}/data-sources \
--header 'Authorization: Basic <encoded-value>'
{
"dataSources": [
{
"id": "abc123",
"aclObject": "jkl789",
"name": "My data source",
"lastUpdatedTime": "2024-01-17T11:46:13.481826Z",
"version": 3,
"type": "CSV",
"columnsMetadata": [
{
"name": "fullname",
"type": {
"name": "STRING"
}
},
{
"name": "dob",
"type": {
"name": "DATE",
"format": "iso8601"
}
},
{
"name": "admin",
"type": {
"name": "BOOLEAN"
}
},
{
"name": "retryLimit",
"type": {
"name": "INTEGER"
}
}
],
"state": "ENABLED",
"links": {
"self": "/v1/data-sources/abc123",
"acl": "/v1/data-sources/abc123/acl{?subjectId}"
}
},
{
"id": "def543",
"aclObject": "lkj987",
"name": "My database data source",
"lastUpdatedTime": "2024-01-17T11:46:13.481826Z",
"version": 3,
"type": "DATABASE",
"databaseConnection": "zyx321",
"tableName": "products",
"state": "ENABLED",
"links": {
"self": "/v1/data-sources/def543",
"acl": "/v1/data-sources/def543/acl{?subjectId}"
}
}
],
"links": {
"self": "/v1/users/my-user/data-sources?page=2&limit=20",
"next": "/v1/users/my-user/data-sources?page=3&limit=20",
"previous": "/v1/users/my-user/data-sources?page=1&limit=20"
},
"meta": {
"start": 21,
"end": 40,
"total": 123,
"page": 2,
"totalPages": 7
}
}
Authorizations
Basic authentication header of the form Basic <encoded-value>
, where <encoded-value>
is the base64-encoded string username:password
.
Path Parameters
Query Parameters
The amount of page items to retrieve.
The index of the page to retrieve.
A filter for the retrieved items. Only items whose name contains the filter value will be retrieved. The filter is case insensitive.
Response
200
application/json
200 response
Available options:
CSV
Available options:
ENABLED
, DISABLED
curl --request GET \
--url https://wmc.wiremockapi.cloud/v1/users/{userId}/data-sources \
--header 'Authorization: Basic <encoded-value>'
{
"dataSources": [
{
"id": "abc123",
"aclObject": "jkl789",
"name": "My data source",
"lastUpdatedTime": "2024-01-17T11:46:13.481826Z",
"version": 3,
"type": "CSV",
"columnsMetadata": [
{
"name": "fullname",
"type": {
"name": "STRING"
}
},
{
"name": "dob",
"type": {
"name": "DATE",
"format": "iso8601"
}
},
{
"name": "admin",
"type": {
"name": "BOOLEAN"
}
},
{
"name": "retryLimit",
"type": {
"name": "INTEGER"
}
}
],
"state": "ENABLED",
"links": {
"self": "/v1/data-sources/abc123",
"acl": "/v1/data-sources/abc123/acl{?subjectId}"
}
},
{
"id": "def543",
"aclObject": "lkj987",
"name": "My database data source",
"lastUpdatedTime": "2024-01-17T11:46:13.481826Z",
"version": 3,
"type": "DATABASE",
"databaseConnection": "zyx321",
"tableName": "products",
"state": "ENABLED",
"links": {
"self": "/v1/data-sources/def543",
"acl": "/v1/data-sources/def543/acl{?subjectId}"
}
}
],
"links": {
"self": "/v1/users/my-user/data-sources?page=2&limit=20",
"next": "/v1/users/my-user/data-sources?page=3&limit=20",
"previous": "/v1/users/my-user/data-sources?page=1&limit=20"
},
"meta": {
"start": 21,
"end": 40,
"total": 123,
"page": 2,
"totalPages": 7
}
}