Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This tutorial will guide you on how to expose data stored in Cassandra as a data serviceAlso, see the samples in Data Integration Samples.

...

...

  1. Click Add New Operation and enter the following information.

    Operation NameaddUsersOp
    Query IDaddUsers
  2. Save the operation.
  3. Click Add New Operation and enter the following information.

    Operation NamegetUsersbyIDopgetUsersbyIDOp
    Query IDgetUsersbyID
  4. Save the operation.

...

Now, let's create REST resources to invoke the query created above. Alternatively, you can create SOAP operations to invoke the queries. See the previous section for instructions.

  1. Click Add New Resource and enter the following information.

    Resource Pathusers
    Resource MethodPOST
    Query ID addUsers
  2. Save the resource.
  3. Click Add New Resource and enter the following information.

    Resource Pathusers/{id}
    Resource MethodGET
    Query IDgetUsersbyID
  4. Save the resource.

...

Finish creating the data service

Once you have defined the operation, click Finish to complete the data service creation process. You will now be taken to the Deployed Services screen, which shows all the data services deployed on the server.

Invoking your data service using SOAP

You can try the data service you created by using the TryIt tool that is in your product by default. 

  1. Go to the Deployed Services screen.
  2. Click the Try this service link for the Cassandra data service. The TryIt Tool will open with the data service.

Post new data

  1. Select the addUsersOp operation you created earlier. 
  2. You need to provide the user details. Be sure to enter a UUID value as the user ID.

  3. Click Send.

The data is now added to the database.

Get data

  1. Select the getUsersbyIDop getUsersbyIDOp operation you created earlier. 
  2. Click Send to see the details of the user you added previously.

...