---
title: /approveMpcAdministrativeRequest
slug: mihai-tests/approvempcadministrativerequest
createdAt: 2024-01-09T12:30:00.566Z
---

{
  "id": "_EdRT6w61Ck9FbHm6-a5P",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "http://1.1.1.1/approveMpcAdministrativeRequest",
    "servers": [
      {
        "url": "http://1.1.1.1/approveMpcAdministrativeRequest"
      }
    ],
    "name": "",
    "description": "<ul>\n<li>\n<p>NOTE - this function can not be called from Swagger, please use approveMpcAdministrativeRequestForSwagger instead.</p>\n</li>\n<li>\n<p>Approve an administrative request in the MPC system.</p>\n</li>\n<li>\n<p>return - regular response if succeed else error</p>\n</li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "required",
          "name": "request_id",
          "type": "string",
          "example": "9e2626a39663f285fdfae2fc0b329baf",
          "description": "<p>id of the sent transaction request (get by using getBulletins)</p>",
          "default": "9e2626a39663f285fdfae2fc0b329baf"
        },
        {
          "kind": "required",
          "name": "request_creator_id",
          "type": "string",
          "example": "john@gk8.io",
          "description": "id of the sent transaction creator",
          "default": "john@gk8.io"
        },
        {
          "kind": "required",
          "name": "request_creator_name",
          "type": "string",
          "example": "Matthew",
          "description": "The name of the user who created the request.",
          "default": "Matthew"
        },
        {
          "kind": "required",
          "name": "request_type",
          "type": "integer",
          "example": 0,
          "description": "<p>int 0 mean TRANSACTION_REQUEST</p>",
          "default": 0
        },
        {
          "kind": "required",
          "name": "system_data_to_approve",
          "type": "object",
          "example": "",
          "description": "the data to approve json provided when system request approved",
          "default": "{\n  \"ApiRequestLogs\": [\"User Registration\", \"Address Update\"],\n  \"ApiRequests\": [\n    {\"ObjectType\": \"User\", \"Action\": \"Create\", \"Details\": \"New user registration\"},\n    {\"ObjectType\": \"Address\", \"Action\": \"Update\", \"Details\": \"Address changes\"}\n  ]\n}\n",
          "schema": []
        },
        {
          "kind": "required",
          "name": "approvers_list",
          "type": "array",
          "description": "An array of objects representing approvers with the following structure:\n- `Action` (integer): The action associated with the approver.\n- `User` (string): The email address of the approver.                            \n:[{\"Action\":0,\"User\":\"87654321\"},{\"Action\":0,\"User\":\"david@gk8.io\"}] \n",
          "schema": [],
          "itemType": "object",
          "customType": "object[]"
        }
      ],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "customType": "approveMpcAdministrativeRequestRequest",
          "schema": [
            {
              "name": "FunctionData",
              "kind": "optional",
              "type": "object",
              "example": "",
              "schema": [
                {
                  "name": "RequestId",
                  "kind": "optional",
                  "type": "string",
                  "description": "ID of the send transaction request (get by using getBulletins)",
                  "example": "9e2626a39663f285fdfae2fc0b329baf",
                  "default": "9e2626a39663f285fdfae2fc0b329baf"
                },
                {
                  "name": "RequestCreatorId",
                  "kind": "optional",
                  "type": "string",
                  "description": "ID of the send transaction creator",
                  "example": "9e2626a39663f285fdfae2fc0b329baf",
                  "default": "9e2626a39663f285fdfae2fc0b329baf"
                },
                {
                  "name": "RequestCreatorName",
                  "kind": "optional",
                  "type": "string",
                  "description": "Name of the send transaction creator",
                  "example": "Matthew",
                  "default": "Matthew"
                },
                {
                  "name": "RequestType",
                  "kind": "optional",
                  "type": "integer",
                  "description": "Integer where 0 means TRANSACTION_REQUEST",
                  "example": 1,
                  "default": 1
                },
                {
                  "name": "SystemDataToApprove",
                  "kind": "optional",
                  "type": "object",
                  "example": "",
                  "schema": [
                    {
                      "name": "RequestData",
                      "kind": "optional",
                      "type": "string",
                      "description": "Defines the request logs that should be approved",
                      "example": "request_log_data",
                      "default": "request_log_data"
                    },
                    {
                      "name": "RequestObjectsData",
                      "kind": "optional",
                      "type": "string",
                      "description": "Defines the request object changes that should be approved",
                      "example": "request_object_data",
                      "default": "request_object_data"
                    }
                  ]
                },
                {
                  "name": "ApproversList",
                  "kind": "optional",
                  "type": "array",
                  "description": "Array of approvers where each item is an object with 'Action' (integer) and 'User' (string)",
                  "example": "[\"3\",\"alice@gk8.io\"]",
                  "default": [
                    "3",
                    "alice@gk8.io"
                  ],
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "",
                  "itemDefault": ""
                }
              ]
            },
            {
              "name": "Meta",
              "kind": "optional",
              "type": "object",
              "modelRef": "#/components/schemas/MetaTokenapproveMpcAdministrativeRequest",
              "customType": "MetaTokenapproveMpcAdministrativeRequest",
              "schema": [
                {
                  "name": "FunctionName",
                  "kind": "optional",
                  "type": "string",
                  "description": "The Function to be called",
                  "example": "approveMpcAdministrativeRequest",
                  "default": "approveMpcAdministrativeRequest"
                },
                {
                  "name": "RandomData",
                  "kind": "optional",
                  "type": "string",
                  "description": "Random Data",
                  "example": "288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229",
                  "default": "288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229"
                },
                {
                  "name": "Destination",
                  "kind": "optional",
                  "type": "string",
                  "description": "Id of the server",
                  "example": "",
                  "default": "b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea"
                },
                {
                  "name": "Time",
                  "kind": "optional",
                  "type": "string",
                  "description": "UTC Time of execution",
                  "example": "2021-02-07T18:37:46.948Z",
                  "default": "2021-02-07T18:37:46.948Z"
                },
                {
                  "name": "Source",
                  "kind": "optional",
                  "type": "string",
                  "description": "User public key",
                  "example": "",
                  "default": "048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99"
                },
                {
                  "name": "AccessToken",
                  "kind": "optional",
                  "type": "string",
                  "description": "Token used for authentication purposes",
                  "example": "51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087",
                  "default": "51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087"
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/approveMpcAdministrativeRequestRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "success",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "customType": "approveMpcAdministrativeRequestResponse",
            "schema": [
              {
                "name": "FunctionData",
                "kind": "optional",
                "type": "object",
                "example": "",
                "schema": [
                  {
                    "name": "StatusCode",
                    "kind": "optional",
                    "type": "integer",
                    "description": "Status code for the current run",
                    "example": 0,
                    "default": 0
                  }
                ]
              },
              {
                "name": "Meta",
                "kind": "optional",
                "type": "object",
                "modelRef": "#/components/schemas/MetaResponse",
                "customType": "MetaResponse",
                "schema": [
                  {
                    "name": "AccessToken",
                    "kind": "optional",
                    "type": "string",
                    "description": "The new access token generated after this operation",
                    "example": "a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6",
                    "default": "a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6"
                  },
                  {
                    "name": "Destination",
                    "kind": "optional",
                    "type": "string",
                    "description": "Id of the server",
                    "example": "042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622",
                    "default": "042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622"
                  },
                  {
                    "name": "Source",
                    "kind": "optional",
                    "type": "string",
                    "description": "User public key",
                    "example": "df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355",
                    "default": "df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355"
                  },
                  {
                    "name": "Time",
                    "kind": "optional",
                    "type": "string",
                    "description": "UTC Time of execution",
                    "example": "2021-02-14 09:58:52.320",
                    "default": "2021-02-14 09:58:52.320"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/approveMpcAdministrativeRequestResponse",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url 'http://1.1.1.1/approveMpcAdministrativeRequest?request_id=9e2626a39663f285fdfae2fc0b329baf&request_creator_id=john%40gk8.io&request_creator_name=Matthew&request_type=integer&system_data_to_approve=%22{%5Cn%20%20%5C%22ApiRequestLogs%5C%22%3A%20[%5C%22User%20Registration%5C%22%2C%20%5C%22Address%20Update%5C%22]%2C%5Cn%20%20%5C%22ApiRequests%5C%22%3A%20[%5Cn%20%20%20%20{%5C%22ObjectType%5C%22%3A%20%5C%22User%5C%22%2C%20%5C%22Action%5C%22%3A%20%5C%22Create%5C%22%2C%20%5C%22Details%5C%22%3A%20%5C%22New%20user%20registration%5C%22}%2C%5Cn%20%20%20%20{%5C%22ObjectType%5C%22%3A%20%5C%22Address%5C%22%2C%20%5C%22Action%5C%22%3A%20%5C%22Update%5C%22%2C%20%5C%22Details%5C%22%3A%20%5C%22Address%20changes%5C%22}%5Cn%20%20]%5Cn}%5Cn%22&approvers_list=array' \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data-raw '{\n     \"FunctionData\": {\n     \"RequestId\": \"9e2626a39663f285fdfae2fc0b329baf\",\n     \"RequestCreatorId\": \"9e2626a39663f285fdfae2fc0b329baf\",\n     \"RequestCreatorName\": \"Matthew\",\n     \"RequestType\": 1,\n     \"SystemDataToApprove\": {\n     \"RequestData\": \"request_log_data\",\n     \"RequestObjectsData\": \"request_object_data\"\n     },\n     \"ApproversList\": [\n     \"3\",\n     \"alice@gk8.io\"\n     ]\n     },\n     \"Meta\": {\n     \"FunctionName\": \"approveMpcAdministrativeRequest\",\n     \"RandomData\": \"288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229\",\n     \"Destination\": \"b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea\",\n     \"Time\": \"2021-02-07T18:37:46.948Z\",\n     \"Source\": \"048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99\",\n     \"AccessToken\": \"51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087\"\n     }\n     }'"
        },
        {
          "id": "example-1-javascript",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"FunctionData\": {\n      \"RequestId\": \"9e2626a39663f285fdfae2fc0b329baf\",\n      \"RequestCreatorId\": \"9e2626a39663f285fdfae2fc0b329baf\",\n      \"RequestCreatorName\": \"Matthew\",\n      \"RequestType\": 1,\n      \"SystemDataToApprove\": {\n         \"RequestData\": \"request_log_data\",\n         \"RequestObjectsData\": \"request_object_data\"\n      },\n      \"ApproversList\": [\n         \"3\",\n         \"alice@gk8.io\"\n      ]\n   },\n   \"Meta\": {\n      \"FunctionName\": \"approveMpcAdministrativeRequest\",\n      \"RandomData\": \"288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229\",\n      \"Destination\": \"b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea\",\n      \"Time\": \"2021-02-07T18:37:46.948Z\",\n      \"Source\": \"048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99\",\n      \"AccessToken\": \"51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087\"\n   }\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"http://1.1.1.1/approveMpcAdministrativeRequest?request_id=9e2626a39663f285fdfae2fc0b329baf&request_creator_id=john@gk8.io&request_creator_name=Matthew&request_type=integer&system_data_to_approve=\\\"{\\\\n  \\\\\\\"ApiRequestLogs\\\\\\\": [\\\\\\\"User Registration\\\\\\\", \\\\\\\"Address Update\\\\\\\"],\\\\n  \\\\\\\"ApiRequests\\\\\\\": [\\\\n    {\\\\\\\"ObjectType\\\\\\\": \\\\\\\"User\\\\\\\", \\\\\\\"Action\\\\\\\": \\\\\\\"Create\\\\\\\", \\\\\\\"Details\\\\\\\": \\\\\\\"New user registration\\\\\\\"},\\\\n    {\\\\\\\"ObjectType\\\\\\\": \\\\\\\"Address\\\\\\\", \\\\\\\"Action\\\\\\\": \\\\\\\"Update\\\\\\\", \\\\\\\"Details\\\\\\\": \\\\\\\"Address changes\\\\\\\"}\\\\n  ]\\\\n}\\\\n\\\"&approvers_list=array\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"http://1.1.1.1/approveMpcAdministrativeRequest?request_id=9e2626a39663f285fdfae2fc0b329baf&request_creator_id=john@gk8.io&request_creator_name=Matthew&request_type=integer&system_data_to_approve=\\\"{\\n  \\\\\"ApiRequestLogs\\\\\": [\\\\\"User Registration\\\\\", \\\\\"Address Update\\\\\"],\\n  \\\\\"ApiRequests\\\\\": [\\n    {\\\\\"ObjectType\\\\\": \\\\\"User\\\\\", \\\\\"Action\\\\\": \\\\\"Create\\\\\", \\\\\"Details\\\\\": \\\\\"New user registration\\\\\"},\\n    {\\\\\"ObjectType\\\\\": \\\\\"Address\\\\\", \\\\\"Action\\\\\": \\\\\"Update\\\\\", \\\\\"Details\\\\\": \\\\\"Address changes\\\\\"}\\n  ]\\n}\\n\\\"&approvers_list=array\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"FunctionData\": {\n      \"RequestId\": \"9e2626a39663f285fdfae2fc0b329baf\",\n      \"RequestCreatorId\": \"9e2626a39663f285fdfae2fc0b329baf\",\n      \"RequestCreatorName\": \"Matthew\",\n      \"RequestType\": 1,\n      \"SystemDataToApprove\": {\n         \"RequestData\": \"request_log_data\",\n         \"RequestObjectsData\": \"request_object_data\"\n      },\n      \"ApproversList\": [\n         \"3\",\n         \"alice@gk8.io\"\n      ]\n   },\n   \"Meta\": {\n      \"FunctionName\": \"approveMpcAdministrativeRequest\",\n      \"RandomData\": \"288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229\",\n      \"Destination\": \"b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea\",\n      \"Time\": \"2021-02-07T18:37:46.948Z\",\n      \"Source\": \"048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99\",\n      \"AccessToken\": \"51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087\"\n   }\n})\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"http://1.1.1.1/approveMpcAdministrativeRequest?request_id=9e2626a39663f285fdfae2fc0b329baf&request_creator_id=john@gk8.io&request_creator_name=Matthew&request_type=integer&system_data_to_approve=\\\"{\\\\n  \\\\\\\"ApiRequestLogs\\\\\\\": [\\\\\\\"User Registration\\\\\\\", \\\\\\\"Address Update\\\\\\\"],\\\\n  \\\\\\\"ApiRequests\\\\\\\": [\\\\n    {\\\\\\\"ObjectType\\\\\\\": \\\\\\\"User\\\\\\\", \\\\\\\"Action\\\\\\\": \\\\\\\"Create\\\\\\\", \\\\\\\"Details\\\\\\\": \\\\\\\"New user registration\\\\\\\"},\\\\n    {\\\\\\\"ObjectType\\\\\\\": \\\\\\\"Address\\\\\\\", \\\\\\\"Action\\\\\\\": \\\\\\\"Update\\\\\\\", \\\\\\\"Details\\\\\\\": \\\\\\\"Address changes\\\\\\\"}\\\\n  ]\\\\n}\\\\n\\\"&approvers_list=array\"\n\npayload = json.dumps({\n   \"FunctionData\": {\n      \"RequestId\": \"9e2626a39663f285fdfae2fc0b329baf\",\n      \"RequestCreatorId\": \"9e2626a39663f285fdfae2fc0b329baf\",\n      \"RequestCreatorName\": \"Matthew\",\n      \"RequestType\": 1,\n      \"SystemDataToApprove\": {\n         \"RequestData\": \"request_log_data\",\n         \"RequestObjectsData\": \"request_object_data\"\n      },\n      \"ApproversList\": [\n         \"3\",\n         \"alice@gk8.io\"\n      ]\n   },\n   \"Meta\": {\n      \"FunctionName\": \"approveMpcAdministrativeRequest\",\n      \"RandomData\": \"288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229\",\n      \"Destination\": \"b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea\",\n      \"Time\": \"2021-02-07T18:37:46.948Z\",\n      \"Source\": \"048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99\",\n      \"AccessToken\": \"51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087\"\n   }\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// success\n{\n  \"FunctionData\": {\n    \"StatusCode\": 0\n  },\n  \"Meta\": {\n    \"AccessToken\": \"a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6\",\n    \"Destination\": \"042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622\",\n    \"Source\": \"df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355\",\n    \"Time\": \"2021-02-14 09:58:52.320\"\n  }\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "id": "r0_EhDRBPVfvpits-tDDd",
      "type": "bulleted-list",
      "children": [
        {
          "id": "ePdv_rgnja8_pUqCFb1ZR",
          "type": "list-item",
          "children": [
            {
              "id": "BpPDKNL6jYYB2V3jdpyFO",
              "type": "list-item-child",
              "children": [
                {
                  "text": "NOTE - this function can not be called from Swagger, please use approveMpcAdministrativeRequestForSwagger instead."
                }
              ]
            }
          ]
        },
        {
          "id": "x0fqWunOs8RyU35Zl0NyE",
          "type": "list-item",
          "children": [
            {
              "id": "fOOvMxMR09fTiHAbefvs8",
              "type": "list-item-child",
              "children": [
                {
                  "text": "Approve an administrative request in the MPC system."
                }
              ]
            }
          ]
        },
        {
          "id": "BE3-z1NG_GDyKM3syVOWJ",
          "type": "list-item",
          "children": [
            {
              "id": "CKw3sGybgAe1uP2hxXeS7",
              "type": "list-item-child",
              "children": [
                {
                  "text": "return - regular response if succeed else error"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}