provider campaigns GET
/orgs/{org}/campaigns @utdk/github
/orgs/{org}/campaigns List campaigns for an organization
Lists campaigns in an organization.
The authenticated user must be an owner or security manager for the organization to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint.
- org path required
- The organization name. The name is not case sensitive.
- string
- page query
- The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
- integer
- per_page query
- The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
- integer
- direction query
- The direction to sort the results by.
- enum: asc, desc
- state query
- If specified, only campaigns with this state will be returned.
- enum: open, closed
- sort query
- The property by which to sort the results.
- enum: created, updated, ends_at, published
Try it
Authentication
Configure credentials for GitHub v3 REST API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.
Saved automatically to browser storage.
Code snippet
Updates live as you fill in the form above.
TypeScript
import github from '@utdk/github';
await github.campaigns.listOrgCampaigns({
"page": 1,
"per_page": 30,
"direction": "desc",
"sort": "created"
})