NAV
json

Introduction

The following are API integration suggestions for Weekly Roundup. This is all the information that you could get by going directly to the integration API documentations, except consolidated down to endpoints that could be useful to Weekly Roundup.

Asana API

Authentication

Authenticated through basic OAuth. This will work much like our Harvest Implemenation. We will need to check against the token for expiry first before making our api calls.

User Authorization Endpoint

Redirect users to request Asana access

GET https://app.asana.com/-/oauth_authorize

Parameter Description
client_id required The Client ID uniquely identifies the application making the request.
redirect_uri required The URI to redirect to on success or error. This must match the Redirect URL specified in the application settings.
response_type required Must be one of either code (if using the Authorization Code Grant flow) or token (if using the Implicit Grant flow). Other flows are currently not supported.
state required Encodes state of the app, which will be returned verbatim in the response and can be used to match the response up to a given request.

Response

Parameter Description
code If response_type=code in the request, this is the code your app can exchange for a token
token If response_type=token in the request, this is the token your app can use to make requests of the API
state The state parameter that was sent with the authorizing request

Token Exchange Endpoint

Request

POST https://app.asana.com/-/oauth_token

Parameter Description
grant_type required One of authorization_code, refresh_token or password. See below for more details.
client_id required The Client ID uniquely identifies the application making the request.
client_secret required The Client Secret belonging to the app, found in the details pane of the developer console.
redirect_uri required Must match the redirect_uri specified in the original request.
code sometimes required If grant_type=authorization_code this is the code you are exchanging for an authorization token.
refresh_token sometimes required If grant_type=refresh_token this is the refresh token you are using to be granted a new access token.
username sometimes required If grant_type=password this is the username you are exchanging for an authorization token.

Response

Parameter Description
access_token The token to use in future requests against the API
expires_in The number of seconds the token is valid, typically 3600 (one hour)
token_type The type of token, in our case, bearer
refresh_token If exchanging a code, a long-lived token that can be used to get new access tokens when old ones expire.
data A JSON object encoding a few key fields about the logged-in user, currently id, name, and email.

Basic API

Get Workspaces

{
  "data": [
    {
      "id": 82341452549678,
      "name": "weekend-devs",
      "is_organization": false
    },
    {
      "id": 498346170860,
      "name": "Personal Projects",
      "is_organization": true
    }
  ],
  "next_page": null
}

Request

GET /workspaces

GET /workspaces?opt_fields=is_organization,id,name&limit=100

Parameter Description
id Read-only. Globally unique ID of the workspace.
name The name of the workspace.
is_organization Whether the workspace is an organization.

Get Projects for Workspaces

{
  "data": [
    {
      "id": 82341455320268,
      "owner": {
        "id": 82341441964652
      },
      "due_date": null,
      "current_status": null,
      "public": true,
      "name": "DonutRun Frontend",
      "notes": "",
      "archived": false,
      "workspace": {
        "id": 82341452549678
      },
      "color": null
    },
    {
      "id": 82341455320269,
      "owner": {
        "id": 82341441964652
      },
      "due_date": null,
      "current_status": null,
      "public": true,
      "name": "DonutRun Backend",
      "notes": "",
      "archived": false,
      "workspace": {
        "id": 82341452549678
      },
      "color": null
    }
  ],
  "next_page": null
}

Request

GET /workspaces/:workspace/projects

GET /workspaces/82341452549678/projects?opt_fields=name,id,owner,current_status,due_date,archived,public,color,notes,workspace,team&limit=100

Parameter Description
name Name of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
id Read-only. Globally unique ID of the project.
owner The current owner of the project, may be null.
current_status A description of the project’s status containing a color (must be either null or one of: green, yellow, red) and a short description.
due_date The day on which this project is due. This takes a date with format YYYY-MM-DD.
created_at Read-only. The time at which this project was created.
modified_at Read-only. The time at which this project was last modified.
archived True if the project is archived, false if not. Archived projects do not show in the UI by default and may be treated differently for queries.
public True if the project is public to the organization. If false, do not share this project with other users in this organization without explicitly checking to see if they have access.
members Read-only. Array of users who are members of this project.
followers Read-only. Array of users following this project. Followers are a subset of members who receive all notifcations for a project, the default notification setting when adding members to a project in-product.
color Color of the project. Must be either null or one of: dark-pink, dark-green, dark-blue, dark-red, dark-teal, dark-brown, dark-orange, dark-purple, dark-warm-gray, light-pink, light-green, light-blue, light-red, light-teal, light-yellow, light-orange, light-purple, light-warm-gray.
notes More detailed, free-form textual information associated with the project.
workspace The workspace or organization this project is associated with.
team The team that this project is shared with.

Get Tasks for Project

{
  "data": [
    {
      "id": 82341455320278,
      "created_at": "2016-01-20T16:23:57.243Z",
      "modified_at": "2016-01-20T16:23:58.850Z",
      "name": "BackLog:",
      "notes": "",
      "completed": false,
      "assignee_status": "upcoming",
      "completed_at": null,
      "due_on": null,
      "due_at": null,
      "assignee": null,
      "hearted": false,
      "followers": [
        {
          "id": 82341441964652
        }
      ]
    },
    {
      "id": 82341455320286,
      "created_at": "2016-01-20T16:24:00.314Z",
      "modified_at": "2016-04-06T22:26:16.653Z",
      "name": "Finish Strip API integration",
      "notes": "testing",
      "completed": false,
      "assignee_status": "inbox",
      "completed_at": null,
      "due_on": null,
      "due_at": null,
      "hearted": false,
      "assignee": {
        "id": 82335341048251
      },
      "followers": [
        {
          "id": 82341441964652
        },
        {
          "id": 82335341048251
        }
      ]
    }
  ]
}

Request

GET/projects/:projectId/tasks

GET /projects/82341455320268/tasks?opt_fields=id,assignee,assignee_status,created_at,completed,completed_at,due_on,due_at,followers,hearted,modified_at,notes,name&limit=10

Parameter Description
id Globally unique ID of the task.
assignee User to which this task is assigned, or null if the task is unassigned.
assignee_status Scheduling status of this task for the user it is assigned to.
created_at The time at which this task was created.
completed True if the task is currently marked complete, false if not.
completed_at The time at which this task was completed, or null if the task is incomplete.
due_on Date on which this task is due, or null if the task has no due date.
due_at Date and time on which this task is due, or null if the task has no due time.
external The external field allows you to store app-specific metadata on tasks, including an id that can be used to retrieve tasks and a data blob that can store app-specific character strings.
followers Array of users following this task.
hearted True if the task is hearted by the authorized user, false if not.
hearts Array of users who have hearted this task.
modfied_at The time at which this task was last modified.
name Name of the task.
notes More detailed, free-form textual information associated with the task.
num_hearts The number of users who have hearted this task.
projects Array of projects this task is associated with.
parent The parent of this task, or null if this is not a subtask.
workspace The workspace this task is associated with.
membership Array of projects this task is associated with and the section it is in.
tags Array of tags associated with this task.

Wunderlist API

Authentication

Authenticated through basic OAuth. This will work much like our Harvest Implemenation. However the access_token does not seem to expire so no need to go fetch a new token

User Authorization Endpoint

Redirect users to request Wunderlist access

GET https://www.wunderlist.com/oauth/authorize?client_id=ID&redirect_uri=URL&state=RANDOM

Parameter Description
client_id required The Client ID you received from Wunderlist when you registered your application.
redirect_uri required The URL in your app where users will be sent after authorization. See details below about redirect urls.
state required An unguessable random string. It is used to protect against cross-site request forgery attacks.

Exchange code for an access token

POST https://www.wunderlist.com/oauth/access_token

Response Back
{
  "access_token": "976d16a81ccf621a654fcc23193b09498b220e89eb72ced3"
}
Parameter Description
client_id required The Client ID you received from Wunderlist when you registered your application.
client_secret required. The client secret you received from Wunderlist when you registered.
code required. The code you received as a response to Step 1.

Basic API

GET a.wunderlist.com/api/v1/lists
Status: 200
{
  "id": 83526310,
  "created_at": "2013-08-30T08:29:46.203Z",
  "title": "Read Later",
  "list_type": "list",
  "type": "list",
  "revision": 10
}

Get all lists

Request

GET a.wunderlist.com/api/v1/lists

Get all tasks in a list

GET a.wunderlist.com/api/v1/tasks
Status: 200
[
  {
    "id": 409233670,
    "assignee_id": 12345,
    "assigner_id": 5432,
    "created_at": "2013-08-30T08:36:13.273Z",
    "created_by_id": 6234958,
    "due_date": "2013-08-30",
    "list_id": 123,
    "revision": 1,
    "starred": true,
    "title": "Hello"
  }
]

Request

GET a.wunderlist.com/api/v1/tasks

Parameter Description
list_id required

Get all subtasks in a task

GET a.wunderlist.com/api/v1/subtasks
Status: 200
json
[
  {
    "id": 409233670,
    "task_id": 123,
    "created_at": "2013-08-30T08:36:13.273Z",
    "created_by_id": 123456,
    "revision": 1,
    "title": "Hello"
  }
]

Request

GET a.wunderlist.com/api/v1/subtasks

Parameter Description
task_id required

FreshBooks API

side note: The API docs at FreshBooks is super sparse.

bigger side note: xml api only!

Authentication

Authenticated through basic OAuth 1.0 flow. This will require us to go through three endpoints in order to have a user authorized. The access_token does not seem to expire so no need to go fetch a new token

User Authorization Endpoint

Request Token URL

You must use HTTP POST when requesting an unauthorized Request Token. Because FreshBooks uses 1.0 Revision A of the OAuth specification, the ‘oauth_callback’ parameter must be specified.

https://sample.freshbooks.com/oauth/oauth_request.php

Redirect users to request FreshBooks access

HTTP GET should be used when sending a user to the User Authorization URL to authorize an OAuth Request Token. The user will then enter their FreshBooks account credentials using a secure form and the information will be sent to FreshBooks using HTTP POST. Upon verification of the user credentials, FreshBooks will redirect the user to the URL specified in the ‘oauth_callback’ parameter supplied when requesting an unauthorized Request Token.

GET https://#{sample}.freshbooks.com/oauth/oauth_authorize.php

Response Back
{
  "access_token": "976d16a81ccf621a654fcc23193b09498b220e89eb72ced3"
}

Exchange code for an access token

You must use HTTP POST when exchanging an authorized Request Token for an Access Token. Once again, because FreshBooks uses 1.0 Revision A of the OAuth specification, the ‘oauth_verifier’ parameter must be specified.

POST https://#{sample}.freshbooks.com/oauth/oauth_access.php

Basic API

Get Clients
request XML to JSON
{
  "request": {
    "-method": "client.list",
    "email": "janedoe@freshbooks.com",
    "username": "janedoe",
    "updated_from": "2009-01-01 00:00:00",
    "updated_to": "2009-12-01 00:00:00",
    "page": "1",
    "per_page": "15",
    "folder": "active",
    "notes": "email"
  }
}

Get Clients

https://#{sample}.freshbooks.com/api/2.1/xml-in

Get Clients
response XML to JSON
{
  "response": {
    "-xmlns": "https://www.freshbooks.com/api/",
    "-status": "ok",
    "clients": {
      "-page": "1",
      "-per_page": "15",
      "-pages": "3",
      "-total": "42",
      "client": {
        "client_id": "13",
        "first_name": "Jane",
        "last_name": "Doe",
        "organization": "ABC Corp",
        "email": "janedoe@freshbooks.com",
        "username": "janedoe",
        "contacts": {
          "contact_id": "15",
          "username": "alex",
          "email": "johnmcnicol@freshbooks.com"
        },
        "work_phone": "(555) 123-4567",
        "home_phone": "(555) 234-5678",
        "language": "en",
        "currency_code": "USD",
        "credit": {
          "-currency": "USD",
          "-deprecated": "true",
          "#text": "123.45"
        },
        "credits": {
          "credit": [
            {
              "-currency": "USD",
              "#text": "123.45"
            },
            {
              "-currency": "CAD",
              "#text": "43.45"
            },
            {
              "-currency": "EUR",
              "#text": "12.00"
            }
          ]
        },
        "notes": "Prefers email over phone calls",
        "p_street1": "123 Fake St.",
        "p_street2": "Unit 555",
        "p_city": "New York",
        "p_state": "New York",
        "p_country": "United States",
        "p_code": "553132",
        "url": {
          "-deprecated": "true",
          "#text": "https://sample.freshbooks.com/view/Vbbfs324trTkxer"
        },
        "auth_url": {
          "-deprecated": "true",
          "#text": "https://sample.freshbooks.com/clients/13"
        },
        "links": {
          "client_view": "https://sample.freshbooks.com/view/Vbbfs324trTkxer",
          "view": "https://sample.freshbooks.com/clients/13",
          "statement": "https://sample.freshbooks.com/view/3EbEwAkJGJkuJHSN"
        },
        "updated": "2009-08-12 09:00:00",
        "folder": "active"
      },
      "#text": "  
    ...  
  "
    }
  }
}

Get Client Projects

https://#{sample}.freshbooks.com/api/2.1/xml-in

Filters

Get Client Projects
request XML to JSON
{
  "request": {
    "-method": "project.list",
    "page": "1",
    "per_page": "15"
  }
}
Get Client Projects
response XML to JSON
{
  "response": {
    "-xmlns": "https://www.freshbooks.com/api/",
    "-status": "ok",
    "parsererror": {
      "-style": "display: block; white-space: pre; border: 2px solid #c77; padding: 0 1em 0 1em; margin: 1em; background-color: #fdd; color: black",
      "h3": [
        "This page contains the following errors:",
        "Below is a rendering of the page up to the first error."
      ],
      "div": {
        "-style": "font-family:monospace;font-size:12px",
        "#text": "error on line 41 at column 18: StartTag: invalid element name
"
      }
    },
    "projects": {
      "-page": "1",
      "-per_page": "15",
      "-pages": "1",
      "-total": "5",
      "project": {
        "project_id": "6",
        "name": "Super Fun Project",
        "rate": "11000",
        "bill_method": "flat-rate",
        "client_id": "119",
        "hour_budget": "100",
        "tasks": {
          "task": [
            { "task_id": "5" },
            { "task_id": "12" },
            {
              "task_id": "6",
              "rate": "25"
            },
            {
              "task_id": "7",
              "rate": "35"
            }
          ]
        },
        "staff": {
          "staff": [
            { "staff_id": "1" },
            { "staff_id": "2" },
            { "staff_id": "3" }
          ],
          "staff_id": [
            {
              "-deprecated": "true",
              "#text": "1"
            },
            {
              "-deprecated": "true",
              "#text": "2"
            },
            {
              "-deprecated": "true",
              "#text": "3"
            }
          ]
        }
      }
    }
  }
}

Get Project Time Entries

https://#{sample}.freshbooks.com/api/2.1/xml-in

Filters

Get Projects Time Entries
request XML to JSON
{
  "request": {
    "-method": "time_entry.create",
    "time_entry": {
      "project_id": "1",
      "task_id": "1",
      "staff_id": "1",
      "hours": "4.5",
      "notes": "Phone consultation",
      "date": "2007-01-01"
    }
  }
}
Get Projects Time Entries
response XML to JSON
{
  "response": {
    "-xmlns": "https://www.freshbooks.com/api/",
    "-status": "ok",
    "time_entries": {
      "-page": "1",
      "-per_page": "15",
      "-pages": "10",
      "-total": "142",
      "time_entry": [
        {
          "time_entry_id": "211",
          "staff_id": "1",
          "project_id": "1",
          "task_id": "1",
          "hours": "2",
          "date": "2009-03-13",
          "notes": "Sample Notes",
          "billed": "0"
        },
        "  
    ...  
    "
      ],
      "#text": "  
    ...  
  "
    }
  }
}

QuickBooks API

Authentication

Authenticated through basic OAuth 1.0 flow. This will require us to go through three endpoints in order to have a user authorized. The flow is similiar to wait is explained in the freshbooks auth.

Intuit OAuth Service URLs

From the redirect to the OAuth callback URL, get these parameters:

note: realmId is the companyId we will use to query the api by.

additional note: Implement an auto-renew strategy for the OAuth access token and the access token secret because they expire after 180 days.

Basic API

The API is pretty advanced but if we are only going to use this for time tracking then we really only need one endpoint to hit as you do everything through sql queries.

###Query a timeactivity object

Production Base URL: https://quickbooks.api.intuit.com

Operation: GET /v3/company/<companyID>/query?query=<selectStatement>
Content type: application/text

SAMPLE QUERY
select * from TimeActivity where TxnDate > '2014-09-14'
{
  "TimeActivity": {
    "TxnDate": "2014-09-16",
    "NameOf": "Employee",
    "EmployeeRef": {
      "value": "54",
      "name": "John Johnson"
    },
    "CustomerRef": {
      "value": "1",
      "name": "Amy's Bird Sanctuary"
    },
    "ItemRef": {
      "value": "4",
      "name": "Design"
    },
    "BillableStatus": "Billable",
    "Taxable": false,
    "HourlyRate": 75,
    "Hours": 5,
    "Minutes": 0,
    "Description": "Updated descirption",
    "domain": "QBO",
    "sparse": false,
    "Id": "3",
    "SyncToken": "1",
    "MetaData": {
      "CreateTime": "2014-09-17T11:53:15-07:00",
      "LastUpdatedTime": "2015-07-28T11:59:41-07:00"
    }
  },
  "time": "2015-07-28T11:59:41.178-07:00"
}

``

Github API

Authentication

Authenticated through basic OAuth. This will work much like our Harvest Implemenation. It doesn’t look like the auth token expires. So no need to refresh the token.

User Authorization Endpoint

Redirect users to request Github access

GET https://github.com/login/oauth/authorize

Parameter Description
client_id required The client ID you received from GitHub when you
redirect_uri The URL in your app where users will be sent after authorization.
scope A comma separated list of scopes. If not provided, scope defaults to an empty list of scopes for users that don’t have a valid token for the app.
state An unguessable random string. It is used to protect against cross-site request forgery attacks.

Response

Parameter Description
code If response_type=code in the request, this is the code your app can exchange for a token
state The state parameter that was sent with the authorizing request

Token Exchange Endpoint

Request

POST https://github.com/login/oauth/access_token

Parameter Description
client_id The client ID you received from GitHub when you
client_secret The client secret you received from GitHub when you registered.
code The code you received as a response to Step 1.
redirect_uri The URL in your app where users will be sent after authorization.
state The unguessable random string you optionally provided in Step 1.
access_token=e72e16c7e42f292c6912e7710c838347ae178b4a&scope=user%2Cgist&token_type=bearer

Response

Parameter Description
access_token Token used to authorize the user upon each request to API.
default_scope Grants read/write access to profile info only. Note that this scope includes user:email and user:follow. Grants write access to gists.
token_type bearer

Basic API

GET /user/orgs
Status: 200
[
  {
    "login": "github",
    "id": 1,
    "url": "https://api.github.com/orgs/github",
    "repos_url": "https://api.github.com/orgs/github/repos",
    "events_url": "https://api.github.com/orgs/github/events",
    "hooks_url": "https://api.github.com/orgs/github/hooks",
    "issues_url": "https://api.github.com/orgs/github/issues",
    "members_url": "https://api.github.com/orgs/github/members{/member}",
    "public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "description": "A great organization"
  }
]

Get user organizations

Request

GET /user/orgs

GET /orgs/:org/repos
Status: 200
[
  {
    "id": 1296269,
    "owner": {
      "login": "octocat",
      "id": 1,
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",
      "gravatar_id": "",
      "url": "https://api.github.com/users/octocat",
      "html_url": "https://github.com/octocat",
      "followers_url": "https://api.github.com/users/octocat/followers",
      "following_url": "https://api.github.com/users/octocat/following{/other_user}",
      "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
      "organizations_url": "https://api.github.com/users/octocat/orgs",
      "repos_url": "https://api.github.com/users/octocat/repos",
      "events_url": "https://api.github.com/users/octocat/events{/privacy}",
      "received_events_url": "https://api.github.com/users/octocat/received_events",
      "type": "User",
      "site_admin": false
    },
    "name": "Hello-World",
    "full_name": "octocat/Hello-World",
    "description": "This your first repo!",
    "private": false,
    "fork": false,
    "url": "https://api.github.com/repos/octocat/Hello-World",
    "html_url": "https://github.com/octocat/Hello-World",
    "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}",
    "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}",
    "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}",
    "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}",
    "clone_url": "https://github.com/octocat/Hello-World.git",
    "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}",
    "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}",
    "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}",
    "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}",
    "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}",
    "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors",
    "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments",
    "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads",
    "events_url": "http://api.github.com/repos/octocat/Hello-World/events",
    "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks",
    "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}",
    "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}",
    "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}",
    "git_url": "git:github.com/octocat/Hello-World.git",
    "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks",
    "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}",
    "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}",
    "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}",
    "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}",
    "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}",
    "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages",
    "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges",
    "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}",
    "mirror_url": "git:git.example.com/octocat/Hello-World",
    "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since, all, participating}",
    "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}",
    "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}",
    "ssh_url": "git@github.com:octocat/Hello-World.git",
    "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers",
    "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}",
    "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers",
    "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription",
    "svn_url": "https://svn.github.com/octocat/Hello-World",
    "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags",
    "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams",
    "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}",
    "homepage": "https://github.com",
    "language": null,
    "forks_count": 9,
    "stargazers_count": 80,
    "watchers_count": 80,
    "size": 108,
    "default_branch": "master",
    "open_issues_count": 0,
    "has_issues": true,
    "has_wiki": true,
    "has_pages": false,
    "has_downloads": true,
    "pushed_at": "2011-01-26T19:06:43Z",
    "created_at": "2011-01-26T19:01:12Z",
    "updated_at": "2011-01-26T19:14:43Z",
    "permissions": {
      "admin": false,
      "push": false,
      "pull": true
    }
  }
]

Get organization repos

Request

GET /orgs/:org/repos

GET /orgs/:org/issues
Status: 200
[
  {
    "id": 1,
    "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347",
    "repository_url": "https://api.github.com/repos/octocat/Hello-World",
    "labels_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}",
    "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments",
    "events_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/events",
    "html_url": "https://github.com/octocat/Hello-World/issues/1347",
    "number": 1347,
    "state": "open",
    "title": "Found a bug",
    "body": "I'm having a problem with this.",
    "user": {
      "login": "octocat",
      "id": 1,
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",
      "gravatar_id": "",
      "url": "https://api.github.com/users/octocat",
      "html_url": "https://github.com/octocat",
      "followers_url": "https://api.github.com/users/octocat/followers",
      "following_url": "https://api.github.com/users/octocat/following{/other_user}",
      "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
      "organizations_url": "https://api.github.com/users/octocat/orgs",
      "repos_url": "https://api.github.com/users/octocat/repos",
      "events_url": "https://api.github.com/users/octocat/events{/privacy}",
      "received_events_url": "https://api.github.com/users/octocat/received_events",
      "type": "User",
      "site_admin": false
    },
    "labels": [
      {
        "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
        "name": "bug",
        "color": "f29513"
      }
    ],
    "assignee": {
      "login": "octocat",
      "id": 1,
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",
      "gravatar_id": "",
      "url": "https://api.github.com/users/octocat",
      "html_url": "https://github.com/octocat",
      "followers_url": "https://api.github.com/users/octocat/followers",
      "following_url": "https://api.github.com/users/octocat/following{/other_user}",
      "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
      "organizations_url": "https://api.github.com/users/octocat/orgs",
      "repos_url": "https://api.github.com/users/octocat/repos",
      "events_url": "https://api.github.com/users/octocat/events{/privacy}",
      "received_events_url": "https://api.github.com/users/octocat/received_events",
      "type": "User",
      "site_admin": false
    },
    "milestone": {
      "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
      "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0",
      "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels",
      "id": 1002604,
      "number": 1,
      "state": "open",
      "title": "v1.0",
      "description": "Tracking milestone for version 1.0",
      "creator": {
        "login": "octocat",
        "id": 1,
        "avatar_url": "https://github.com/images/error/octocat_happy.gif",
        "gravatar_id": "",
        "url": "https://api.github.com/users/octocat",
        "html_url": "https://github.com/octocat",
        "followers_url": "https://api.github.com/users/octocat/followers",
        "following_url": "https://api.github.com/users/octocat/following{/other_user}",
        "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
        "organizations_url": "https://api.github.com/users/octocat/orgs",
        "repos_url": "https://api.github.com/users/octocat/repos",
        "events_url": "https://api.github.com/users/octocat/events{/privacy}",
        "received_events_url": "https://api.github.com/users/octocat/received_events",
        "type": "User",
        "site_admin": false
      },
      "open_issues": 4,
      "closed_issues": 8,
      "created_at": "2011-04-10T20:09:31Z",
      "updated_at": "2014-03-03T18:58:10Z",
      "closed_at": "2013-02-12T13:22:01Z",
      "due_on": "2012-10-09T23:39:01Z"
    },
    "locked": false,
    "comments": 0,
    "pull_request": {
      "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347",
      "html_url": "https://github.com/octocat/Hello-World/pull/1347",
      "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff",
      "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch"
    },
    "closed_at": null,
    "created_at": "2011-04-22T13:33:48Z",
    "updated_at": "2011-04-22T13:33:48Z"
  }
]

GET organization issues

Request

GET /orgs/:org/issues

Parameter Description
filter Indicates which sorts of issues to return. Can be one of: assigned: Issues assigned to you created: Issues created by you mentioned: Issues mentioning you subscribed: Issues you’re subscribed to updates for all: All issues the authenticated user can see, regardless of participation or creation Default: assigned
state Indicates the state of the issues to return. Can be either open, closed, or all. Default: open
labels A list of comma separated label names. Example: bug,ui,@high
sort What to sort results by. Can be either created, updated, comments. Default: created
direction The direction of the sort. Can be either asc or desc. Default: desc
since Only issues updated at or after this time are returned. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
GET /repos/:owner/:repo/issues
Status: 200
[
  {
    "id": 1,
    "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347",
    "repository_url": "https://api.github.com/repos/octocat/Hello-World",
    "labels_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}",
    "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments",
    "events_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/events",
    "html_url": "https://github.com/octocat/Hello-World/issues/1347",
    "number": 1347,
    "state": "open",
    "title": "Found a bug",
    "body": "I'm having a problem with this.",
    "user": {
      "login": "octocat",
      "id": 1,
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",
      "gravatar_id": "",
      "url": "https://api.github.com/users/octocat",
      "html_url": "https://github.com/octocat",
      "followers_url": "https://api.github.com/users/octocat/followers",
      "following_url": "https://api.github.com/users/octocat/following{/other_user}",
      "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
      "organizations_url": "https://api.github.com/users/octocat/orgs",
      "repos_url": "https://api.github.com/users/octocat/repos",
      "events_url": "https://api.github.com/users/octocat/events{/privacy}",
      "received_events_url": "https://api.github.com/users/octocat/received_events",
      "type": "User",
      "site_admin": false
    },
    "labels": [
      {
        "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
        "name": "bug",
        "color": "f29513"
      }
    ],
    "assignee": {
      "login": "octocat",
      "id": 1,
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",
      "gravatar_id": "",
      "url": "https://api.github.com/users/octocat",
      "html_url": "https://github.com/octocat",
      "followers_url": "https://api.github.com/users/octocat/followers",
      "following_url": "https://api.github.com/users/octocat/following{/other_user}",
      "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
      "organizations_url": "https://api.github.com/users/octocat/orgs",
      "repos_url": "https://api.github.com/users/octocat/repos",
      "events_url": "https://api.github.com/users/octocat/events{/privacy}",
      "received_events_url": "https://api.github.com/users/octocat/received_events",
      "type": "User",
      "site_admin": false
    },
    "milestone": {
      "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
      "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0",
      "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels",
      "id": 1002604,
      "number": 1,
      "state": "open",
      "title": "v1.0",
      "description": "Tracking milestone for version 1.0",
      "creator": {
        "login": "octocat",
        "id": 1,
        "avatar_url": "https://github.com/images/error/octocat_happy.gif",
        "gravatar_id": "",
        "url": "https://api.github.com/users/octocat",
        "html_url": "https://github.com/octocat",
        "followers_url": "https://api.github.com/users/octocat/followers",
        "following_url": "https://api.github.com/users/octocat/following{/other_user}",
        "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
        "organizations_url": "https://api.github.com/users/octocat/orgs",
        "repos_url": "https://api.github.com/users/octocat/repos",
        "events_url": "https://api.github.com/users/octocat/events{/privacy}",
        "received_events_url": "https://api.github.com/users/octocat/received_events",
        "type": "User",
        "site_admin": false
      },
      "open_issues": 4,
      "closed_issues": 8,
      "created_at": "2011-04-10T20:09:31Z",
      "updated_at": "2014-03-03T18:58:10Z",
      "closed_at": "2013-02-12T13:22:01Z",
      "due_on": "2012-10-09T23:39:01Z"
    },
    "locked": false,
    "comments": 0,
    "pull_request": {
      "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347",
      "html_url": "https://github.com/octocat/Hello-World/pull/1347",
      "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff",
      "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch"
    },
    "closed_at": null,
    "created_at": "2011-04-22T13:33:48Z",
    "updated_at": "2011-04-22T13:33:48Z"
  }
]

List issues for a repository

Request

GET /repos/:owner/:repo/issues

Parameter Description
milestone If an integer is passed, it should refer to a milestone by its number field. If the string * is passed, issues with any milestone are accepted. If the string none is passed, issues without milestones are returned.
state Indicates the state of the issues to return. Can be either open, closed, or all. Default: open
assignee Can be the name of a user. Pass in none for issues with no assigned user, and * for issues assigned to any user.
creator The user that created the issue.
mentioned A user that’s mentioned in the issue.
labels A list of comma separated label names. Example: bug,ui,@high
sort What to sort results by. Can be either created, updated, comments. Default: created
direction The direction of the sort. Can be either asc or desc. Default: desc
since Only issues updated at or after this time are returned. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.