travis-ci
Version:
node library to access the Travis-CI API
567 lines (566 loc) • 21.5 kB
JSON
[
{
"name": "Home",
"doc": "",
"prefix": "/",
"routes": [
{
"uri": "/",
"verb": "GET",
"doc": "Landing point. Redirects web browsers to [API documentation](#/docs/).",
"scope": "public"
},
{
"uri": "/redirect",
"verb": "GET",
"doc": "Simple endpoints that redirects somewhere else, to make sure we don't\nsend a referrer.\n\nParameters:\n\n* **to**: URI to redirect to after handshake.",
"scope": "public"
},
{
"uri": "/config",
"verb": "GET",
"doc": "Provides you with system info:\n\n {\n config: {\n host: \"travis-ci.org\",\n shorten_host: \"trvs.io\",\n pusher: { key: \"dd3f11c013317df48b50\" },\n assets: {\n host: \"localhost:3000\",\n version: \"asset-id\",\n interval: 15\n }\n }\n }",
"scope": "public"
}
]
},
{
"name": "Accounts",
"doc": "",
"prefix": "/accounts",
"routes": [
{
"uri": "/accounts/",
"verb": "GET",
"doc": "",
"scope": "private"
}
]
},
{
"name": "Authorization",
"doc": "You need to get hold of an access token in order to reach any\nendpoint requiring authorization.\nThere are three ways to get hold of such a token: OAuth2, via a GitHub\ntoken you may already have or with Cross-Origin Window Messages.\n\n## OAuth2\n\nAPI authorization is done via a subset of OAuth2 and is largely compatible\nwith the [GitHub process](http://developer.github.com/v3/oauth/).\nBe aware that Travis CI will in turn use OAuth2 to authenticate (and\nauthorize) against GitHub.\n\nThis is the recommended way for third-party web apps.\nThe entry point is [/auth/authorize](#/auth/authorize).\n\n## GitHub Token\n\nIf you already have a GitHub token with the same or greater scope than\nthe tokens used by Travis CI, you can easily exchange it for a access\ntoken. Travis will not store the GitHub token and only use it for a single\nrequest to resolve the associated user and scopes.\n\nThis is the recommended way for GitHub applications that also want Travis\nintegration.\n\nThe entry point is [/auth/github](#POST /auth/github).\n\n## Cross-Origin Window Messages\n\nThis is the recommended way for the official client. We might improve the\nauthorization flow to support third-party clients in the future, too.\n\nThe entry point is [/auth/post_message](#/auth/post_message).",
"prefix": "/auth",
"routes": [
{
"uri": "/auth/authorize",
"verb": "GET",
"doc": "Endpoint for retrieving an authorization code, which in turn can be used\nto generate an access token.\n\nNOTE: This endpoint is not yet implemented.\n\nParameters:\n\n* **client_id**: your App's client id (required)\n* **redirect_uri**: URL to redirect to\n* **scope**: requested access scope\n* **state**: should be random string to prevent CSRF attacks",
"scope": "public"
},
{
"uri": "/auth/access_token",
"verb": "POST",
"doc": "Endpoint for generating an access token from an authorization code.\n\nNOTE: This endpoint is not yet implemented.\n\nParameters:\n\n* **client_id**: your App's client id (required)\n* **client_secret**: your App's client secret (required)\n* **code**: code retrieved from redirect from [/auth/authorize](#/auth/authorize) (required)\n* **redirect_uri**: URL to redirect to\n* **state**: same value sent to [/auth/authorize](#/auth/authorize)",
"scope": "public"
},
{
"uri": "/auth/github",
"verb": "POST",
"doc": "Endpoint for generating an access token from a GitHub access token.\n\nParameters:\n\n* **github_token**: GitHub token for checking authorization (required)",
"scope": "public"
},
{
"uri": "/auth/handshake",
"verb": "GET",
"doc": "Endpoint for making sure user authorized Travis CI to access GitHub.\nThere are no restrictions on where to redirect to after handshake.\nHowever, no information whatsoever is being sent with the redirect.\n\nParameters:\n\n* **redirect_uri**: URI to redirect to after handshake.",
"scope": "public"
},
{
"uri": "/auth/post_message",
"verb": "GET",
"doc": "This endpoint is meant to be embedded in an iframe, popup window or\nsimilar. It will perform the handshake and, once done, will send an\naccess token and user payload to the parent window via postMessage.\n\nHowever, the endpoint to send the payload to has to be explicitely\nwhitelisted in production, as this is endpoint is only meant to be used\nwith the official Travis CI client at the moment.\n\nExample usage:\n\n window.addEventListener(\"message\", function(event) {\n console.log(\"received token: \" + event.data.token);\n });\n\n var iframe = $('<iframe />').hide();\n iframe.appendTo('body');\n iframe.attr('src', \"https://api.travis-ci.org/auth/post_message\");\n\nNote that embedding it in an iframe will only work for users that are\nlogged in at GitHub and already authorized Travis CI. It is therefore\nrecommended to redirect to [/auth/handshake](#/auth/handshake) if no\ntoken is being received.",
"scope": "public"
},
{
"uri": "/auth/post_message/iframe",
"verb": "GET",
"doc": "",
"scope": "public"
}
]
},
{
"name": "Branches",
"doc": "",
"prefix": "/branches",
"routes": [
{
"uri": "/branches/",
"verb": "GET",
"doc": "",
"scope": "public"
}
]
},
{
"name": "Broadcasts",
"doc": "",
"prefix": "/broadcasts",
"routes": [
{
"uri": "/broadcasts/",
"verb": "GET",
"doc": "",
"scope": "private"
}
]
},
{
"name": "Builds",
"doc": "",
"prefix": "/builds",
"routes": [
{
"uri": "/builds/",
"verb": "GET",
"doc": "",
"scope": "public"
},
{
"uri": "/builds/:id",
"verb": "GET",
"doc": "",
"scope": "public"
},
{
"uri": "/builds/:id/cancel",
"verb": "POST",
"doc": "",
"scope": "public"
},
{
"uri": "/builds/:id/restart",
"verb": "POST",
"doc": "",
"scope": "public"
}
]
},
{
"name": "Documentation",
"doc": "",
"prefix": "/docs",
"routes": [
{
"uri": "/docs/",
"verb": "GET",
"doc": "",
"scope": "public"
}
]
},
{
"name": "Endpoints",
"doc": "Documents all available API endpoints for the currently deployed version.\nText is actually parsed from the source code upon server start.",
"prefix": "/endpoints",
"routes": [
{
"uri": "/endpoints/",
"verb": "GET",
"doc": "Lists all available API endpoints by URI prefix.\n\nValues in the resulting array correspond to return values of\n[`/endpoints/:prefix`](#/endpoints/:prefix).",
"scope": "public"
},
{
"uri": "/endpoints/:prefix",
"verb": "GET",
"doc": "Infos about a specific controller.\n\nExample response:\n\n {\n name: \"Endpoints\",\n doc: \"Documents all available API endpoints...\",\n prefix: \"/endpoints\",\n routes: [\n {\n uri: \"/endpoints/:prefix\",\n verb: \"GET\",\n doc: \"Infos about...\",\n scope: \"public\"\n }\n ]\n }",
"scope": "public"
}
]
},
{
"name": "Hooks",
"doc": "",
"prefix": "/hooks",
"routes": [
{
"uri": "/hooks/",
"verb": "GET",
"doc": "",
"scope": "private"
},
{
"uri": "/hooks/:id?",
"verb": "PUT",
"doc": "",
"scope": "private"
}
]
},
{
"name": "Jobs",
"doc": "",
"prefix": "/jobs",
"routes": [
{
"uri": "/jobs/",
"verb": "GET",
"doc": "",
"scope": "public"
},
{
"uri": "/jobs/:id",
"verb": "GET",
"doc": "",
"scope": "public"
},
{
"uri": "/jobs/:id/cancel",
"verb": "POST",
"doc": "",
"scope": "public"
},
{
"uri": "/jobs/:id/restart",
"verb": "POST",
"doc": "",
"scope": "public"
},
{
"uri": "/jobs/:job_id/log",
"verb": "GET",
"doc": "",
"scope": "public"
},
{
"uri": "/jobs/:id/log",
"verb": "PATCH",
"doc": "",
"scope": "private"
},
{
"uri": "/jobs/:job_id/annotations",
"verb": "GET",
"doc": "",
"scope": "public"
},
{
"uri": "/jobs/:job_id/annotations",
"verb": "POST",
"doc": "",
"scope": "public"
}
]
},
{
"name": "Lint",
"doc": "",
"prefix": "/lint",
"routes": [
{
"uri": "/lint/",
"verb": "POST",
"doc": "",
"scope": "public"
},
{
"uri": "/lint/",
"verb": "PUT",
"doc": "",
"scope": "public"
}
]
},
{
"name": "Logs",
"doc": "Logs are generated by builds.",
"prefix": "/logs",
"routes": [
{
"uri": "/logs/:id",
"verb": "GET",
"doc": "Fetches a log by its *id*.",
"scope": "public"
}
]
},
{
"name": "Repos",
"doc": "",
"prefix": "/repos",
"routes": [
{
"uri": "/repos/",
"verb": "GET",
"doc": "Endpoint for getting all repositories.\n\nYou can filter the repositories by adding parameters to the request. For example, you can get all repositories\nowned by johndoe by adding `owner_name=johndoe`, or all repositories that johndoe has access to by adding\n`member=johndoe`. The parameter names correspond to the keys of the response hash.\n\n### Response\n\njson(:repositories)",
"scope": "public"
},
{
"uri": "/repos/:id",
"verb": "GET",
"doc": "Gets the repository with the given id.\n\n### Response\n\njson(:repository)",
"scope": "public"
},
{
"uri": "/repos/:owner_name",
"verb": "GET",
"doc": "Retrieves repositories for a given owner.",
"scope": "public"
},
{
"uri": "/repos/:id/cc",
"verb": "GET",
"doc": "",
"scope": "public"
},
{
"uri": "/repos/:id/settings",
"verb": "GET",
"doc": "Get settings for a given repository",
"scope": "private"
},
{
"uri": "/repos/:id/settings",
"verb": "PATCH",
"doc": "",
"scope": "private"
},
{
"uri": "/repos/:id/key",
"verb": "GET",
"doc": "Get the public key for the repository with the given id.\n\nThis can be used to encrypt secure variables in the build configuration. See\n[the encryption keys](http://docs.travis-ci.com/user/encryption-keys/) documentation page for more\ninformation.\n\n### Response\n\njson(:repository_key)",
"scope": "public"
},
{
"uri": "/repos/:id/key",
"verb": "POST",
"doc": "",
"scope": "public"
},
{
"uri": "/repos/:repository_id/branches",
"verb": "GET",
"doc": "Gets list of branches",
"scope": "public"
},
{
"uri": "/repos/:repository_id/branches/:branch",
"verb": "GET",
"doc": "Gets lastest build on a branch branches",
"scope": "public"
},
{
"uri": "/repos/:repository_id/caches",
"verb": "GET",
"doc": "List caches for a given repo. Can be filtered with `branch` and `match` query parameter.",
"scope": "private"
},
{
"uri": "/repos/:repository_id/caches",
"verb": "DELETE",
"doc": "Delete caches for a given repo. Can be filtered with `branch` and `match` query parameter.",
"scope": "private"
},
{
"uri": "/repos/:owner_name/:name",
"verb": "GET",
"doc": "Gets the repository with the given name.\n\n### Response\n\njson(:repository)",
"scope": "public"
},
{
"uri": "/repos/:owner_name/:name/builds",
"verb": "GET",
"doc": "Gets the builds for the repository with the given name.\n\n### Response\n\njson(:builds)",
"scope": "public"
},
{
"uri": "/repos/:owner_name/:name/builds/:id",
"verb": "GET",
"doc": "Get a build with the given id in the repository with the given name.\n\n### Response\n\njson(:build)",
"scope": "public"
},
{
"uri": "/repos/:owner_name/:name/cc",
"verb": "GET",
"doc": "",
"scope": "public"
},
{
"uri": "/repos/:owner_name/:name/key",
"verb": "GET",
"doc": "Get the public key for a given repository.\n\nThis can be used to encrypt secure variables in the build configuration. See\n[the encryption keys](http://docs.travis-ci.com/user/encryption-keys/) documentation page for more\ninformation.\n\n### Response\n\njson(:repository_key)",
"scope": "public"
},
{
"uri": "/repos/:owner_name/:name/key",
"verb": "POST",
"doc": "",
"scope": "public"
},
{
"uri": "/repos/:owner_name/:name/branches",
"verb": "GET",
"doc": "Gets list of branches",
"scope": "public"
},
{
"uri": "/repos/:owner_name/:name/branches/:branch",
"verb": "GET",
"doc": "Gets lastest build on a branch branches",
"scope": "public"
},
{
"uri": "/repos/:owner_name/:name/caches",
"verb": "GET",
"doc": "List caches for a given repo. Can be filtered with `branch` and `match` query parameter.",
"scope": "private"
},
{
"uri": "/repos/:owner_name/:name/caches",
"verb": "DELETE",
"doc": "Delete caches for a given repo. Can be filtered with `branch` and `match` query parameter.",
"scope": "private"
}
]
},
{
"name": "Requests",
"doc": "",
"prefix": "/requests",
"routes": [
{
"uri": "/requests/",
"verb": "POST",
"doc": "",
"scope": "private"
},
{
"uri": "/requests/",
"verb": "GET",
"doc": "",
"scope": "public"
},
{
"uri": "/requests/:id",
"verb": "GET",
"doc": "",
"scope": "public"
}
]
},
{
"name": "SettingsEndpoint",
"doc": "",
"prefix": "/settings/settings_endpoint",
"routes": [
{
"uri": "/settings/settings_endpoint/",
"verb": "GET",
"doc": "",
"scope": "private"
},
{
"uri": "/settings/settings_endpoint/:id",
"verb": "GET",
"doc": "",
"scope": "private"
},
{
"uri": "/settings/settings_endpoint/",
"verb": "POST",
"doc": "",
"scope": "private"
},
{
"uri": "/settings/settings_endpoint/:id",
"verb": "PATCH",
"doc": "",
"scope": "private"
},
{
"uri": "/settings/settings_endpoint/:id",
"verb": "DELETE",
"doc": "",
"scope": "private"
}
]
},
{
"name": "SettingsEnvVars",
"doc": "",
"prefix": "/settings/env_vars",
"routes": [
{
"uri": "/settings/env_vars/",
"verb": "GET",
"doc": "",
"scope": "private"
},
{
"uri": "/settings/env_vars/:id",
"verb": "GET",
"doc": "",
"scope": "private"
},
{
"uri": "/settings/env_vars/",
"verb": "POST",
"doc": "",
"scope": "private"
},
{
"uri": "/settings/env_vars/:id",
"verb": "PATCH",
"doc": "",
"scope": "private"
},
{
"uri": "/settings/env_vars/:id",
"verb": "DELETE",
"doc": "",
"scope": "private"
}
]
},
{
"name": "Uptime",
"doc": "",
"prefix": "/uptime",
"routes": [
{
"uri": "/uptime/",
"verb": "GET",
"doc": "",
"scope": "public"
}
]
},
{
"name": "Users",
"doc": "TODO should this be /profile?",
"prefix": "/users",
"routes": [
{
"uri": "/users/",
"verb": "GET",
"doc": "Gives information about the currently logged in user.\n\nExample:\n\n {\n \"user\": {\n \"name\": \"Sven Fuchs\",\n \"login\": \"svenfuchs\",\n \"email\": \"svenfuchs@artweb-design.de\",\n \"gravatar_id\": \"402602a60e500e85f2f5dc1ff3648ecb\",\n \"locale\": \"de\",\n \"is_syncing\": false,\n \"synced_at\": \"2012-08-14T22:11:21Z\"\n }\n }",
"scope": "private"
},
{
"uri": "/users/permissions",
"verb": "GET",
"doc": "",
"scope": "private"
},
{
"uri": "/users/:id",
"verb": "GET",
"doc": "TODO fix url/key generation in ember-data\nget '/broadcasts', scope: :private do\n respond_with service(:users, :find_broadcasts), type: :broadcasts\nend",
"scope": "private"
},
{
"uri": "/users/:id?",
"verb": "PUT",
"doc": "",
"scope": "private"
},
{
"uri": "/users/sync",
"verb": "POST",
"doc": "",
"scope": "private"
}
]
}
]