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
- observer
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_1474587352",
"created_at": "2018/10/16 16:04:42 +0000",
"updated_at": "2018/10/16 16:04:42 +0000",
"digest": "574604788",
"size": "100",
"download_url": "https://island-mirror-fixture.dev/attachments/1/574604788?md5=574604788&expiration=1539707690&signature=RUriz%2BPHd1Eq3xIpbsT0EOKqINQj2896Xxl3atASSxiPKo5aIvHKTxI7cqvS%0ACEyWjiNClPBHpfwfVbyRgYAldwGEWHLMPQCGiX1p3jXvRgelx%2FkaOlR%2B1MsD%0Akd3FVRc7GNcXZz0H4ORJ1vMkR1zzYNIxRv5V6z2RbO2Er3Qz9q4%3D%0A&signer=dev&filename=FILENAME_1474587352",
"links": [
{"rel":"self","href":"/api/right_scripts/2/attachments/1"},
{"rel":"right_script","href":"/api/right_scripts/2"}
]
},{
"id": "2",
"filename": "FILENAME_4130734006",
"created_at": "2018/10/16 16:04:44 +0000",
"updated_at": "2018/10/16 16:04:44 +0000",
"digest": "2666789025",
"size": "100",
"download_url": "https://island-mirror-fixture.dev/attachments/1/2666789025?md5=2666789025&expiration=1539707690&signature=eKkc9dqC3vqt92LwXm4UH3RRQ90UIA%2Fv1uWCaUjpGTQVGvEfZI5d2OT%2FsUWK%0A0ELAQx%2FKScnIZpkCcwFRcG3xymftRR5rUqS95zpQCxSA4tEtbkCyT%2FXb7Hke%0A%2Bkw%2BBkpCPv%2BDKDsaJqH7i4npeYY6jA0N6RMKMSSF8pIyNdMRL7E%3D%0A&signer=dev&filename=FILENAME_4130734006",
"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_1474587352</filename>
<created_at>2018/10/16 16:04:42 +0000</created_at>
<updated_at>2018/10/16 16:04:42 +0000</updated_at>
<digest>574604788</digest>
<size>100</size>
<download_url>https://island-mirror-fixture.dev/attachments/1/574604788?md5=574604788&expiration=1539707690&signature=RUriz%2BPHd1Eq3xIpbsT0EOKqINQj2896Xxl3atASSxiPKo5aIvHKTxI7cqvS%0ACEyWjiNClPBHpfwfVbyRgYAldwGEWHLMPQCGiX1p3jXvRgelx%2FkaOlR%2B1MsD%0Akd3FVRc7GNcXZz0H4ORJ1vMkR1zzYNIxRv5V6z2RbO2Er3Qz9q4%3D%0A&signer=dev&filename=FILENAME_1474587352</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_4130734006</filename>
<created_at>2018/10/16 16:04:44 +0000</created_at>
<updated_at>2018/10/16 16:04:44 +0000</updated_at>
<digest>2666789025</digest>
<size>100</size>
<download_url>https://island-mirror-fixture.dev/attachments/1/2666789025?md5=2666789025&expiration=1539707690&signature=eKkc9dqC3vqt92LwXm4UH3RRQ90UIA%2Fv1uWCaUjpGTQVGvEfZI5d2OT%2FsUWK%0A0ELAQx%2FKScnIZpkCcwFRcG3xymftRR5rUqS95zpQCxSA4tEtbkCyT%2FXb7Hke%0A%2Bkw%2BBkpCPv%2BDKDsaJqH7i4npeYY6jA0N6RMKMSSF8pIyNdMRL7E%3D%0A&signer=dev&filename=FILENAME_4130734006</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
- observer
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_1474587352",
"created_at": "2018/10/16 16:04:42 +0000",
"updated_at": "2018/10/16 16:04:42 +0000",
"digest": "574604788",
"size": "100",
"download_url": "https://island-mirror-fixture.dev/attachments/1/574604788?md5=574604788&expiration=1539707690&signature=RUriz%2BPHd1Eq3xIpbsT0EOKqINQj2896Xxl3atASSxiPKo5aIvHKTxI7cqvS%0ACEyWjiNClPBHpfwfVbyRgYAldwGEWHLMPQCGiX1p3jXvRgelx%2FkaOlR%2B1MsD%0Akd3FVRc7GNcXZz0H4ORJ1vMkR1zzYNIxRv5V6z2RbO2Er3Qz9q4%3D%0A&signer=dev&filename=FILENAME_1474587352",
"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_1474587352</filename>
<created_at>2018/10/16 16:04:42 +0000</created_at>
<updated_at>2018/10/16 16:04:42 +0000</updated_at>
<digest>574604788</digest>
<size>100</size>
<download_url>https://island-mirror-fixture.dev/attachments/1/574604788?md5=574604788&expiration=1539707690&signature=RUriz%2BPHd1Eq3xIpbsT0EOKqINQj2896Xxl3atASSxiPKo5aIvHKTxI7cqvS%0ACEyWjiNClPBHpfwfVbyRgYAldwGEWHLMPQCGiX1p3jXvRgelx%2FkaOlR%2B1MsD%0Akd3FVRc7GNcXZz0H4ORJ1vMkR1zzYNIxRv5V6z2RbO2Er3Qz9q4%3D%0A&signer=dev&filename=FILENAME_1474587352</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
- designer
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
- designer
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
- designer