Skip to content

Add additional query options to GET endpoints #628

Description

@jdoemel

Please add additional query options to GET endpoints

  • lactation-status and can specify 1 or as many as they like. MILKING, DRY, HEIFER, BULL
  • alternative-identifiers and can specify 1 or as many as they like.
  • is-archived. True/False. Allows requests for Active vs Inactive animals. No parameter includes Active and Inactive

Given partners are pulling animal data from Developer API GET endpoints,
When partners want to filter animals by current archive status,
Then partners can use an is-archived query parameter.

is-archived=true returns SOLD/DIED animals.
is-archived=false returns only ALIVE animals.
If is-archived is not provided, the endpoint continues to return ALIVE/SOLD/DIED animals.

Given partners are pulling animal data from Developer API GET endpoints,
When partners want to filter animals by current lactation status,
Then partners can use the lactation-status query parameter.

The parameter supports one or multiple values in a single request.

Examples:
&lactation-status=milking
&lactation-status=milking&lactation-status=dry&lactation-status=heifer

When multiple values are provided, results include animals currently matching any supplied lactation status.
milking
dry
heifer
bull

Given partners are pulling animal data from Developer API GET endpoints,
When partners want to filter animals by specific alternative identifiers,
Then partners can use an alternative-identifiers query parameter.

Supported values:

The parameter supports one or multiple values in a single request.

Examples:
&alternative-identifiers=com.vas.animals.managementNumber
&alternative-identifiers=com.vas.animals.managementNumber&alternative-identifiers=com.vas.animals.registrationId

When alternative-identifiers is used, results include animals where the selected identifier field has a non-null, non-empty, non-zero value.
When multiple values are provided, results include animals matching any supplied alternative identifier.

Sharing examples but would be unlimited given what a particular partner offers
com.vas.animals.managementNumber
com.vas.animals.name
com.vas.animals.registrationId
com.vas.animals.electronicId
com.vas.animals.controlNumber
com.vas.animals.visualId
com.vas.animals.transponderNumber
com.vas.animals.responderNumber

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions