AnsweredAssumed Answered

Optional Fields - Post Request to Users

Question asked by ajdinmasic on Mar 13, 2019

Hey!

 

    I have a question about optional fields in post requests to the Blackboard API. I'll use theearn/api/public/v1/users endpoint as an example.

 

In the description of what values it needs it lists off ~41 fields but only ~8 are required. For the optional fields do I need to send any sort of data or even reference the fields?

 

Example(From documentation):

{
  "
id": "string",
  "
uuid": "string",
  "
externalId": "string",
  "
dataSourceId": "string",
  "
userName": "string",
  "
studentId": "string",
  "
educationLevel": "K8",
  "
gender": "Female",
  "
birthDate": "2019-03-13T14:22:18.291Z",
  "
created": "2019-03-13T14:22:18.291Z",
  "
lastLogin": "2019-03-13T14:22:18.291Z",
  "
institutionRoleIds": [
   
"string"
  ],
  "
systemRoleIds": [
   
"SystemAdmin"
  ],
  "
availability": {
    "
available": "Yes"
  },
  "
name": {
    "
given": "string",
    "
family": "string",
    "
middle": "string",
    "
other": "string",
    "
suffix": "string",
    "
title": "string"
  },
  "
job": {
    "
title": "string",
    "
department": "string",
    "
company": "string"
  },
  "
contact": {
    "
homePhone": "string",
    "
mobilePhone": "string",
    "
businessPhone": "string",
    "
businessFax": "string",
    "
email": "string",
    "
webPage": "string"
  },
  "
address": {
    "
street1": "string",
    "
street2": "string",
    "
city": "string",
    "
state": "string",
    "
zipCode": "string",
    "
country": "string"
  },
  "
locale": {
    "
id": "string",
    "
calendar": "Gregorian",
    "
firstDayOfWeek": "Sunday"
  }
}

Optional fields stripped out:

{
  "
id": "string",
  "
uuid": "string",
  "
userName": "string",
  "
created": "2019-03-13T14:22:18.291Z",
  "
lastLogin": "2019-03-13T14:22:18.291Z",
  "
name": {
    "
given": "string",
    "
family": "string",
  }

}

 

Can I send my user data like above (Optional fields stripped out) or do I still need to reference those optional fields and send null values instead?

Outcomes