MechaMental
Api reference

Approvals

List Organization Policies

GET
/v1/organizations/{org_id}/approval-policies

Path Parameters

org_id*Org Id

Query Parameters

search?|

Search by policy name

Header Parameters

authorization?string|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/v1/organizations/string/approval-policies"
{
  "total": 0,
  "has_more": false,
  "next_cursor": "string",
  "policies": [
    {
      "policy_id": "string",
      "organization_id": "string",
      "workspace_id": "string",
      "scope": "string",
      "name": "string",
      "description": "string",
      "enabled": true,
      "priority": 0,
      "conditions": {
        "resource_types": [
          "string"
        ],
        "action_types": [
          "string"
        ],
        "required_tags": {
          "property1": "string",
          "property2": "string"
        },
        "custom_rules": [
          {
            "field": "string",
            "operator": "string",
            "value": null
          }
        ]
      },
      "approval_requirements": {
        "min_approvals": 0,
        "approver_roles": [
          "string"
        ],
        "approver_permissions": [
          "string"
        ],
        "specific_approvers": [
          "string"
        ],
        "require_org_admin": true,
        "require_workspace_admin": true,
        "allow_self_approval": true,
        "expires_after_hours": 0
      },
      "created_by": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ]
}
{
  "error": "AUTHENTICATION_FAILED",
  "message": "Authentication required",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 401
}
{
  "error": "FORBIDDEN",
  "message": "You don't have permission to perform this action",
  "details": {
    "required_permission": "resource:action"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 403
}
{
  "error": "RESOURCE_NOT_FOUND",
  "message": "The requested resource was not found",
  "details": {
    "resource_type": "example",
    "resource_id": "xxx"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 404
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
{
  "error": "INTERNAL_SERVER_ERROR",
  "message": "An unexpected error occurred",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 500
}

Create Organization Policy

POST
/v1/organizations/{org_id}/approval-policies

Path Parameters

org_id*Org Id

Header Parameters

authorization?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/v1/organizations/string/approval-policies" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{
  "policy_id": "string",
  "organization_id": "string",
  "workspace_id": "string",
  "scope": "string",
  "name": "string",
  "description": "string",
  "enabled": true,
  "priority": 0,
  "conditions": {
    "resource_types": [
      "string"
    ],
    "action_types": [
      "string"
    ],
    "required_tags": {
      "property1": "string",
      "property2": "string"
    },
    "custom_rules": [
      {
        "field": "string",
        "operator": "string",
        "value": null
      }
    ]
  },
  "approval_requirements": {
    "min_approvals": 0,
    "approver_roles": [
      "string"
    ],
    "approver_permissions": [
      "string"
    ],
    "specific_approvers": [
      "string"
    ],
    "require_org_admin": true,
    "require_workspace_admin": true,
    "allow_self_approval": true,
    "expires_after_hours": 0
  },
  "created_by": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "error": "AUTHENTICATION_FAILED",
  "message": "Authentication required",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 401
}
{
  "error": "FORBIDDEN",
  "message": "You don't have permission to perform this action",
  "details": {
    "required_permission": "resource:action"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 403
}
{
  "error": "RESOURCE_NOT_FOUND",
  "message": "The requested resource was not found",
  "details": {
    "resource_type": "example",
    "resource_id": "xxx"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 404
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
{
  "error": "INTERNAL_SERVER_ERROR",
  "message": "An unexpected error occurred",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 500
}

Get Organization Policy

GET
/v1/organizations/{org_id}/approval-policies/{policy_id}

Path Parameters

org_id*Org Id
policy_id*Policy Id

Header Parameters

authorization?string|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/v1/organizations/string/approval-policies/string"
{
  "policy_id": "string",
  "organization_id": "string",
  "workspace_id": "string",
  "scope": "string",
  "name": "string",
  "description": "string",
  "enabled": true,
  "priority": 0,
  "conditions": {
    "resource_types": [
      "string"
    ],
    "action_types": [
      "string"
    ],
    "required_tags": {
      "property1": "string",
      "property2": "string"
    },
    "custom_rules": [
      {
        "field": "string",
        "operator": "string",
        "value": null
      }
    ]
  },
  "approval_requirements": {
    "min_approvals": 0,
    "approver_roles": [
      "string"
    ],
    "approver_permissions": [
      "string"
    ],
    "specific_approvers": [
      "string"
    ],
    "require_org_admin": true,
    "require_workspace_admin": true,
    "allow_self_approval": true,
    "expires_after_hours": 0
  },
  "created_by": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "error": "AUTHENTICATION_FAILED",
  "message": "Authentication required",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 401
}
{
  "error": "FORBIDDEN",
  "message": "You don't have permission to perform this action",
  "details": {
    "required_permission": "resource:action"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 403
}
{
  "error": "RESOURCE_NOT_FOUND",
  "message": "The requested resource was not found",
  "details": {
    "resource_type": "example",
    "resource_id": "xxx"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 404
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
{
  "error": "INTERNAL_SERVER_ERROR",
  "message": "An unexpected error occurred",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 500
}

Delete Organization Policy

DELETE
/v1/organizations/{org_id}/approval-policies/{policy_id}

Path Parameters

org_id*Org Id
policy_id*Policy Id

Header Parameters

authorization?string|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://loading/v1/organizations/string/approval-policies/string"
null
{
  "error": "AUTHENTICATION_FAILED",
  "message": "Authentication required",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 401
}
{
  "error": "FORBIDDEN",
  "message": "You don't have permission to perform this action",
  "details": {
    "required_permission": "resource:action"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 403
}
{
  "error": "RESOURCE_NOT_FOUND",
  "message": "The requested resource was not found",
  "details": {
    "resource_type": "example",
    "resource_id": "xxx"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 404
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
{
  "error": "INTERNAL_SERVER_ERROR",
  "message": "An unexpected error occurred",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 500
}

Update Organization Policy

PUT
/v1/organizations/{org_id}/approval-policies/{policy_id}

Path Parameters

org_id*Org Id
policy_id*Policy Id

Header Parameters

authorization?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://loading/v1/organizations/string/approval-policies/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "policy_id": "string",
  "organization_id": "string",
  "workspace_id": "string",
  "scope": "string",
  "name": "string",
  "description": "string",
  "enabled": true,
  "priority": 0,
  "conditions": {
    "resource_types": [
      "string"
    ],
    "action_types": [
      "string"
    ],
    "required_tags": {
      "property1": "string",
      "property2": "string"
    },
    "custom_rules": [
      {
        "field": "string",
        "operator": "string",
        "value": null
      }
    ]
  },
  "approval_requirements": {
    "min_approvals": 0,
    "approver_roles": [
      "string"
    ],
    "approver_permissions": [
      "string"
    ],
    "specific_approvers": [
      "string"
    ],
    "require_org_admin": true,
    "require_workspace_admin": true,
    "allow_self_approval": true,
    "expires_after_hours": 0
  },
  "created_by": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "error": "AUTHENTICATION_FAILED",
  "message": "Authentication required",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 401
}
{
  "error": "FORBIDDEN",
  "message": "You don't have permission to perform this action",
  "details": {
    "required_permission": "resource:action"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 403
}
{
  "error": "RESOURCE_NOT_FOUND",
  "message": "The requested resource was not found",
  "details": {
    "resource_type": "example",
    "resource_id": "xxx"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 404
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
{
  "error": "INTERNAL_SERVER_ERROR",
  "message": "An unexpected error occurred",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 500
}

List Workspace Policies

GET
/v1/workspaces/{workspace_id}/approval-policies

Path Parameters

workspace_id*Workspace Id

Query Parameters

org_id*Org Id
search?|

Search by policy name

Header Parameters

authorization?string|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/v1/workspaces/string/approval-policies?org_id=string"
{
  "total": 0,
  "has_more": false,
  "next_cursor": "string",
  "policies": [
    {
      "policy_id": "string",
      "organization_id": "string",
      "workspace_id": "string",
      "scope": "string",
      "name": "string",
      "description": "string",
      "enabled": true,
      "priority": 0,
      "conditions": {
        "resource_types": [
          "string"
        ],
        "action_types": [
          "string"
        ],
        "required_tags": {
          "property1": "string",
          "property2": "string"
        },
        "custom_rules": [
          {
            "field": "string",
            "operator": "string",
            "value": null
          }
        ]
      },
      "approval_requirements": {
        "min_approvals": 0,
        "approver_roles": [
          "string"
        ],
        "approver_permissions": [
          "string"
        ],
        "specific_approvers": [
          "string"
        ],
        "require_org_admin": true,
        "require_workspace_admin": true,
        "allow_self_approval": true,
        "expires_after_hours": 0
      },
      "created_by": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ]
}
{
  "error": "AUTHENTICATION_FAILED",
  "message": "Authentication required",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 401
}
{
  "error": "FORBIDDEN",
  "message": "You don't have permission to perform this action",
  "details": {
    "required_permission": "resource:action"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 403
}
{
  "error": "RESOURCE_NOT_FOUND",
  "message": "The requested resource was not found",
  "details": {
    "resource_type": "example",
    "resource_id": "xxx"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 404
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
{
  "error": "INTERNAL_SERVER_ERROR",
  "message": "An unexpected error occurred",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 500
}

Create Workspace Policy

POST
/v1/workspaces/{workspace_id}/approval-policies

Path Parameters

workspace_id*Workspace Id

Query Parameters

org_id*Org Id

Header Parameters

authorization?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/v1/workspaces/string/approval-policies?org_id=string" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{
  "policy_id": "string",
  "organization_id": "string",
  "workspace_id": "string",
  "scope": "string",
  "name": "string",
  "description": "string",
  "enabled": true,
  "priority": 0,
  "conditions": {
    "resource_types": [
      "string"
    ],
    "action_types": [
      "string"
    ],
    "required_tags": {
      "property1": "string",
      "property2": "string"
    },
    "custom_rules": [
      {
        "field": "string",
        "operator": "string",
        "value": null
      }
    ]
  },
  "approval_requirements": {
    "min_approvals": 0,
    "approver_roles": [
      "string"
    ],
    "approver_permissions": [
      "string"
    ],
    "specific_approvers": [
      "string"
    ],
    "require_org_admin": true,
    "require_workspace_admin": true,
    "allow_self_approval": true,
    "expires_after_hours": 0
  },
  "created_by": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "error": "AUTHENTICATION_FAILED",
  "message": "Authentication required",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 401
}
{
  "error": "FORBIDDEN",
  "message": "You don't have permission to perform this action",
  "details": {
    "required_permission": "resource:action"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 403
}
{
  "error": "RESOURCE_NOT_FOUND",
  "message": "The requested resource was not found",
  "details": {
    "resource_type": "example",
    "resource_id": "xxx"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 404
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
{
  "error": "INTERNAL_SERVER_ERROR",
  "message": "An unexpected error occurred",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 500
}

List My Pending Changes

GET
/v1/pending-changes

Query Parameters

org_id*Org Id
status?string|null
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

application/json

application/json

application/json

application/json

curl -X GET "https://loading/v1/pending-changes?org_id=string"
{
  "total": 0,
  "has_more": false,
  "next_cursor": "string",
  "changes": [
    {
      "change_id": "string",
      "organization_id": "string",
      "workspace_id": "string",
      "resource_type": "string",
      "resource_id": "string",
      "resource_name": "string",
      "action": "string",
      "change_diff": {},
      "policy_id": "string",
      "policy_name": "string",
      "requested_by": "string",
      "requested_at": "2019-08-24T14:15:22Z",
      "request_reason": "string",
      "status": "string",
      "approvals": [
        {
          "approver_id": "string",
          "approver_role": "string",
          "decision": "string",
          "reason": "string",
          "decided_at": "2019-08-24T14:15:22Z"
        }
      ],
      "required_approvals": 0,
      "approval_count": 0,
      "resolved_at": "2019-08-24T14:15:22Z",
      "resolved_by": "string",
      "rejection_reason": "string",
      "expires_at": "2019-08-24T14:15:22Z",
      "is_expired": true
    }
  ]
}
{
  "error": "AUTHENTICATION_FAILED",
  "message": "Authentication required",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 401
}
{
  "error": "FORBIDDEN",
  "message": "You don't have permission to perform this action",
  "details": {
    "required_permission": "resource:action"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 403
}
{
  "error": "RESOURCE_NOT_FOUND",
  "message": "The requested resource was not found",
  "details": {
    "resource_type": "example",
    "resource_id": "xxx"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 404
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
{
  "error": "INTERNAL_SERVER_ERROR",
  "message": "An unexpected error occurred",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 500
}

List Changes Awaiting Approval

GET
/v1/pending-changes/awaiting-approval

Query Parameters

org_id*Org Id
workspace_id*Workspace Id

Workspace to list changes for

search?|

Search by entity name or type

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

application/json

application/json

application/json

application/json

curl -X GET "https://loading/v1/pending-changes/awaiting-approval?org_id=string&workspace_id=string"
{
  "total": 0,
  "has_more": false,
  "next_cursor": "string",
  "changes": [
    {
      "change_id": "string",
      "organization_id": "string",
      "workspace_id": "string",
      "resource_type": "string",
      "resource_id": "string",
      "resource_name": "string",
      "action": "string",
      "change_diff": {},
      "policy_id": "string",
      "policy_name": "string",
      "requested_by": "string",
      "requested_at": "2019-08-24T14:15:22Z",
      "request_reason": "string",
      "status": "string",
      "approvals": [
        {
          "approver_id": "string",
          "approver_role": "string",
          "decision": "string",
          "reason": "string",
          "decided_at": "2019-08-24T14:15:22Z"
        }
      ],
      "required_approvals": 0,
      "approval_count": 0,
      "resolved_at": "2019-08-24T14:15:22Z",
      "resolved_by": "string",
      "rejection_reason": "string",
      "expires_at": "2019-08-24T14:15:22Z",
      "is_expired": true
    }
  ]
}
{
  "error": "AUTHENTICATION_FAILED",
  "message": "Authentication required",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 401
}
{
  "error": "FORBIDDEN",
  "message": "You don't have permission to perform this action",
  "details": {
    "required_permission": "resource:action"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 403
}
{
  "error": "RESOURCE_NOT_FOUND",
  "message": "The requested resource was not found",
  "details": {
    "resource_type": "example",
    "resource_id": "xxx"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 404
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
{
  "error": "INTERNAL_SERVER_ERROR",
  "message": "An unexpected error occurred",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 500
}

Get Pending Change

GET
/v1/pending-changes/{change_id}

Path Parameters

change_id*Change Id

Query Parameters

org_id*Org Id

Header Parameters

authorization?string|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/v1/pending-changes/string?org_id=string"
{
  "change_id": "string",
  "organization_id": "string",
  "workspace_id": "string",
  "resource_type": "string",
  "resource_id": "string",
  "resource_name": "string",
  "action": "string",
  "change_diff": {},
  "policy_id": "string",
  "policy_name": "string",
  "requested_by": "string",
  "requested_at": "2019-08-24T14:15:22Z",
  "request_reason": "string",
  "status": "string",
  "approvals": [
    {
      "approver_id": "string",
      "approver_role": "string",
      "decision": "string",
      "reason": "string",
      "decided_at": "2019-08-24T14:15:22Z"
    }
  ],
  "required_approvals": 0,
  "approval_count": 0,
  "resolved_at": "2019-08-24T14:15:22Z",
  "resolved_by": "string",
  "rejection_reason": "string",
  "expires_at": "2019-08-24T14:15:22Z",
  "is_expired": true,
  "previous_state": {},
  "proposed_state": {}
}
{
  "error": "AUTHENTICATION_FAILED",
  "message": "Authentication required",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 401
}
{
  "error": "FORBIDDEN",
  "message": "You don't have permission to perform this action",
  "details": {
    "required_permission": "resource:action"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 403
}
{
  "error": "RESOURCE_NOT_FOUND",
  "message": "The requested resource was not found",
  "details": {
    "resource_type": "example",
    "resource_id": "xxx"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 404
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
{
  "error": "INTERNAL_SERVER_ERROR",
  "message": "An unexpected error occurred",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 500
}

Cancel Pending Change

DELETE
/v1/pending-changes/{change_id}

Path Parameters

change_id*Change Id

Query Parameters

org_id*Org Id

Header Parameters

authorization?string|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://loading/v1/pending-changes/string?org_id=string"
null
{
  "error": "AUTHENTICATION_FAILED",
  "message": "Authentication required",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 401
}
{
  "error": "FORBIDDEN",
  "message": "You don't have permission to perform this action",
  "details": {
    "required_permission": "resource:action"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 403
}
{
  "error": "RESOURCE_NOT_FOUND",
  "message": "The requested resource was not found",
  "details": {
    "resource_type": "example",
    "resource_id": "xxx"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 404
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
{
  "error": "INTERNAL_SERVER_ERROR",
  "message": "An unexpected error occurred",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 500
}

Approve Pending Change

POST
/v1/pending-changes/{change_id}/approve

Path Parameters

change_id*Change Id

Query Parameters

org_id*Org Id

Header Parameters

authorization?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/v1/pending-changes/string/approve?org_id=string" \  -H "Content-Type: application/json" \  -d '{}'
null
{
  "error": "AUTHENTICATION_FAILED",
  "message": "Authentication required",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 401
}
{
  "error": "FORBIDDEN",
  "message": "You don't have permission to perform this action",
  "details": {
    "required_permission": "resource:action"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 403
}
{
  "error": "RESOURCE_NOT_FOUND",
  "message": "The requested resource was not found",
  "details": {
    "resource_type": "example",
    "resource_id": "xxx"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 404
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
{
  "error": "INTERNAL_SERVER_ERROR",
  "message": "An unexpected error occurred",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 500
}

Reject Pending Change

POST
/v1/pending-changes/{change_id}/reject

Path Parameters

change_id*Change Id

Query Parameters

org_id*Org Id

Header Parameters

authorization?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/v1/pending-changes/string/reject?org_id=string" \  -H "Content-Type: application/json" \  -d '{}'
null
{
  "error": "AUTHENTICATION_FAILED",
  "message": "Authentication required",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 401
}
{
  "error": "FORBIDDEN",
  "message": "You don't have permission to perform this action",
  "details": {
    "required_permission": "resource:action"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 403
}
{
  "error": "RESOURCE_NOT_FOUND",
  "message": "The requested resource was not found",
  "details": {
    "resource_type": "example",
    "resource_id": "xxx"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 404
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
{
  "error": "INTERNAL_SERVER_ERROR",
  "message": "An unexpected error occurred",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 500
}