Connect to rally with REST

This example demonstrates how to connect to Rally using the REST Snap Pack.

The following example illustrates how the REST Get Snap retrieves Rally data in a SnapLogic pipeline.

  1. Configure the REST Get Snap

    The REST Get Snap in the example pipeline retrieves the data for a JIRA issue that was created and updated in the preceding Snaps in the pipeline.

    The following JSON data is the input document to the Snap:
    {
        "response": { "headers": { "strict-transport-security": "max-age=315360000;includeSubdomains", "x-content-type-options": "nosniff", "x-seraph-loginreason": "OK", "connection": "keep-alive", "set-cookie": "atlassian.xsrf.token=BWCK-SR48-JN93-ESFC|c127207e6dcb6f113eb45ec4d1dc463829af8dc2|lin; Path=/; Secure", "content-type": "application/json;charset=UTF-8", "date": "Thu, 15 Jan 2015 18:49:00 GMT", "x-arequestid": "648x1343x1", "x-asen": "SEN-2848532", "content-length": "0", "x-asessionid": "1g8lldp", "cache-control": "no-cache, no-store, no-transform", "x-ausername": "admin", "server": "nginx" }, "statusLine": { "reasonPhrase": "No Content", "statusCode": 204, "protoVersion": "HTTP/1.1" }, "entity": null },
        "original": { "id": "17392", "update": { "comment": [ { "add": { "body": "Bug has been fixed." } } ] } } }

    JSON input document for REST Get Snap

  2. Click this link to see the output provided by the Snap: Output Data
    {
        "response": {
          "headers": {
            "strict-transport-security": "max-age=315360000;includeSubdomains",
            "x-content-type-options": "nosniff",
            "x-seraph-loginreason": "OK",
            "connection": "keep-alive",
            "set-cookie": "atlassian.xsrf.token=BWCK-SR48-JN93-ESFC|c127207e6dcb6f113eb45ec4d1dc463829af8dc2|lin; Path=/; Secure",
            "content-type": "application/json;charset=UTF-8",
            "date": "Thu, 15 Jan 2015 18:49:00 GMT",
            "x-arequestid": "648x1343x1",
            "x-asen": "SEN-2848532",
            "content-length": "0",
            "x-asessionid": "1g8lldp",
            "cache-control": "no-cache, no-store, no-transform",
            "x-ausername": "admin",
            "server": "nginx"
          },
          "statusLine": {
            "reasonPhrase": "No Content",
            "statusCode": 204,
            "protoVersion": "HTTP/1.1"
          },
          "entity": null
        },
        "original": {
          "id": "17392",
          "update": {
            "comment": [
              {
                "add": {
                  "body": "Bug has been fixed."
                }
              }
            ]
          }
        }
      }
    
     
    Click this link to see the output provided by the Snap: Output Data
     
      {
        "headers": {
          "strict-transport-security": "max-age=315360000;includeSubdomains",
          "x-content-type-options": "nosniff",
          "vary": "Accept-Encoding",
          "x-seraph-loginreason": "OK",
          "connection": "keep-alive",
          "set-cookie": "atlassian.xsrf.token=BWCK-SR48-JN93-ESFC|1640969cad157d3859fba4971c79e09b38f27b21|lin; Path=/; Secure",
          "transfer-encoding": "chunked",
          "content-type": "application/json;charset=UTF-8",
          "date": "Thu, 15 Jan 2015 18:49:02 GMT",
          "x-arequestid": "649x1344x1",
          "x-asen": "SEN-2848532",
          "x-asessionid": "1nuotcy",
          "cache-control": "no-cache, no-store, no-transform",
          "x-ausername": "admin",
          "server": "nginx"
        },
        "statusLine": {
          "reasonPhrase": "OK",
          "statusCode": 200,
          "protoVersion": "HTTP/1.1"
        },
        "entity": {
          "expand": "renderedFields,names,schema,transitions,operations,editmeta,changelog",
          "id": "17392",
          "self": "https://Snaplogic.atlassian.net/rest/api/2/issue/17392",
          "key": "JIRASNAP-4312",
          "fields": {
            "issuetype": {
              "self": "https://Snaplogic.atlassian.net/rest/api/2/issuetype/2",
              "id": "2",
              "description": "A new feature of the product, which has yet to be developed.",
              "iconUrl": "https://Snaplogic.atlassian.net/images/icons/issuetypes/newfeature.png",
              "name": "New Feature",
              "subtask": false
            },
            "timespent": null,
            "project": {
              "self": "https://Snaplogic.atlassian.net/rest/api/2/project/10000",
              "id": "10000",
              "key": "JIRASNAP",
              "name": "Jira Snap for SnapLogic 4.0",
              "avatarUrls": {
                "48x48": "https://Snaplogic.atlassian.net/secure/projectavatar?pid=10000&avatarId=10011",
                "24x24": "https://Snaplogic.atlassian.net/secure/projectavatar?size=small&pid=10000&avatarId=10011",
                "16x16": "https://Snaplogic.atlassian.net/secure/projectavatar?size=xsmall&pid=10000&avatarId=10011",
                "32x32": "https://Snaplogic.atlassian.net/secure/projectavatar?size=medium&pid=10000&avatarId=10011"
              }
            },
            "fixVersions": [],
            "aggregatetimespent": null,
            "resolution": null,
            "customfield_10500": null,
            "customfield_10501": null,
            "resolutiondate": null,
            "workratio": -1,
            "lastViewed": null,
            "watches": {
              "self": "https://Snaplogic.atlassian.net/rest/api/2/issue/JIRASNAP-4312/watchers",
              "watchCount": 1,
              "isWatching": true
            },
            "created": "2015-01-15T10:48:57.605-0800",
            "customfield_10020": null,
            "customfield_10021": "Not Started",
            "customfield_10100": null,
            "priority": {
              "self": "https://Snaplogic.atlassian.net/rest/api/2/priority/3",
              "iconUrl": "https://Snaplogic.atlassian.net/images/icons/priorities/major.png",
              "name": "Major",
              "id": "3"
            },
            "customfield_10101": null,
            "customfield_10300": "0|1009kw:",
            "labels": [],
            "customfield_10016": null,
            "customfield_10017": null,
            "customfield_10018": null,
            "customfield_10019": null,
            "timeestimate": null,
            "aggregatetimeoriginalestimate": null,
            "versions": [],
            "issuelinks": [],
            "assignee": null,
            "updated": "2015-01-15T10:49:00.553-0800",
            "status": {
              "self": "https://Snaplogic.atlassian.net/rest/api/2/status/10001",
              "description": "",
              "iconUrl": "https://Snaplogic.atlassian.net/images/icons/statuses/open.png",
              "name": "To Do",
              "id": "10001",
              "statusCategory": {
                "self": "https://Snaplogic.atlassian.net/rest/api/2/statuscategory/2",
                "id": 2,
                "key": "new",
                "colorName": "blue-gray",
                "name": "To Do"
              }
            },
            "components": [],
            "timeoriginalestimate": null,
            "description": "Create, update and delete JIRA issues using the JIRA Create, Put and Delete Snaps",
            "customfield_10012": null,
            "customfield_10013": null,
            "customfield_10014": null,
            "customfield_10015": null,
            "timetracking": {},
            "customfield_10007": null,
            "customfield_10008": null,
            "attachment": [],
            "aggregatetimeestimate": null,
            "summary": "Test JIRA Snaps (create/update/delete a Jira issue)",
            "creator": {
              "self": "https://Snaplogic.atlassian.net/rest/api/2/user?username=admin",
              "name": "admin",
              "key": "admin",
              "emailAddress": "[email protected]",
              "avatarUrls": {
                "48x48": "https://Snaplogic.atlassian.net/secure/useravatar?avatarId=10122",
                "24x24": "https://Snaplogic.atlassian.net/secure/useravatar?size=small&avatarId=10122",
                "16x16": "https://Snaplogic.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",
                "32x32": "https://Snaplogic.atlassian.net/secure/useravatar?size=medium&avatarId=10122"
              },
              "displayName": "Snap admin [Administrator]",
              "active": true,
              "timeZone": "America/Los_Angeles"
            },
            "subtasks": [],
            "reporter": {
              "self": "https://Snaplogic.atlassian.net/rest/api/2/user?username=admin",
              "name": "admin",
              "key": "admin",
              "emailAddress": "[email protected]",
              "avatarUrls": {
                "48x48": "https://Snaplogic.atlassian.net/secure/useravatar?avatarId=10122",
                "24x24": "https://Snaplogic.atlassian.net/secure/useravatar?size=small&avatarId=10122",
                "16x16": "https://Snaplogic.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",
                "32x32": "https://Snaplogic.atlassian.net/secure/useravatar?size=medium&avatarId=10122"
              },
              "displayName": "Snap admin [Administrator]",
              "active": true,
              "timeZone": "America/Los_Angeles"
            },
            "customfield_10000": null,
            "aggregateprogress": {
              "progress": 0,
              "total": 0
            },
            "customfield_10001": null,
            "customfield_10002": null,
            "customfield_10200": null,
            "customfield_10003": null,
            "customfield_10400": null,
            "environment": null,
            "duedate": null,
            "progress": {
              "progress": 0,
              "total": 0
            },
            "comment": {
              "startAt": 0,
              "maxResults": 1,
              "total": 1,
              "comments": [
                {
                  "self": "https://Snaplogic.atlassian.net/rest/api/2/issue/17392/comment/15458",
                  "id": "15458",
                  "author": {
                    "self": "https://Snaplogic.atlassian.net/rest/api/2/user?username=admin",
                    "name": "admin",
                    "key": "admin",
                    "emailAddress": "[email protected]",
                    "avatarUrls": {
                      "48x48": "https://Snaplogic.atlassian.net/secure/useravatar?avatarId=10122",
                      "24x24": "https://Snaplogic.atlassian.net/secure/useravatar?size=small&avatarId=10122",
                      "16x16": "https://Snaplogic.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",
                      "32x32": "https://Snaplogic.atlassian.net/secure/useravatar?size=medium&avatarId=10122"
                    },
                    "displayName": "Snap admin [Administrator]",
                    "active": true,
                    "timeZone": "America/Los_Angeles"
                  },
                  "body": "Bug has been fixed.",
                  "updateAuthor": {
                    "self": "https://Snaplogic.atlassian.net/rest/api/2/user?username=admin",
                    "name": "admin",
                    "key": "admin",
                    "emailAddress": "[email protected]",
                    "avatarUrls": {
                      "48x48": "https://Snaplogic.atlassian.net/secure/useravatar?avatarId=10122",
                      "24x24": "https://Snaplogic.atlassian.net/secure/useravatar?size=small&avatarId=10122",
                      "16x16": "https://Snaplogic.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",
                      "32x32": "https://Snaplogic.atlassian.net/secure/useravatar?size=medium&avatarId=10122"
                    },
                    "displayName": "Snap admin [Administrator]",
                    "active": true,
                    "timeZone": "America/Los_Angeles"
                  },
                  "created": "2015-01-15T10:49:00.550-0800",
                  "updated": "2015-01-15T10:49:00.550-0800"
                }
              ]
            },
            "votes": {
              "self": "https://Snaplogic.atlassian.net/rest/api/2/issue/JIRASNAP-4312/votes",
              "votes": 0,
              "hasVoted": false
            },
            "worklog": {
              "startAt": 0,
              "maxResults": 20,
              "total": 0,
              "worklogs": []
            }
          }
        },
        "original": {
          "response": {
            "headers": {
              "strict-transport-security": "max-age=315360000;includeSubdomains",
              "x-content-type-options": "nosniff",
              "x-seraph-loginreason": "OK",
              "connection": "keep-alive",
              "set-cookie": "atlassian.xsrf.token=BWCK-SR48-JN93-ESFC|c127207e6dcb6f113eb45ec4d1dc463829af8dc2|lin; Path=/; Secure",
              "content-type": "application/json;charset=UTF-8",
              "date": "Thu, 15 Jan 2015 18:49:00 GMT",
              "x-arequestid": "648x1343x1",
              "x-asen": "SEN-2848532",
              "content-length": "0",
              "x-asessionid": "1g8lldp",
              "cache-control": "no-cache, no-store, no-transform",
              "x-ausername": "admin",
              "server": "nginx"
            },
            "statusLine": {
              "reasonPhrase": "No Content",
              "statusCode": 204,
              "protoVersion": "HTTP/1.1"
            },
            "entity": null
          },
          "original": {
            "id": "17392",
            "update": {
              "comment": [
                {
                  "add": {
                    "body": "Bug has been fixed."
                  }
                }
              ]
            }
          }
        }
      }
  1. Ensure that your Rally account and authentication details are correctly configured in the Snap.
  2. Verify the input JSON structure to ensure that it matches the expected Rally API format.
  3. Validate the Snap to confirm that the retrieved output matches the issue data created upstream.