Mprove
.json
SyncRepo
POST/api/ToBackendSyncRepo

Sync local git repo state with server git repo state

Request Body

application/json

Response Body

application/json

curl -X POST "http://localhost:3000/api/ToBackendSyncRepo" \  -H "Content-Type: application/json" \  -d '{    "info": {      "name": "api/ToBackendSyncRepo",      "traceId": "string",      "idempotencyKey": "string"    },    "payload": {      "projectId": "string",      "repoId": "string",      "branchId": "string",      "lastCommit": "string",      "envId": "string",      "direction": "to-server",      "changedFiles": [        {          "path": "string"        }      ],      "deletedFiles": [        {          "path": "string"        }      ]    }  }'
{
  "info": {
    "path": "/api/ToBackendSyncRepo",
    "method": "POST",
    "mproveVersion": "string",
    "duration": 0,
    "status": "Ok",
    "traceId": "string",
    "error": null
  },
  "payload": {
    "orgId": "string",
    "repoId": "string",
    "validationErrorsTotal": 0,
    "validationErrors": [
      {
        "title": "string",
        "message": "string",
        "lines": [
          {
            "fileId": "string",
            "fileName": "string",
            "lineNumber": -9007199254740991
          }
        ]
      }
    ],
    "devChangesToCommit": [
      {
        "fileName": "string",
        "fileId": "string",
        "parentPath": "string",
        "status": "New",
        "content": "string"
      }
    ],
    "repo": {
      "orgId": "string",
      "projectId": "string",
      "repoId": "string",
      "currentBranchId": "string",
      "repoStatus": "NeedCommit",
      "conflicts": [
        {
          "fileId": "string",
          "fileName": "string",
          "lineNumber": -9007199254740991
        }
      ],
      "nodes": [
        {
          "id": "string",
          "isFolder": true,
          "name": "string",
          "fileId": "string",
          "children": [
            {
              "id": "string",
              "isFolder": true,
              "name": "string",
              "fileId": "string",
              "children": []
            }
          ]
        }
      ]
    },
    "needValidate": true,
    "structId": "string",
    "direction": "to-server",
    "appliedChangesOnServer": [
      "string"
    ]
  }
}