Skip to content

URL format for fetching entities by ID #1

@woemler

Description

@woemler

There are multiple ways to fetch instances of entities with a REST web service, we should probably decide on a single one that best supports our potential use-cases. Here are a couple options:

# Fetches Sample record with ID 123, returns 404 if not found
http://api.oncoblocks.org/v1/samples/123

# Fetches Sample record with ID 123, returns an empty set if not found
http://api.oncoblocks.org/v1/samples?samplesId=123

There are pros and cons to both, but I am leaning towards the second option, which could support queries like this:

# Fetches Sample records with ID 123, 456, and 789
http://api.oncoblocks.org/v1/samples?sampleId=123,456,789

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions