Cloud Management API 1.5

RightScriptAttachments

Actions

index

Lists RightScript attachments.

URLs
GET /api/right_scripts/:right_script_id/attachments
HTTP response code
200 OK
Content-type
application/vnd.rightscale.right_script_attachment;type=collection

Required roles

Parameters

name required type values regexp blank? description
filter no Array * * no See below for valid filter parameters.
view no String default * no Specifies how many attributes and/or expanded nested relationships to include.

Filters

name partial_match? description
filename yes File name of the RightScript attachment to filter on.

Example Responses

Click on a format below to see an example response:

JSON XML
[{
  "id": "1",
  "filename": "FILENAME_522532178",
  "created_at": "2023/10/09 11:06:02 +0000",
  "updated_at": "2023/10/09 11:06:02 +0000",
  "digest": "583955276",
  "size": "100",
  "download_url": "https://island-mirror-fixture.dev/attachments/1/583955276?md5=583955276&expiration=1696851370&signature=edOL4AENE2oSNmPKfUAxBSuwapP2Np77iklt5dX4%2FE2muJqt%2FVWhJ0D7U5p%2B%0AmLmYasnN0vczE9ii4BOajQTpJ9jsLTYbI06PJR10SJ3ZTA3fms1j1x874VXp%0AP0DepVM0FMQVQ8Ezuc5K%2F%2FW%2BvI8ygoSDgFpomJDHe071ybun1hU%3D%0A&signer=dev&filename=FILENAME_522532178",
  "links": [
    {"rel":"self","href":"/api/right_scripts/2/attachments/1"},
    {"rel":"right_script","href":"/api/right_scripts/2"}
  ]
},{
  "id": "2",
  "filename": "FILENAME_2690537609",
  "created_at": "2023/10/09 11:06:03 +0000",
  "updated_at": "2023/10/09 11:06:03 +0000",
  "digest": "2096477136",
  "size": "100",
  "download_url": "https://island-mirror-fixture.dev/attachments/1/2096477136?md5=2096477136&expiration=1696851370&signature=znHdXTlDWM8HofmkHQcLGRWUDFWQkFvLWY1PyrN4xI7QP8J1XN6ugEwaveAp%0ARsujuf2FM%2B4sMcx3qHm2yU4qQVCXep0%2BpzYwB7iDWOQjAYvQgbAysd%2FUojyo%0AZX6bmKM47PZm0kyzx%2FI8J7iowjpRmudznPBExtEJg1Q4kN659AQ%3D%0A&signer=dev&filename=FILENAME_2690537609",
  "links": [
    {"rel":"self","href":"/api/right_scripts/4/attachments/2"},
    {"rel":"right_script","href":"/api/right_scripts/4"}
  ]
}]
<?xml version="1.0" encoding="UTF-8"?>
<right_script_attachments>
  <right_script_attachment>
    <id>1</id>
    <filename>FILENAME_522532178</filename>
    <created_at>2023/10/09 11:06:02 +0000</created_at>
    <updated_at>2023/10/09 11:06:02 +0000</updated_at>
    <digest>583955276</digest>
    <size>100</size>
    <download_url>https://island-mirror-fixture.dev/attachments/1/583955276?md5=583955276&amp;expiration=1696851370&amp;signature=edOL4AENE2oSNmPKfUAxBSuwapP2Np77iklt5dX4%2FE2muJqt%2FVWhJ0D7U5p%2B%0AmLmYasnN0vczE9ii4BOajQTpJ9jsLTYbI06PJR10SJ3ZTA3fms1j1x874VXp%0AP0DepVM0FMQVQ8Ezuc5K%2F%2FW%2BvI8ygoSDgFpomJDHe071ybun1hU%3D%0A&amp;signer=dev&amp;filename=FILENAME_522532178</download_url>
    <links>
      <link rel="self" href="/api/right_scripts/2/attachments/1"/>
      <link rel="right_script" href="/api/right_scripts/2"/>
    </links>
  </right_script_attachment>
  <right_script_attachment>
    <id>2</id>
    <filename>FILENAME_2690537609</filename>
    <created_at>2023/10/09 11:06:03 +0000</created_at>
    <updated_at>2023/10/09 11:06:03 +0000</updated_at>
    <digest>2096477136</digest>
    <size>100</size>
    <download_url>https://island-mirror-fixture.dev/attachments/1/2096477136?md5=2096477136&amp;expiration=1696851370&amp;signature=znHdXTlDWM8HofmkHQcLGRWUDFWQkFvLWY1PyrN4xI7QP8J1XN6ugEwaveAp%0ARsujuf2FM%2B4sMcx3qHm2yU4qQVCXep0%2BpzYwB7iDWOQjAYvQgbAysd%2FUojyo%0AZX6bmKM47PZm0kyzx%2FI8J7iowjpRmudznPBExtEJg1Q4kN659AQ%3D%0A&amp;signer=dev&amp;filename=FILENAME_2690537609</download_url>
    <links>
      <link rel="self" href="/api/right_scripts/4/attachments/2"/>
      <link rel="right_script" href="/api/right_scripts/4"/>
    </links>
  </right_script_attachment>
</right_script_attachments>

show

Displays information about a single RightScript attachment.

URLs
GET /api/right_scripts/:right_script_id/attachments/:id
HTTP response code
200 OK
Content-type
application/vnd.rightscale.right_script_attachment

Required roles

Parameters

name required type values regexp blank? description
view no String default * no Specifies how many attributes and/or expanded nested relationships to include.

Example Responses

Click on a format below to see an example response:

JSON XML
{
  "id": "1",
  "filename": "FILENAME_522532178",
  "created_at": "2023/10/09 11:06:02 +0000",
  "updated_at": "2023/10/09 11:06:02 +0000",
  "digest": "583955276",
  "size": "100",
  "download_url": "https://island-mirror-fixture.dev/attachments/1/583955276?md5=583955276&expiration=1696851370&signature=edOL4AENE2oSNmPKfUAxBSuwapP2Np77iklt5dX4%2FE2muJqt%2FVWhJ0D7U5p%2B%0AmLmYasnN0vczE9ii4BOajQTpJ9jsLTYbI06PJR10SJ3ZTA3fms1j1x874VXp%0AP0DepVM0FMQVQ8Ezuc5K%2F%2FW%2BvI8ygoSDgFpomJDHe071ybun1hU%3D%0A&signer=dev&filename=FILENAME_522532178",
  "links": [
    {"rel":"self","href":"/api/right_scripts/2/attachments/1"},
    {"rel":"right_script","href":"/api/right_scripts/2"}
  ]
}
<?xml version="1.0" encoding="UTF-8"?>
<right_script_attachment>
  <id>1</id>
  <filename>FILENAME_522532178</filename>
  <created_at>2023/10/09 11:06:02 +0000</created_at>
  <updated_at>2023/10/09 11:06:02 +0000</updated_at>
  <digest>583955276</digest>
  <size>100</size>
  <download_url>https://island-mirror-fixture.dev/attachments/1/583955276?md5=583955276&amp;expiration=1696851370&amp;signature=edOL4AENE2oSNmPKfUAxBSuwapP2Np77iklt5dX4%2FE2muJqt%2FVWhJ0D7U5p%2B%0AmLmYasnN0vczE9ii4BOajQTpJ9jsLTYbI06PJR10SJ3ZTA3fms1j1x874VXp%0AP0DepVM0FMQVQ8Ezuc5K%2F%2FW%2BvI8ygoSDgFpomJDHe071ybun1hU%3D%0A&amp;signer=dev&amp;filename=FILENAME_522532178</download_url>
  <links>
    <link rel="self" href="/api/right_scripts/2/attachments/1"/>
    <link rel="right_script" href="/api/right_scripts/2"/>
  </links>
</right_script_attachment>

create

Uploads the RightScript attachment links it to the RightScript. Create expects HTTP request to be formatted as multipart mime.

URLs
POST /api/right_scripts/:right_script_id/attachments
HTTP response code
201 Created

Required roles

Parameters

name required type values regexp blank? description
right_script_attachment yes Hash * * no
right_script_attachment[content] yes Tempfile * * no The content of the RightScript attachment to be created.
right_script_attachment[filename] yes String * * no The file name of the RightScript attachment to be created.

update

Uploads and updates existing attachment in a RightScript. Update expects HTTP request to formatted as multipart mime.

URLs
PUT /api/right_scripts/:right_script_id/attachments/:id
HTTP response code
204 No Content

Required roles

Parameters

name required type values regexp blank? description
right_script_attachment yes Hash * * no
right_script_attachment[content] no Tempfile * * no The new content for the RightScript attachment.
right_script_attachment[filename] no String * * no The new file name for the RightScript attachment.

destroy

URLs
DELETE /api/right_scripts/:right_script_id/attachments/:id
HTTP response code
204 No Content

Required roles