API Entry Point (AEP) Version 2

This document describes the OSDI API entry point (AEP) as implemented by the Action Network.

The AEP is the top level entry point for Action Network's API. It provides links to other resource entry points, such as a collection of petition resources in the system, documentation, and other messages. By starting at the AEP and following successive links, an API user should be able to reach all URLs available on the API.

Sections:

Endpoints and URL structures

Endpoints:

https://actionnetwork.org/api/v2/

The AEP is located at the above link, and all collections and resources stem from that basic URL structure.

URL Structures:

https://actionnetwork.org/api/v2/[resource_type]

To address a specific type of resources, use the resource type name like https://actionnetwork.org/api/v2/petitions

Back To Top ↑

Field names and descriptions

API Entry Point fields:
Field Name Type Description
motd string An informational message from the server.
vendor_name string The name of our system, always "Action Network".
product_name string The name of our product, always "Action Network".
osdi_version string The version of the OSDI specification that we conform to. Currently "1.1.1".
namespace string The string we use to namespace our custom API endpoints and curies. Currently "action_network".
max_page_size string The maximum number of resources that will be returned by the server when using GET on a single page in a collection of resources. Currently 25.
Back To Top ↑

Links

Link Name Description
self A link to the API entry point.
osdi:people A link to a collection of people resources associated with your API key. Click here for people documentation.
osdi:events A link to a collection of event resources associated with your API key. Click here for events documentation.
osdi:petitions A link to a collection of petition resources associated with your API key. Click here for petitions documentation.
osdi:fundraising_pages A link to a collection of fundraising page resources associated with your API key. Click here for fundraising pages documentation.
osdi:donations A link to a collection of donation resources associated with your API key. Click here for donations documentation.
osdi:advocacy_campaigns A link to a collection of advocacy campaign resources associated with your API key. Click here for advocacy campaign documentation.
osdi:lists A link to a collection of list resources associated with your API key. Click here for list documentation.
osdi:forms A link to a collection of form resources associated with your API key. Click here for forms documentation.
osdi:tags A link to a collection of tag resources associated with your API key. Only available for group API keys. Click here for tags documentation.
action_network:event_campaigns A link to a collection of event campaign resources associated with your API key. Only available for group API keys. Click here for event campaigns documentation.
action_network:campaigns A link to a collection of campaign resources associated with your API key. Only available for group API keys. Click here for campaigns documentation.
docs A link to the main documentation for this API.
osdi:person_signup_helper A link to the person signup helper. Click here for person signup helper documentation.
canvasser:brand_logo A link to our logo, which can be used in other applications as you see fit.
Back To Top ↑

Related resources

Back To Top ↑

Scenario: Retrieving the API entry point resource (GET)

Calling the AEP link will return the API entry point resource.

Request

						
GET https://actionnetwork.org/api/v2/

Header:
OSDI-API-Token: your_api_key_here
					

Response

						
200 OK

Content-Type: application/hal+json
Cache-Control: max-age=0, private, must-revalidate


{
  "motd": "Welcome to the Action Network OSDI API v2 Entry Point!",
  "_links": {
    "curies": [
      {
        "name": "osdi",
        "href": "https://actionnetwork.org/docs/v2/{rel}",
        "templated": true
      },
      {
        "name": "action_network",
        "href": "http://actionnetwork.org/docs/v2/{rel}",
        "templated": true
      }
    ],
    "canvasser:brand_logo": {
      "href": "https://actionnetwork.org/images/logo.png",
      "title": "The branding logo for use in UI"
    },
    "docs": {
      "href": "https://actionnetwork.org/docs/",
      "title": "Documentation",
      "name": "Docs",
      "index": "index"
    },
    "self": {
      "title": "This API entry point",
      "href": "https://actionnetwork.org/api/v2/"
    },
    "osdi:people": {
      "title": "The collection of people in the system",
      "href": "https://actionnetwork.org/api/v2/people"
    },
    "osdi:events": {
      "title": "The collection of events in the system",
      "href": "https://actionnetwork.org/api/v2/events"
    },
    "osdi:petitions": {
      "title": "The collection of petitions in the system",
      "href": "https://actionnetwork.org/api/v2/petitions"
    },
    "osdi:fundraising_pages": {
      "title": "The collection of fundraising_pages in the system",
      "href": "https://actionnetwork.org/api/v2/fundraising_pages"
    },
    "osdi:donations": {
      "title": "The collection of donations in the system",
      "href": "https://actionnetwork.org/api/v2/donations"
    },
    "osdi:advocacy_campaigns": {
      "title": "The collection of advocacy campaigns in the system",
      "href": "https://actionnetwork.org/api/v2/advocacy_campaigns"
    },
    "osdi:lists": {
      "title": "The collection of lists in the system",
      "href": "https://actionnetwork.org/api/v2/lists"
    },
    "osdi:forms": {
      "title": "The collection of forms in the system",
      "href": "https://actionnetwork.org/api/v2/forms"
    },
    "osdi:tags": {
      "title": "The collection of tags in the system",
      "href": "https://actionnetwork.org/api/v2/tags"
    },
    "action_network:event_campaigns": {
      "title": "The collection of event campaigns in the system",
      "href": "https://actionnetwork.org/api/v2/event_campaigns"
    },
    "action_network:campaigns": {
      "title": "The collection of campaigns in the system",
      "href": "https://actionnetwork.org/api/v2/campaigns"
    },
    "osdi:person_signup_helper": {
      "title": "Person Signup Helper",
      "href": "https://actionnetwork.org/api/v2/people"
    }
  },
  "max_page_size": 25,
  "vendor_name": "Action Network",
  "product_name": "Action Network",
  "osdi_version": "1.1.1",
  "namespace": "action_network"
}
					
Back To Top ↑

Scenario: POST/PUT/DELETE

Posting, putting, and deleting on the AEP is not allowed. Attempts will result in errors.

Back To Top ↑