protected function attrsForApi($action) {
		$ret = array();
		$desc = $this->description->actions->{$action}->input->parameters;
		
		foreach($this->attrs as $k => $v) {
			if(!isSet($desc->{$k}))
				continue;
			
			$param = $desc->{$k};
			
			switch($param->type) {
				case 'Resource':
					$ret[$k] = $v->{ $param->{'value_id'} };
					break;
				
				default:
					$ret[$k] = $v;
			}
		}
		
		return $ret;
	}