Nominate a Submission

API Endpoint: nominate_submission

Nominates a submission to a Group.

Important

An API Key is required for ALL private workspace activities

The API Key name component can be added to your header using any of the following ways, “X-CKAN-API-Key”, “EDX-API-Key”, or “Authorization”.

Parameter Definitions

Parameter Name

Description

Required Fields

group_id

Group ID or group URL name of the group the public submission is being nominated format

Required

submission_id

Submission ID or submission URL name of the group the public submission is being nominated from

Required

reason

The reason the public submission is being nominated to the group

Required



Important

When defining group_id, ONLY select the end path of the URL

url path image

Important

When defining submission_id, ONLY select the end path of the URL

url path image


Example 1: Nominate a Public Submission to a Group

Attention

  • Add the "User-Agent": parameter within the headers of the API request

  • Set "User-Agent": to the value "EDX-USER"

  • Input
  • Successful Output
  import requests
  headers = {
      "EDX-API-Key": 'YOUR-API-KEY-HERE',
      "User-Agent": "EDX-USER"
  }

  data = {
      "group_id": 'group-url-name or group-id',
      "submission_id": 'submission-url-name or submission-id',
      "reason": "Reason for Submission Nomination"
  }

  url = 'https://edx.netl.doe.gov/api/3/action/nominate_submission'

  r = requests.post(
      url, # URL to API endpoint
      headers=headers, # Headers dictionary
      data=data, # Dictionary of data params
  )
  print (r.json())
  print("End results")
    {'help': '/api/3/action/help_show?name=nominate_submission', 'success': True, 'result': {'submission_name': 'test-submission', 'group': 'test-group',
    'user': 'test-user', 'reason': 'Test the Reason'}}
    End results