---
title: Request download of data for an Asset Group
slug: test/request-download-of-data-for-an-asset-group
createdAt: 2024-08-02T11:34:50.118Z
---

{
  "id": "JaggV9j-2lCG9I82U-NsL",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "url": "{{BaseURL}}/repository/container/{{containerAID}}/1/assetgroup/{{assetGroupAID}}/data",
    "name": "",
    "description": "",
    "contentType": "application/json",
    "request": {
      "headerParameters": [],
      "queryParameters": [],
      "pathParameters": [
        {
          "name": "BaseURL",
          "description": "",
          "default": "BaseURL",
          "value": "BaseURL",
          "type": "string"
        },
        {
          "name": "containerAID",
          "description": "",
          "default": "containerAID",
          "value": "containerAID",
          "type": "string"
        },
        {
          "name": "assetGroupAID",
          "description": "",
          "default": "assetGroupAID",
          "value": "assetGroupAID",
          "type": "string"
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "description": "",
          "default": "{\n  \"dateTime\": \"20221007T081710Z\",\n  \"fileFormat\": \"xpt\",\n  \"encoding\": \"nah\"\n}\n",
          "value": "{\n  \"dateTime\": \"20221007T081710Z\",\n  \"fileFormat\": \"xpt\",\n  \"encoding\": \"nah\"\n}\n",
          "type": "object"
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": ""
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url {{BaseURL}}/repository/container/{{containerAID}}/1/assetgroup/{{assetGroupAID}}/data \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '\"{\\n  \\\"dateTime\\\": \\\"20221007T081710Z\\\",\\n  \\\"fileFormat\\\": \\\"xpt\\\",\\n  \\\"encoding\\\": \\\"nah\\\"\\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  \\\"dateTime\\\": \\\"20221007T081710Z\\\",\\n  \\\"fileFormat\\\": \\\"xpt\\\",\\n  \\\"encoding\\\": \\\"nah\\\"\\n}\\n\");\n\nvar requestOptions = {\n   method: 'PUT',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"{{BaseURL}}/repository/container/{{containerAID}}/1/assetgroup/{{assetGroupAID}}/data\", 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(\"{{BaseURL}}/repository/container/{{containerAID}}/1/assetgroup/{{assetGroupAID}}/data\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Put.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump(\"{\\n  \\\"dateTime\\\": \\\"20221007T081710Z\\\",\\n  \\\"fileFormat\\\": \\\"xpt\\\",\\n  \\\"encoding\\\": \\\"nah\\\"\\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 = \"{{BaseURL}}/repository/container/{{containerAID}}/1/assetgroup/{{assetGroupAID}}/data\"\n\npayload = json.dumps(\"{\\n  \\\"dateTime\\\": \\\"20221007T081710Z\\\",\\n  \\\"fileFormat\\\": \\\"xpt\\\",\\n  \\\"encoding\\\": \\\"nah\\\"\\n}\\n\")\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": ""
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}