A Topic Expert record allows a User to be designated as an expert of a Topic (aka Category).

Description of the Topic Expert Attributes


Attribute Name Description
id (integer) unique identifier of the record
category_id (integer) id of the Category record - required
user_id id of the User record - required




Create

Resource: /api/v2/topic_experts

HTTPS Request Method: POST

Description: create a new Topic Expert record.

Required parameter:

  • api_key (string): the account API key
  • all the attributes listed in "Description of the Topic Expert attributes"

Optional parameters:

  • user_code (string)
  • category_code (string)

Response:

  • on success: a 200 HTTP code and the created record in the body
  • on failure: a 422 HTTP code and an array of the errors in the body

Example requests:

  • Create a Topic Expert for the Category with id 143 and User with id 2544: curl -X "POST" "https://my-account-subdomain.exceedlms-staging.com/api/v2/topic_experts?api_key=my-account-subdomain-api-key-value" \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -d $'{ "topic_expert": { "user_id": 2544, "category_id": 143 } }'
  • Create a Topic Expert for the Category with code 143 and User with code 254400: curl -X "POST" "https://my-account-subdomain.exceedlms-staging.com/api/v2/topic_experts?api_key=my-account-subdomain-api-key-value" \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -d $'{ "topic_expert": { "category_code": "i-150", "user_code": "1161" } }'




Destroy

Resource: /api/v2/topic_experts/
(id being the id attribute of the Topic Expert record to destroy)

HTTPS Request Method: DELETE

Description: destroy an existing Topic Expert record.

Required parameters:

  • api_key (string): the account API key
  • id (integer): the id of the Topic Expert record to destroy

Optional parameters:
Note: id parameter will be ignored if these parameters are supplied.

  • user_id (integer) and category_id (integer)
  • user_code (integer) and category_code (integer)

Response:

  • on success: a 200 HTTP code and an empty body
  • on failure: a 422 HTTP code and an array of the errors in the body

Example requests:

  • Destroy the record with id 3: curl -X "DELETE" "https://my-account-subdomain.com/api/v2/topic_experts/3?api_key=my-account-subdomain-api-key-value" \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json'

  • Destroy the record with User id 2544 and Category id 143: curl -X "DELETE" "https://my-account-subdomain.exceedlms-staging.com/api/v2/topic_experts/1?api_key=my-account-subdomain-api-key-value" \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -d $'{
    "topic_expert": {
    "user_id": 2544,
    "category_id": 143
    }
    }'

  • Destroy the record with User code "1161" and Category code "i-150": curl -X "DELETE" "https://my-account-subdomain.exceedlms-staging.com/api/v2/topic_experts/1?api_key=my-account-subdomain-api-key-value" \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -d $'{
    "topic_expert": {
    "category_code": "i-150",
    "user_code": "1161"
    }
    }'