In [30]:
import json
import requests

In [4]:
##### Authorization Code #####

code = 'AC-1-DtiwcIXEG7HH5qvphIMzcXXJqnVXiGDa9wTutGu4bRtPKRzCew'

url = 'https://localhost:8443/oauth2/token'

data = {
    'code': code,
    'client_id': 'gJgfkHAtz_FSyUOBgWiki_hyaBsa',
    'client_secret': 'esiLUJc2idUh5HaikEK7EAjMDwIa',
    'redirect_uri': 'http://localhost:5000/oauth/callback/googledrive/',
    'grant_type': 'authorization_code',
}

resp = requests.post(url, data=data, verify=False)
print('[{}] {}'.format(
        resp.status_code,
        json.dumps(json.loads(resp.content.decode('utf-8')), indent=2)
     )
)

# {
#     "token_type":"Bearer",
#     "expires_in":3600,
#     "refresh_token":"RT-1-TWFngAfiHbS6OCC3STiO2eugtcMFVS64IJZfGgNltbzu0yOKLe",
#     "access_token":"AT-1-gmEZ30hDhj5a6ZcAiPT4CSMG0ezke5YfmuKNKHknIecfhwOKHbUl59AnkxkksaSv7YPxzQ"
# }
#
# * access_type = offline


[400] b'{"error":"invalid_request","error_description":"Invalid Code"}'
/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py:769: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)

In [119]:
##### Grant Access Token #####

refresh_token = 'RT-2-LzDUmjYaSXKIbBtId3megopvJ1EOrnSwXbybunHbiK4Aq6NHNQ'

url = 'https://localhost:8443/oauth2/token'

data = {
    'client_id': 'gJgfkHAtz_FSyUOBgWiki_hyaBsa',
    'client_secret': 'esiLUJc2idUh5HaikEK7EAjMDwIa',
    'refresh_token': refresh_token,
    'grant_type': 'refresh_token',
}

resp = requests.post(url, data=data, verify=False)
print('[{}] {}'.format(
        resp.status_code,
        json.dumps(json.loads(resp.content.decode('utf-8')), indent=2)
     )
)

# {
#     "token_type":"Bearer",
#     "expires_in":3600,
#     "access_token":"AT-1-gmEZ30hDhj5a6ZcAiPT4CSMG0ezke5YfmuKNKHknIecfhwOKHbUl59AnkxkksaSv7YPxzQ"
# }


[200] b'{"token_type":"Bearer","expires_in":3600,"access_token":"AT-11-9CCh3wkCgYcgte7RhL7OGrxlEcwTBICfZc7UmuqRlPIbxJwYwftkYIZgPiKBNAPbmqVNWK"}'
/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py:769: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)

In [36]:
##### Profile & Scope Information #####

access_token = 'a2e1267dd3704eaa86aba3dbc2b81ba7wMxNrSMktoUocOO6pMT4lJGCzpypn2xWVitaqpsT '
# access_token = 'personal-access-token-id'

# url = 'https://localhost:8443/oauth2/profile'
url = 'https://staging2-accounts.osf.io/oauth2/profile'

headers = {
    'Authorization': 'Bearer {}'.format(access_token),
}

resp = requests.get(url, headers=headers, verify=False)
print('[{}] {}'.format(resp.status_code, resp.content))
# print('[{}] {}'.format(
#         resp.status_code,
#         json.dumps(json.loads(resp.content.decode('utf-8')), indent=2)
#      )
# )

# {
#     "id":"abc123",
#     "scope": [
#         "user.email",
#         "profile.basic"
#     ]
#     "attributes": [
#         {"email": "test.user@domain.com"},
#         {"familyName":"User"},
#         {"givenName":"Test"}
#     ]
# }
#
# * attributes must be released by the service


[200] b'{"scope":["osf.full+write"],"id":"b87aw"}'
/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py:769: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)

In [132]:
##### User Application Authorizations Metadata #####

access_token = 'AT-14-5LE9XUKbRNPXkEYjeZCHXc7BR2Nttz5HnjSOGu7fBiPRgGjrdDeXfYMe3QBcvPHOCA3NE1'

url = 'https://localhost:8443/oauth2/metadata'

headers = {
    'Authorization': 'Bearer {}'.format(access_token),
}

resp = requests.post(url, headers=headers, verify=False)
print('[{}] {}'.format(
        resp.status_code,
        json.dumps(json.loads(resp.content.decode('utf-8')), indent=2)
     )
)

# {
#     "data": [
#         {
#             "client_id":"abc123",
#             "name": "OAuth Application Name",
#             "description": "OAuth Application Description",
#             "scope": [
#                 "user.email",
#                 "profile.basic"
#             ]
#         },
#         {
#             "client_id":"defxyz",
#             "name": "Another Application Name",
#             "description": "Another Application Description",
#             "scope": [
#                 "user.email",
#                 "profile.basic"
#             ]
#         },
#     ]
# }


[401] b'error=unauthorized'
/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py:769: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)

In [8]:
##### Application Owner Metadata #####

url = 'https://localhost:8443/oauth2/metadata'
# url = 'https://staging2-accounts.osf.io/oauth2/metadata'

params = {
    'client_id': '9c6e0a220b264077b387e8ae4e7c808b',
    'client_secret': 'hn8FoFJgFYB8yuG6katNwRPpadbSLKFW1uYUTHj0',
}

resp = requests.post(url, params=params, verify=False)
print('[{}] {}'.format(
        resp.status_code,
        json.dumps(json.loads(resp.content.decode('utf-8')), indent=2)
     )
)

# {
#     "client_id":"abc123",
#     "name": "OAuth Application Name",
#     "description": "OAuth Application Description",
#     "users": 10
# }


[200] b'{"users":1,"description":"blah","name":"abc","client_id":"9c6e0a220b264077b387e8ae4e7c808b"}'
/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py:769: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)

In [131]:
##### Revoke Token #####

token = 'AT-14-5LE9XUKbRNPXkEYjeZCHXc7BR2Nttz5HnjSOGu7fBiPRgGjrdDeXfYMe3QBcvPHOCA3NE1'
# token = 'RT-1-jHUxqfYcfoWkQzJ1R5iHO6PFz5m5hswBEnizoigOcmnflbXDSm'

url = 'https://localhost:8443/oauth2/revoke'

params = {
    'token': token,
}

resp = requests.post(url, params=params, verify=False)
print('[{}] {}'.format(resp.status_code, resp.content))

# 204 = success


[204] b''
/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py:769: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)

In [19]:
##### User Revokes Application Access #####

access_token = 'AT-14-5LE9XUKbRNPXkEYjeZCHXc7BR2Nttz5HnjSOGu7fBiPRgGjrdDeXfYMe3QBcvPHOCA3NE1'

url = 'https://localhost:8443/oauth2/revoke'

headers = {
    'Authorization': 'Bearer {}'.format(access_token),
}

params = {
    'client_id': 'gJgfkHAtz_FSyUOBgWiki_hyaBsa',
}

resp = requests.post(url, headers=headers, params=params, verify=False)
print('[{}] {}'.format(resp.status_code, resp.content))

# 204 = success


---------------------------------------------------------------------------
ConnectionRefusedError                    Traceback (most recent call last)
/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, **response_kw)
    543                                                   timeout=timeout_obj,
--> 544                                                   body=body, headers=headers)
    545 

/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, **httplib_request_kw)
    340         try:
--> 341             self._validate_conn(conn)
    342         except (SocketTimeout, BaseSSLError) as e:

/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py in _validate_conn(self, conn)
    761         if not getattr(conn, 'sock', None):  # AppEngine might not have  `.sock`
--> 762             conn.connect()
    763 

/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/connection.py in connect(self)
    203         # Add certificate verification
--> 204         conn = self._new_conn()
    205 

/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/connection.py in _new_conn(self)
    133             conn = connection.create_connection(
--> 134                 (self.host, self.port), self.timeout, **extra_kw)
    135 

/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/util/connection.py in create_connection(address, timeout, source_address, socket_options)
     87     if err is not None:
---> 88         raise err
     89     else:

/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/util/connection.py in create_connection(address, timeout, source_address, socket_options)
     77                 sock.bind(source_address)
---> 78             sock.connect(sa)
     79             return sock

ConnectionRefusedError: [Errno 61] Connection refused

During handling of the above exception, another exception occurred:

ProtocolError                             Traceback (most recent call last)
/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies)
    369                     retries=self.max_retries,
--> 370                     timeout=timeout
    371                 )

/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, **response_kw)
    596             retries = retries.increment(method, url, error=e, _pool=self,
--> 597                                         _stacktrace=sys.exc_info()[2])
    598             retries.sleep()

/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/util/retry.py in increment(self, method, url, response, error, _pool, _stacktrace)
    244             if read is False:
--> 245                 raise six.reraise(type(error), error, _stacktrace)
    246             elif read is not None:

/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/packages/six.py in reraise(tp, value, tb)
    308         if value.__traceback__ is not tb:
--> 309             raise value.with_traceback(tb)
    310         raise value

/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, **response_kw)
    543                                                   timeout=timeout_obj,
--> 544                                                   body=body, headers=headers)
    545 

/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, **httplib_request_kw)
    340         try:
--> 341             self._validate_conn(conn)
    342         except (SocketTimeout, BaseSSLError) as e:

/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py in _validate_conn(self, conn)
    761         if not getattr(conn, 'sock', None):  # AppEngine might not have  `.sock`
--> 762             conn.connect()
    763 

/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/connection.py in connect(self)
    203         # Add certificate verification
--> 204         conn = self._new_conn()
    205 

/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/connection.py in _new_conn(self)
    133             conn = connection.create_connection(
--> 134                 (self.host, self.port), self.timeout, **extra_kw)
    135 

/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/util/connection.py in create_connection(address, timeout, source_address, socket_options)
     87     if err is not None:
---> 88         raise err
     89     else:

/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/util/connection.py in create_connection(address, timeout, source_address, socket_options)
     77                 sock.bind(source_address)
---> 78             sock.connect(sa)
     79             return sock

ProtocolError: ('Connection aborted.', ConnectionRefusedError(61, 'Connection refused'))

During handling of the above exception, another exception occurred:

ConnectionError                           Traceback (most recent call last)
<ipython-input-19-31c112e5abe6> in <module>()
     13 }
     14 
---> 15 resp = requests.post(url, headers=headers, params=params, verify=False)
     16 print('[{}] {}'.format(resp.status_code, resp.content))
     17 

/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/api.py in post(url, data, json, **kwargs)
    106     """
    107 
--> 108     return request('post', url, data=data, json=json, **kwargs)
    109 
    110 

/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/api.py in request(method, url, **kwargs)
     48 
     49     session = sessions.Session()
---> 50     response = session.request(method=method, url=url, **kwargs)
     51     # By explicitly closing the session, we avoid leaving sockets open which
     52     # can trigger a ResourceWarning in some cases, and look like a memory leak

/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/sessions.py in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
    462         }
    463         send_kwargs.update(settings)
--> 464         resp = self.send(prep, **send_kwargs)
    465 
    466         return resp

/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/sessions.py in send(self, request, **kwargs)
    574 
    575         # Send the request
--> 576         r = adapter.send(request, **kwargs)
    577 
    578         # Total elapsed time of the request (approximately)

/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies)
    413 
    414         except (ProtocolError, socket.error) as err:
--> 415             raise ConnectionError(err, request=request)
    416 
    417         except MaxRetryError as e:

ConnectionError: ('Connection aborted.', ConnectionRefusedError(61, 'Connection refused'))

In [18]:
##### Application Administrators Revokes All Tokens #####

url = 'https://localhost:8443/oauth2/revoke'

params = {
    'client_id': 'gJgfkHAtz_FSyUOBgWiki_hyaBsa',
    'client_secret': 'esiLUJc2idUh5HaikEK7EAjMDwIa',
}

resp = requests.post(url, params=params, verify=False)
print('[{}] {}'.format(resp.status_code, resp.content))

# 204 = success


[204] b''
/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py:769: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)

In [37]:
##### Profile & Scope Information #####

access_token = 'a2e1267dd3704eaa86aba3dbc2b81ba7wMxNrSMktoUocOO6pMT4lJGCzpypn2xWVitaqpsT'
# access_token = 'personal-access-token-id'

# url = 'https://localhost:8443/oauth2/profile'
url = 'https://staging2-api.osf.io:443/v2/nodes/'

headers = {
    'Authorization': 'Bearer {}'.format(access_token),
}

resp = requests.get(url, headers=headers, verify=False)
print('[{}] {}'.format(
        resp.status_code,
        json.dumps(json.loads(resp.content.decode('utf-8')), indent=2)
     )
)

# {
#     "id":"abc123",
#     "scope": [
#         "user.email",
#         "profile.basic"
#     ]
#     "attributes": [
#         {"email": "test.user@domain.com"},
#         {"familyName":"User"},
#         {"givenName":"Test"}
#     ]
# }
#
# * attributes must be released by the service


[200] {
  "links": {
    "first": null,
    "meta": {
      "per_page": 10,
      "total": 72
    },
    "next": "https://staging2-api.osf.io/v2/nodes/?page=2",
    "last": "https://staging2-api.osf.io/v2/nodes/?page=8",
    "prev": null
  },
  "data": [
    {
      "relationships": {
        "registrations": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/243u7/registrations/",
              "meta": {
                "count": 0
              }
            }
          }
        },
        "parent": {
          "links": {
            "self": null
          }
        },
        "files": {
          "links": {
            "related": "https://staging2-api.osf.io/v2/nodes/243u7/files/"
          }
        },
        "node_links": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/243u7/node_links/",
              "meta": {
                "count": 0
              }
            }
          }
        },
        "contributors": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/243u7/contributors/",
              "meta": {
                "count": 1
              }
            }
          }
        },
        "children": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/243u7/children/",
              "meta": {
                "count": 0
              }
            }
          }
        }
      },
      "links": {
        "self": "https://staging2-api.osf.io/v2/nodes/243u7/",
        "html": "https://staging2.osf.io/243u7/"
      },
      "type": "nodes",
      "attributes": {
        "date_modified": "2015-08-26T15:44:49.395000",
        "collection": false,
        "description": null,
        "dashboard": false,
        "title": "new project",
        "public": true,
        "tags": [],
        "category": "methods and measures",
        "date_created": "2015-07-24T14:52:22.359000",
        "registration": true
      },
      "id": "243u7"
    },
    {
      "relationships": {
        "registrations": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/2bwm8/registrations/",
              "meta": {
                "count": 0
              }
            }
          }
        },
        "parent": {
          "links": {
            "self": null
          }
        },
        "files": {
          "links": {
            "related": "https://staging2-api.osf.io/v2/nodes/2bwm8/files/"
          }
        },
        "node_links": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/2bwm8/node_links/",
              "meta": {
                "count": 0
              }
            }
          }
        },
        "contributors": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/2bwm8/contributors/",
              "meta": {
                "count": 1
              }
            }
          }
        },
        "children": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/2bwm8/children/",
              "meta": {
                "count": 0
              }
            }
          }
        }
      },
      "links": {
        "self": "https://staging2-api.osf.io/v2/nodes/2bwm8/",
        "html": "https://staging2.osf.io/2bwm8/"
      },
      "type": "nodes",
      "attributes": {
        "date_modified": "2015-07-30T15:19:31.901000",
        "collection": false,
        "description": "",
        "dashboard": false,
        "title": "Blue Monday",
        "public": true,
        "tags": [],
        "category": "project",
        "date_created": "2015-07-30T14:45:39.454000",
        "registration": true
      },
      "id": "2bwm8"
    },
    {
      "relationships": {
        "registrations": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/3c4as/registrations/",
              "meta": {
                "count": 0
              }
            }
          }
        },
        "parent": {
          "links": {
            "self": null
          }
        },
        "files": {
          "links": {
            "related": "https://staging2-api.osf.io/v2/nodes/3c4as/files/"
          }
        },
        "node_links": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/3c4as/node_links/",
              "meta": {
                "count": 0
              }
            }
          }
        },
        "contributors": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/3c4as/contributors/",
              "meta": {
                "count": 1
              }
            }
          }
        },
        "children": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/3c4as/children/",
              "meta": {
                "count": 0
              }
            }
          }
        }
      },
      "links": {
        "self": "https://staging2-api.osf.io/v2/nodes/3c4as/",
        "html": "https://staging2.osf.io/3c4as/"
      },
      "type": "nodes",
      "attributes": {
        "date_modified": "2015-06-29T17:20:50.849000",
        "collection": false,
        "description": "",
        "dashboard": false,
        "title": "Private API Project",
        "public": true,
        "tags": [
          "taggity",
          "toggity"
        ],
        "category": "project",
        "date_created": "2015-06-29T15:21:01.928000",
        "registration": true
      },
      "id": "3c4as"
    },
    {
      "relationships": {
        "registrations": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/3dg5n/registrations/",
              "meta": {
                "count": 0
              }
            }
          }
        },
        "parent": {
          "links": {
            "self": null
          }
        },
        "files": {
          "links": {
            "related": "https://staging2-api.osf.io/v2/nodes/3dg5n/files/"
          }
        },
        "node_links": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/3dg5n/node_links/",
              "meta": {
                "count": 0
              }
            }
          }
        },
        "contributors": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/3dg5n/contributors/",
              "meta": {
                "count": 1
              }
            }
          }
        },
        "children": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/3dg5n/children/",
              "meta": {
                "count": 0
              }
            }
          }
        }
      },
      "links": {
        "self": "https://staging2-api.osf.io/v2/nodes/3dg5n/",
        "html": "https://staging2.osf.io/3dg5n/"
      },
      "type": "nodes",
      "attributes": {
        "date_modified": "2015-08-03T15:26:37.912000",
        "collection": false,
        "description": null,
        "dashboard": false,
        "title": "prereg sub project",
        "public": true,
        "tags": [],
        "category": "",
        "date_created": "2015-08-03T15:26:37.912000",
        "registration": true
      },
      "id": "3dg5n"
    },
    {
      "relationships": {
        "registrations": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/4dfka/registrations/",
              "meta": {
                "count": 0
              }
            }
          }
        },
        "parent": {
          "links": {
            "self": "https://staging2-api.osf.io/v2/nodes/yuzjd/"
          }
        },
        "files": {
          "links": {
            "related": "https://staging2-api.osf.io/v2/nodes/4dfka/files/"
          }
        },
        "node_links": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/4dfka/node_links/",
              "meta": {
                "count": 0
              }
            }
          }
        },
        "contributors": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/4dfka/contributors/",
              "meta": {
                "count": 1
              }
            }
          }
        },
        "children": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/4dfka/children/",
              "meta": {
                "count": 0
              }
            }
          }
        }
      },
      "links": {
        "self": "https://staging2-api.osf.io/v2/nodes/4dfka/",
        "html": "https://staging2.osf.io/4dfka/"
      },
      "type": "nodes",
      "attributes": {
        "date_modified": "2015-08-17T13:58:51.702000",
        "collection": false,
        "description": null,
        "dashboard": false,
        "title": "prereg sub project",
        "public": true,
        "tags": [],
        "category": "",
        "date_created": "2015-08-17T13:57:53.203000",
        "registration": false
      },
      "id": "4dfka"
    },
    {
      "relationships": {
        "registrations": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/4ucg9/registrations/",
              "meta": {
                "count": 0
              }
            }
          }
        },
        "parent": {
          "links": {
            "self": null
          }
        },
        "files": {
          "links": {
            "related": "https://staging2-api.osf.io/v2/nodes/4ucg9/files/"
          }
        },
        "node_links": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/4ucg9/node_links/",
              "meta": {
                "count": 0
              }
            }
          }
        },
        "contributors": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/4ucg9/contributors/",
              "meta": {
                "count": 1
              }
            }
          }
        },
        "children": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/4ucg9/children/",
              "meta": {
                "count": 0
              }
            }
          }
        }
      },
      "links": {
        "self": "https://staging2-api.osf.io/v2/nodes/4ucg9/",
        "html": "https://staging2.osf.io/4ucg9/"
      },
      "type": "nodes",
      "attributes": {
        "date_modified": "2015-07-31T19:49:12.138000",
        "collection": false,
        "description": "",
        "dashboard": false,
        "title": "Title",
        "public": true,
        "tags": [],
        "category": "project",
        "date_created": "2015-07-31T19:49:12.138000",
        "registration": true
      },
      "id": "4ucg9"
    },
    {
      "relationships": {
        "registrations": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/56wfs/registrations/",
              "meta": {
                "count": 0
              }
            }
          }
        },
        "parent": {
          "links": {
            "self": null
          }
        },
        "files": {
          "links": {
            "related": "https://staging2-api.osf.io/v2/nodes/56wfs/files/"
          }
        },
        "node_links": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/56wfs/node_links/",
              "meta": {
                "count": 0
              }
            }
          }
        },
        "contributors": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/56wfs/contributors/",
              "meta": {
                "count": 1
              }
            }
          }
        },
        "children": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/56wfs/children/",
              "meta": {
                "count": 0
              }
            }
          }
        }
      },
      "links": {
        "self": "https://staging2-api.osf.io/v2/nodes/56wfs/",
        "html": "https://staging2.osf.io/56wfs/"
      },
      "type": "nodes",
      "attributes": {
        "date_modified": "2015-07-13T17:19:40.979000",
        "collection": false,
        "description": "Subjects to ecstatic children he. Could ye leave up as built match. Dejection agreeable attention set suspected led offending. Admitting an performed supposing by. Garden agreed matter are should formed temper had. Full held gay now roof whom such next was. Ham pretty our people moment put excuse narrow. Spite mirth money six above get going great own. Started now shortly had for assured hearing expense. Led juvenile his laughing speedily put pleasant relation offering.",
        "dashboard": false,
        "title": "How to Swim",
        "public": true,
        "tags": [],
        "category": "project",
        "date_created": "2015-07-13T17:11:35.361000",
        "registration": true
      },
      "id": "56wfs"
    },
    {
      "relationships": {
        "registrations": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/5h4te/registrations/",
              "meta": {
                "count": 0
              }
            }
          }
        },
        "parent": {
          "links": {
            "self": null
          }
        },
        "files": {
          "links": {
            "related": "https://staging2-api.osf.io/v2/nodes/5h4te/files/"
          }
        },
        "node_links": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/5h4te/node_links/",
              "meta": {
                "count": 0
              }
            }
          }
        },
        "contributors": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/5h4te/contributors/",
              "meta": {
                "count": 1
              }
            }
          }
        },
        "children": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/5h4te/children/",
              "meta": {
                "count": 0
              }
            }
          }
        }
      },
      "links": {
        "self": "https://staging2-api.osf.io/v2/nodes/5h4te/",
        "html": "https://staging2.osf.io/5h4te/"
      },
      "type": "nodes",
      "attributes": {
        "date_modified": "2015-07-30T15:05:03.189000",
        "collection": false,
        "description": "Bio &amp; Career Statistics of Bengt-\u00c5ke Gustafsson.\n\n",
        "dashboard": false,
        "title": "Bio &amp; Career Statistics",
        "public": true,
        "tags": [
          "Bio",
          "Career",
          "Statistics",
          "Sport",
          "Hockey",
          "Test",
          "Sweden",
          "Washington",
          "Capitals",
          "API"
        ],
        "category": "project",
        "date_created": "2015-07-01T12:52:50.747000",
        "registration": true
      },
      "id": "5h4te"
    },
    {
      "relationships": {
        "registrations": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/5qkxg/registrations/",
              "meta": {
                "count": 0
              }
            }
          }
        },
        "parent": {
          "links": {
            "self": null
          }
        },
        "files": {
          "links": {
            "related": "https://staging2-api.osf.io/v2/nodes/5qkxg/files/"
          }
        },
        "node_links": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/5qkxg/node_links/",
              "meta": {
                "count": 0
              }
            }
          }
        },
        "contributors": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/5qkxg/contributors/",
              "meta": {
                "count": 1
              }
            }
          }
        },
        "children": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/5qkxg/children/",
              "meta": {
                "count": 0
              }
            }
          }
        }
      },
      "links": {
        "self": "https://staging2-api.osf.io/v2/nodes/5qkxg/",
        "html": "https://staging2.osf.io/5qkxg/"
      },
      "type": "nodes",
      "attributes": {
        "date_modified": "2015-07-30T14:46:39.592000",
        "collection": false,
        "description": "",
        "dashboard": false,
        "title": "Registration test",
        "public": true,
        "tags": [],
        "category": "project",
        "date_created": "2015-07-30T14:45:39.386000",
        "registration": true
      },
      "id": "5qkxg"
    },
    {
      "relationships": {
        "registrations": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/5v4uc/registrations/",
              "meta": {
                "count": 0
              }
            }
          }
        },
        "parent": {
          "links": {
            "self": null
          }
        },
        "files": {
          "links": {
            "related": "https://staging2-api.osf.io/v2/nodes/5v4uc/files/"
          }
        },
        "node_links": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/5v4uc/node_links/",
              "meta": {
                "count": 0
              }
            }
          }
        },
        "contributors": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/5v4uc/contributors/",
              "meta": {
                "count": 1
              }
            }
          }
        },
        "children": {
          "links": {
            "related": {
              "href": "https://staging2-api.osf.io/v2/nodes/5v4uc/children/",
              "meta": {
                "count": 0
              }
            }
          }
        }
      },
      "links": {
        "self": "https://staging2-api.osf.io/v2/nodes/5v4uc/",
        "html": "https://staging2.osf.io/5v4uc/"
      },
      "type": "nodes",
      "attributes": {
        "date_modified": "2015-07-14T14:13:52.415000",
        "collection": false,
        "description": "Bob",
        "dashboard": false,
        "title": "Bob",
        "public": false,
        "tags": [],
        "category": "data",
        "date_created": "2015-07-14T14:13:52.415000",
        "registration": false
      },
      "id": "5v4uc"
    }
  ]
}
/Users/michael/.virtualenvs/ipython/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py:769: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)

In [ ]: