Archive
[application/vnd.com.chemcaster.Archive+json]
An Archive represents a snapshot of the current state of a Registry and its subordinate resources. Archives exist until deleted, either manually though the administrative interface or an API call, or through an automatic sweeper process. The maximum expected time of residency for an archive on the service is 24 hours. An Archive has the following resources and attributes:
| Name | Type | Occurs | Description |
|---|---|---|---|
| archive:done | Boolean | 1 | True if the archive has been compiled, false otherwise. Use this attribute to check on the status of a long-running archive job. |
| archive:created_at | Datetime | 1 | The time at which the creation of this archive was initiated. |
| zipfile | Link | 0..1 | The compressed binary form of this archive. This link is absent until the archive is done. |
| index | Link | 1 | Index to all archives for this archive's registry. |
| destroy | Link | 1 | Destroy this archive. |
| registry | Link | 1 | The registry for which this archive was made. |
Sample Requests and Responses
Representations are transported between client and server over HTTP using media types specific to each resource. For details, see Common Behaviors.
Note: clients MUST NOT make assumptions about the layout of the URIs within the Service.
The following examples illustrate sample requests and responses.
View Archive
- Synopsis
- GET {URI of Archive resource}
- Request Headers
- Accept, Authorization
- Request Message Body
- N/A
- Response Headers
- Content-Length, Content-Type
- Response Message Body
- [application/vnd.com.chemcaster.Archive+json]
- Response Status
- 200, 401, 404, 406
Example Request
GET /structures/123 Host: chemcaster.com Authorization: Basic xxxxxxxxxxxxxxxxxxx Accept: application/vnd.com.chemcaster.Archive+json
Example Response
HTTP/1.1 200 OK
Content-Type: application/vnd.com.chemcaster.Archive+json
Content-Length: nnn
{
"index": {
"name": "archive index",
"media_type": "application\/vnd.com.chemcaster.Index+json",
"uri": "https:\/\/chemcaster.com\/registries\/33\/archives"
},
"destroy": {
"name": "delete archive",
"media_type": "application\/vnd.com.chemcaster.Archive+json",
"uri": "https:\/\/chemcaster.com\/archives\/16"
},
"archive": {
"done": true
"created_at":"Fri, 04 Sep 2009 01:12:09 +0000"
},
"zipfile": {
"name": "download archive in zip format",
"media_type": "application\/zip",
"uri": "https:\/\/chemcaster.com\/archives\/16"
},
"registry": {
"name": "this archive's registry",
"media_type": "application\/vnd.com.chemcaster.Registry+json",
"uri": "https:\/\/chemcaster.com\/registries\/33"
}
}
Create Archive
- Synopsis
- POST {URI of Archive Index resource}
- Request Headers
- Accept, Authorization, Content-Type
- Request Message Body
- [application/vnd.com.chemcaster.Archive+json]
- Response Headers
- Content-Length, Content-Type
- Response Message Body
- [application/vnd.com.chemcaster.Archive+json]
- Response Status
- 202, 401, 404, 406, 422
Example Request
POST /registries/33/archives
Host: chemcaster.com
Authorization: Basic xxxxxxxxxxxxxxxxxxx
Accept: application/vnd.com.chemcaster.Archive+json
Content-Type: application/vnd.com.chemcaster.Archive+json
{
"archive": {
}
}
Example Response
HTTP/1.1 202 Accepted
Location: http://chemcaster.com/archives/16
Content-Type: application/vnd.com.chemcaster.Archive+json
Content-Length: nnn
{
"index": {
"name": "archive index",
"media_type": "application\/vnd.com.chemcaster.Index+json",
"uri": "https:\/\/chemcaster.com\/registries\/33\/archives"
},
"destroy": {
"name": "delete archive",
"media_type": "application\/vnd.com.chemcaster.Archive+json",
"uri": "https:\/\/chemcaster.com\/archives\/16"
},
"archive": {
"done": false
"created_at":"Fri, 04 Sep 2009 01:12:09 +0000"
},
"registry": {
"name": "this archive's registry",
"media_type": "application\/vnd.com.chemcaster.Registry+json",
"uri": "https:\/\/chemcaster.com\/registries\/33"
}
}
Delete Archive
- Synopsis
- DELETE {URI of Archive resource}
- Request Headers
- Accept, Authorization
- Request Message Body
- N/A
- Response Headers
- Content-Length, Content-Type
- Response Message Body
- [application/vnd.com.chemcaster.Archive+json]
- Response Status
- 200, 401, 404, 406
Example Request
DELETE /archives/6 Host: chemcaster.com Authorization: Basic xxxxxxxxxxxxxxxxxxx Accept: application/vnd.com.chemcaster.Archive+json
Example Response
HTTP/1.1 200 OK
Content-Type: application/vnd.com.chemcaster.Archive+json
Content-Length: nnn
{
"index": {
"name": "archive index",
"media_type": "application\/vnd.com.chemcaster.Index+json",
"uri": "https:\/\/chemcaster.com\/registries\/33\/archives"
},
"destroy": {
"name": "delete archive",
"media_type": "application\/vnd.com.chemcaster.Archive+json",
"uri": "https:\/\/chemcaster.com\/archives\/16"
},
"archive": {
"done": true
"created_at":"Fri, 04 Sep 2009 01:12:09 +0000"
},
"zipfile": {
"name": "download archive in zip format",
"media_type": "application\/zip",
"uri": "https:\/\/chemcaster.com\/archives\/16"
},
"registry": {
"name": "this archive's registry",
"media_type": "application\/vnd.com.chemcaster.Registry+json",
"uri": "https:\/\/chemcaster.com\/registries\/33"
}
}
This documentation is based in part on the Sun Cloud API Documentation, which was adapted under the Creative Commons Attribution 3.0 Unported License.
About Chemcaster
Chemcaster is a platform for rapidly creating websites needing chemical structure registration, imaging and search.
We're looking for developers interested in trying Chemcaster during its testing period. Sign up today for a free account!


