REST API Basics

This section includes common terms and resources to learn more about API design. If you're new to API design, this is a good place to start.

Common Terms

  • Resource is the object you’re performing the action on with your endpoint. For example, in ProjectEndpoint the resource is Project.
  • Resource Identifier can be an ID, like an event ID, or slug, like an organization slug. Note that it must be unique. For example, Sentry's project resource identifier is {org_slug}/{project_slug}, because projects are only unique within their organization. You can find more information about this in the slug vs. ID section.
  • Method is what you do with the resource. Each endpoint can have multiple methods. For example in ProjectEndpoint, you can have a GET method that returns details of a specific project.
  • Collection is basically an object type. You can map them to a Django object type like an Organization or a text object like an error.

Extra Resources

The following resources are helpful to learn about general API design best practices:

You can edit this page on GitHub.