def list_dataperiods(client, level, year=None):
    """List ATLAS data periods.

	Args:
	    :client: the pyAMI client [ pyAMI.client.Client ]
	    :level: the period level (1, 2, 3) [ int ]
	    :year: the year [ int | None ]

	Returns:
	    an array of python dictionnaries.
	"""
    command = ['AMIListDataPeriods', '-periodLevel="%s"' % level,
        '-createdSince="2009-01-01 00:00:00"']
    if year:
        command.append('-projectName="data%02i%%"' % (year % 100))
    return client.execute(command, format='dom_object').get_rows()
