/
Aggiefeed REST API GET api_v1_activity

Aggiefeed REST API GET api_v1_activity

Aggiefeed REST API: GET /api/v1/activity


Headers:

Headers

Comments

Authorization: ApiKey <api key>

Requires API KEY
e.g.
Authorization: ApiKey abcdefgh


Query String Parameters:

Parameter

Name

Required (R)
Optional (O)

Format

Min / Max Value

Comments

Example

s

Skip

R

number

min: 0
max : 4000

Used for result pagination

s=10

l

Limit

R

number

min: 0
max: 200

Used for result pagination

l=100

u

User ID

O

string

N/A

Retrieve activities for a specific user and the groups he/she is associated with
Must be user's kName

u=userId

t

Activity Type

O

string

N/A

Specify one or more activity types

Common types are "notification" and "event"

t=notification
t=notification&t=event

m

Activity Label

O

string

N/A

Specify one or more activity labels
System level labels are:

  • ~campus-life
  • ~student-life
  • ~academic
  • ~campus-messages

m=~academic
m=~academic&m=~campus-life

oActivity Source OriginOstringN/ASpecify one or more activity sources

o=bf90bdca-60eb-4fcb-abfb-df923b7e0b05

sd

Activity publish window start date

O

ISO-8601 Date
YYYY-MM-DDTHH:mm:ss.SSSZ

N/A

Targets the ucdEdusMeta.startDate (start date for the range).

("sd" is in In Zulu Time)

e.g. Get any activity where the ucdEdusMeta.startDate is on or after the date provided by "sd"

sd=2013-06-27T22:00:00.000Z

ed

Activity publish window end date

O

ISO-8601 Date
YYYY-MM-DDTHH:mm:ss.SSSZ

N/A

Targets the ucdEdusMeta.startDate (end date for the range).

("ed" is in In Zulu Time)

e.g. When both the "sd" and "ed" are provided, get any activity where the ucdEdusMeta.start date lies between the "sd" and "ed" provided dates

ed=2013-06-28T22:00:00.000Z


How to Use Query String Parameters:

  • Specifying multiple Query String Parameters of the same type will match any (OR)
  • Specifying multiple Query String Parameters of different types will narrow the result like an (AND)


e.g. 1:
t=notification&m=~campus-life&m=~academic
t=notification AND ( m=~campus-life OR m=~academic )

e.g. 2:
u=userId&t=notification&t=news&m=~campus-life&m=~academic
u=userId AND ( t=notification OR t=news ) AND ( m=~campus-life OR m=~academic)

e.g. 3:
u=userId&t=news&m=~campus-life&m=~academic&sd=2013-06-28T22:00:00.000Z
u=userId AND t=news AND ( m=~campus-life OR m=~academic ) AND sd=2013-06-28T22:00:00.000Z

e.g. 4:
u=userId&t=news&m=~campus-life&m=~academic&sd=2013-06-28T22:00:00.000Z&ed=2013-07-05T06:00:00.000Z
u=userId AND t=news AND ( m=~campus-life OR m=~academic ) AND sd=2013-06-28T22:00:00.000Z AND ed=2013-07-05T06:00:00.000Z


Testing using "curl":

curl -H "Authorization: ApiKey <api key>" -i -X GET -G -d 's=0&l=100&t=notification&m=~campus-life&m=~academic&sd=2013-06-28T22:00:00.000Z&ed=2013-07-05T06:00:00.000Z' "https://aggiefeed-test.ucdavis.edu/api/v1/activity"



Related content

Aggiefeed REST API
Aggiefeed REST API
More like this
Aggiefeed REST API POST api_v1_activity
Aggiefeed REST API POST api_v1_activity
More like this
Aggiefeed REST API PUT api_v1_activity
Aggiefeed REST API PUT api_v1_activity
More like this
Aggiefeed Activity Model
Aggiefeed Activity Model
More like this
Aggiefeed REST API DELETE api_v1_activity
Aggiefeed REST API DELETE api_v1_activity
More like this