PUT
/
v1
/
mock-apis
/
{mockApiId}
/
open-api
/
push
curl --request PUT \
  --url https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/open-api/push \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "push": {
    "outOfSyncPolicy": "abort"
  }
}'
{
  "job": {
    "id": "5947aff3-947b-4dfb-90f5-d324684e97db",
    "jobType": "open-api-git-pull",
    "status": "ERROR",
    "started": "2024-09-05T10:20:46.143759190Z",
    "links": {
      "self": "/v1/mock-apis/0ozge/__admin/etc/jobs/5947aff3-947b-4dfb-90f5-d324684e97db"
    },
    "finished": "2024-09-05T10:20:46.200386224Z",
    "elapsed": "PT0.056627034S",
    "outcome": {
      "errorCode": "NO_LOCAL_HEAD",
      "errors": [
        {
          "code": 112,
          "title": "No previous pull",
          "detail": "This is the first time pulling from Git."
        }
      ]
    }
  }
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

mockApiId
string
required

The ID of the Mock API

Required string length: 5 - 10

Body

application/json
push
object
required

Response

202 - application/json
Successfully initiated push job
job
object
required