Skip to main content
POST
/
v1
/
users
/
{userId}
/
data-sources
curl --request POST \
  --url https://wmc.wiremockapi.cloud/v1/users/{userId}/data-sources \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "dataSource": {
    "name": "My data source",
    "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"
        }
      }
    ],
    "rows": [
      [
        "Alice S",
        "1975-05-31",
        "true",
        "3"
      ],
      [
        "Bob B",
        "1959-11-16",
        "false",
        "1"
      ],
      [
        "Sam M",
        "1999-07-02",
        "false",
        "0"
      ]
    ]
  }
}
'
{
"dataSource": {
"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}"
}
}
}

Authorizations

Authorization
string
header
required

Your API key prefixed by 'Token '

Path Parameters

userId
string
required

Body

application/json
dataSource
CSV · object
required
  • CSV
  • Database

Response

Success

dataSource
CSV · object
required
  • CSV
  • Database