MechaMental
Api reference

Commits

Get App Activity

GET
/v1/orgs/{org_id}/workspaces/{workspace_id}/apps/{app_id}/timeline

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
app_id*App Id

Query Parameters

limit?Limit

Max events per page

Default20
Range1 <= value <= 100
cursor?|

Cursor from previous page

Header Parameters

authorization?string|null

Response Body

application/json

application/json

curl -X GET "https://loading/v1/orgs/string/workspaces/string/apps/string/timeline"
{
  "total": 0,
  "has_more": false,
  "next_cursor": "string",
  "events": [
    {
      "type": "commit",
      "timestamp": "string",
      "commit": {
        "commit_id": "string",
        "branch_id": "string",
        "message": "string",
        "author": "string",
        "changes": [
          {
            "entity_type": "string",
            "entity_id": "string",
            "entity_name": "string",
            "operation": "string",
            "change_diff": [
              {
                "field": "string",
                "old": null,
                "new": null,
                "old_excerpt": "string",
                "new_excerpt": "string"
              }
            ],
            "parent_entity_type": "string",
            "parent_entity_id": "string"
          }
        ],
        "is_revert": false,
        "reverts_commit_id": "string"
      },
      "release": {
        "release_id": "string",
        "release_tag": "string",
        "release_number": 0,
        "status": "string",
        "description": "string",
        "created_by": "string",
        "endpoint_count": 0,
        "augmentation_count": 0
      },
      "deployment": {
        "deployment_id": "string",
        "environment_id": "string",
        "environment_name": "string",
        "release_id": "string",
        "release_tag": "string",
        "action": "string",
        "previous_release_id": "string",
        "deployed_by": "string"
      }
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

List Commits By App

GET
/v1/orgs/{org_id}/workspaces/{workspace_id}/apps/{app_id}/commits

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
app_id*App Id

Query Parameters

limit?Limit

Maximum number of items to return (1-100)

Default20
Range1 <= value <= 100
cursor?|

Cursor for pagination (from previous response's next_cursor)

Header Parameters

authorization?string|null

Response Body

application/json

application/json

curl -X GET "https://loading/v1/orgs/string/workspaces/string/apps/string/commits"
{
  "total": 0,
  "has_more": false,
  "next_cursor": "string",
  "commits": [
    {
      "commit_id": "string",
      "branch_id": "string",
      "app_id": "string",
      "message": "string",
      "author": "string",
      "timestamp": "string",
      "changes": [
        {
          "entity_type": "string",
          "entity_id": "string",
          "entity_name": "string",
          "operation": "string",
          "change_diff": [
            {
              "field": "string",
              "old": null,
              "new": null,
              "old_excerpt": "string",
              "new_excerpt": "string"
            }
          ],
          "parent_entity_type": "string",
          "parent_entity_id": "string"
        }
      ],
      "is_revert": false,
      "reverts_commit_id": "string",
      "reverted_by_commit_id": "string"
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

List Commits By Branch

GET
/v1/orgs/{org_id}/workspaces/{workspace_id}/apps/{app_id}/branches/{branch_id}/commits

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
app_id*App Id
branch_id*Branch Id

Query Parameters

limit?Limit

Maximum number of items to return (1-100)

Default20
Range1 <= value <= 100
cursor?|

Cursor for pagination (from previous response's next_cursor)

Header Parameters

authorization?string|null

Response Body

application/json

application/json

curl -X GET "https://loading/v1/orgs/string/workspaces/string/apps/string/branches/string/commits"
{
  "total": 0,
  "has_more": false,
  "next_cursor": "string",
  "commits": [
    {
      "commit_id": "string",
      "branch_id": "string",
      "app_id": "string",
      "message": "string",
      "author": "string",
      "timestamp": "string",
      "changes": [
        {
          "entity_type": "string",
          "entity_id": "string",
          "entity_name": "string",
          "operation": "string",
          "change_diff": [
            {
              "field": "string",
              "old": null,
              "new": null,
              "old_excerpt": "string",
              "new_excerpt": "string"
            }
          ],
          "parent_entity_type": "string",
          "parent_entity_id": "string"
        }
      ],
      "is_revert": false,
      "reverts_commit_id": "string",
      "reverted_by_commit_id": "string"
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

List Commits By Augmentation

GET
/v1/orgs/{org_id}/workspaces/{workspace_id}/augmentations/{augmentation_id}/commits

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
augmentation_id*Augmentation Id

Query Parameters

limit?Limit

Maximum number of items to return (1-100)

Default20
Range1 <= value <= 100
cursor?|

Cursor for pagination (from previous response's next_cursor)

Header Parameters

authorization?string|null

Response Body

application/json

application/json

curl -X GET "https://loading/v1/orgs/string/workspaces/string/augmentations/string/commits"
{
  "total": 0,
  "has_more": false,
  "next_cursor": "string",
  "commits": [
    {
      "commit_id": "string",
      "branch_id": "string",
      "app_id": "string",
      "message": "string",
      "author": "string",
      "timestamp": "string",
      "changes": [
        {
          "entity_type": "string",
          "entity_id": "string",
          "entity_name": "string",
          "operation": "string",
          "change_diff": [
            {
              "field": "string",
              "old": null,
              "new": null,
              "old_excerpt": "string",
              "new_excerpt": "string"
            }
          ],
          "parent_entity_type": "string",
          "parent_entity_id": "string"
        }
      ],
      "is_revert": false,
      "reverts_commit_id": "string",
      "reverted_by_commit_id": "string"
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

List Commits By Endpoint

GET
/v1/orgs/{org_id}/workspaces/{workspace_id}/endpoints/{endpoint_id}/commits

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
endpoint_id*Endpoint Id

Query Parameters

limit?Limit

Maximum number of items to return (1-100)

Default20
Range1 <= value <= 100
cursor?|

Cursor for pagination (from previous response's next_cursor)

Header Parameters

authorization?string|null

Response Body

application/json

application/json

curl -X GET "https://loading/v1/orgs/string/workspaces/string/endpoints/string/commits"
{
  "total": 0,
  "has_more": false,
  "next_cursor": "string",
  "commits": [
    {
      "commit_id": "string",
      "branch_id": "string",
      "app_id": "string",
      "message": "string",
      "author": "string",
      "timestamp": "string",
      "changes": [
        {
          "entity_type": "string",
          "entity_id": "string",
          "entity_name": "string",
          "operation": "string",
          "change_diff": [
            {
              "field": "string",
              "old": null,
              "new": null,
              "old_excerpt": "string",
              "new_excerpt": "string"
            }
          ],
          "parent_entity_type": "string",
          "parent_entity_id": "string"
        }
      ],
      "is_revert": false,
      "reverts_commit_id": "string",
      "reverted_by_commit_id": "string"
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Get Commit

GET
/v1/orgs/{org_id}/workspaces/{workspace_id}/commits/{commit_id}

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
commit_id*Commit Id

Query Parameters

include_snapshots?Include Snapshots

Include before/after snapshots

Defaultfalse

Header Parameters

authorization?string|null

Response Body

application/json

application/json

curl -X GET "https://loading/v1/orgs/string/workspaces/string/commits/string"
{
  "commit_id": "string",
  "branch_id": "string",
  "app_id": "string",
  "message": "string",
  "author": "string",
  "timestamp": "string",
  "changes": [
    {}
  ],
  "is_revert": false,
  "reverts_commit_id": "string",
  "reverted_by_commit_id": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Revert Commit

POST
/v1/orgs/{org_id}/workspaces/{workspace_id}/apps/{app_id}/branches/{branch_id}/commits/{commit_id}/revert

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
app_id*App Id
branch_id*Branch Id
commit_id*Commit Id

Header Parameters

authorization?string|null

Response Body

application/json

application/json

curl -X POST "https://loading/v1/orgs/string/workspaces/string/apps/string/branches/string/commits/string/revert"
{
  "message": "string",
  "revert_commit": {
    "commit_id": "string",
    "branch_id": "string",
    "app_id": "string",
    "message": "string",
    "author": "string",
    "timestamp": "string",
    "changes": [
      {
        "entity_type": "string",
        "entity_id": "string",
        "entity_name": "string",
        "operation": "string",
        "change_diff": [
          {
            "field": "string",
            "old": null,
            "new": null,
            "old_excerpt": "string",
            "new_excerpt": "string"
          }
        ],
        "parent_entity_type": "string",
        "parent_entity_id": "string"
      }
    ],
    "is_revert": false,
    "reverts_commit_id": "string",
    "reverted_by_commit_id": "string"
  },
  "entities_reverted": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}