Elentra API
  • Introduction
  • Developers
    • Getting Started
    • Quickstart Guide
      • Set up Repositories
      • Validate the setup
      • Exploring the API
      • Creating a new Module
      • Setup Routing
      • Introduction to Postman
      • Create a Controller
      • Using Eloquent Models
      • Input Validation
      • API Resource Authorization
  • Elentra API Standards
    • HTTP Methods & Status Codes
    • Routing & Parameters
      • Example Routing Patterns with HTTP Method
        • /courses/{course}/contacts
        • /courses/{course}/contacts?type={contact_type}
        • /courses/{course}/contacts/{contact}
        • /courses/{course}/syllabus
      • Common Mistakes
        • [GET] /admissions/file-review/file/rubric-score/{cycle_id}/{pool_id}/{subpool_id}
        • [DELETE] /notices/1,2,3
        • [GET] /cbe/curriculum/framework/{framework_id}/hierarchy-by-depth
        • [GET] /admissions/file-review/file/rubric-score/delete/{id}
        • [GET] /portfolio/entries/{entry_id}/get-file
        • [POST] /cbe/curriculum/updateframework
  • Automated Testing
    • Getting Started
      • Setting up a testing environment
      • Running Automated Tests
    • Seed Data
      • Folder Structure
      • Creating Seed Data
    • Functional Tests
      • Creating a Functional Test File
      • Testing HTTP Verbs
        • Creating an HTTP Test
        • GET Requests
        • POST / PUT / DELETE Requests
        • GraphQL Requests
      • Asserting API Response
      • Annotations
    • Code Style Linting
Powered by GitBook
On this page
  1. Elentra API Standards
  2. Routing & Parameters
  3. Example Routing Patterns with HTTP Method

/courses/{course}/contacts

Collection/Resource/Sub-Collection

Returns the entire collection

Returns all the contacts of the given course

Create a new course contact resource for the given course and returns the newly inserted ID.

  • Uncommon to use with a collection.

  • It is implied that this would replace the entire contacts collection.

Use with extreme care.

  • Very uncommon and limited in viable use cases.

  • This would imply updating a subset of data (e.g ::firstOrCreate).

  • Scenarios which would use PATCH are more varied than PUT/POST.

For example, reordering a large dataset (faster than looping PUT requests).

Use with extreme care, consider more readable alternative routing expressions.

Deletes the entire collection.

Deletes all contacts belonging to a given course.

Use with extreme care.

PreviousExample Routing Patterns with HTTP MethodNext/courses/{course}/contacts?type={contact_type}

Last updated 2 years ago