Create a Snapshot

post

/ic/api/process/v1/spaces/{spaceId}/projects/{projectId}/snapshots

Creates a new snapshot on the specified project and returns the new snapshot details including name and Id of the snapshot.

Request

Supported Media Types
Path Parameters
Form Parameters
Back to Top

Response

Supported Media Types

200 Response

successful operation
Body ()
Root Schema : snapshot
Type: object
the representation of a design time snapshot created from a project

201 Response

Success. Snapshot successfully created.

400 Response

Snapshot name is invalid.

401 Response

Unauthorized

403 Response

Privileges required. User can't create the snapshot in this project

404 Response

Space/Project is not found.

409 Response

Snapshot already exist.

500 Response

Error in creating snapshot
Back to Top

Examples

The following example shows how to create a snapshot in a space by submitting a POST request on the REST resource.

 curl -X POST --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/json' -H "Authorization: Bearer access_token' -d 'snapshotName=Snapshot1' -d 'snapshotDescription=This is my new snapshot' 'http://example.com:7001/ic/api/process/v1/spaces/<spaceId>/projects/<projectId>/snapshots'

Where,

  • example.com is the host where Oracle Integration is running.

  • <version> is the REST API version.

  • Content-Type: application/x-www-form-urlencoded

  • Request URL: http://example.com:7001/ic/api/process/<version>/spaces/<spaceId>/projects/<projectId>/snapshots

  • <spaceId> is the unique ID for a space. To retrieve available spaces, see Retrieve Spaces.

  • <projectId> is the unique ID for a project. To retrieve available projects, see Retrieve projects

The following shows the required request parameters to create a snapshot. You need to provide application/x-www-form-urlencoded parameter to create a snapshot.

  • snapshotName: Specifies the name of the snapshot, for example MySnapshot

  • description: Specifies the description of the snapshot.

Example of Response Header

Status Code: 201 created
Date:   Mon, 03 Apr 2017 09:39:39 GMT 
Content-Type:  application/json

Example of Response Body

{
  "id": "Snapshot1",
  "description": "This is my Snapshot",
  "creator": "jsmith",
  "creation": "2017-04-03,03:21:19 PDT",
  "links": [
    {
      "href": "http://example.com:7001/ic/api/process/v1/spaces/46423b0a-a6a1-4748-b677-e8160bf50ce9/projects/New%20Project/snapshots/Snapshot1",
      "rel": "self"
    },
    {
      "href": "http://example.com:7001/ic/api/process/v1/spaces/46423b0a-a6a1-4748-b677-e8160bf50ce9/projects/New%20Project/snapshots/Snapshot1",
      "rel": "canonical"
    },
    {
      "href": "http://example.com:7001/ic/api/process/v1/spaces/46423b0a-a6a1-4748-b677-e8160bf50ce9/projects/New%20Project",
      "rel": "parent"
    }
  ]
}
Back to Top